Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
supercomputer_lab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
supercomputer_lab
Commits
383950c6
Commit
383950c6
authored
May 19, 2012
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor Bugs in script and bandwidth code resolved
Signed-off-by:
Gaurav Kukreja
<
mailme.gaurav@gmail.com
>
parent
1b859709
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
19 deletions
+20
-19
mpi-ice.cmd
batch_scripts/assign3/mpi-ice.cmd
+1
-1
mpi-mpp.cmd
batch_scripts/assign3/mpi-mpp.cmd
+1
-1
mpi-uv.cmd
batch_scripts/assign3/mpi-uv.cmd
+2
-2
run-mpi-test.sh
batch_scripts/assign3/run-mpi-test.sh
+3
-3
ping-pong-bandwidth.c
mpi-assign3/ping-pong-bandwidth.c
+11
-10
result.c
mpi-assign3/result.c
+2
-2
No files found.
batch_scripts/assign3/mpi-ice.cmd
View file @
383950c6
...
...
@@ -13,5 +13,5 @@
source
/etc/profile.d/modules.sh
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/run-mpi-test.sh ice
>
/home/cluster/h039v/h039val/assign3/tmp/out_ice_script.
$JOB_ID
.out
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/
assign3/
run-mpi-test.sh ice
>
/home/cluster/h039v/h039val/assign3/tmp/out_ice_script.
$JOB_ID
.out
batch_scripts/assign3/mpi-mpp.cmd
View file @
383950c6
...
...
@@ -13,5 +13,5 @@
source
/etc/profile.d/modules.sh
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/run-mpi-test.sh mpp
>
/home/cluster/h039v/h039val/assign3/tmp/out_mpp_script.
$JOB_ID
.out
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/
assign3/
run-mpi-test.sh mpp
>
/home/cluster/h039v/h039val/assign3/tmp/out_mpp_script.
$JOB_ID
.out
batch_scripts/assign3/mpi-uv.cmd
View file @
383950c6
...
...
@@ -3,7 +3,7 @@
#SBATCH -o /home/cluster/h039v/h039val/assign3/batch_result/heat.$JOB_ID.out
#SBATCH -D /home/cluster/h039v/h039val
#SBATCH -J mpi-uv
#SBATCH --clusters=uv
3
#SBATCH --clusters=uv
2
#SBATCH --get-user-env
#SBATCH --ntasks=128
#SBATCH --mail-type=end
...
...
@@ -13,5 +13,5 @@
source
/etc/profile.d/modules.sh
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/run-mpi-test.sh uv
>
/home/cluster/h039v/h039val/assign3/tmp/out_uv_script.
$JOB_ID
.out
srun_ps /home/cluster/h039v/h039val/assign3/supercomputer/batch_scripts/
assign3/
run-mpi-test.sh uv
>
/home/cluster/h039v/h039val/assign3/tmp/out_uv_script.
$JOB_ID
.out
batch_scripts/assign3/run-mpi-test.sh
View file @
383950c6
...
...
@@ -32,8 +32,8 @@ cd $PATH_SOURCE
rm
-rf
$OUTPUT_PATH
mkdir
$OUTPUT_PATH
make clean
make
>
$OUTPUT_PATH
"/make-result-mpp.out"
#
make clean
#
make > $OUTPUT_PATH"/make-result-mpp.out"
for
i
in
${
num_of_proc
[@]
}
do
...
...
@@ -45,7 +45,7 @@ do
$EXEC_CMD
$i
./ping-pong
$OUTPUT_PATH
"/ping_pong_"
$i
".out"
done
for
i
in
{
num_of_proc[@]
}
for
i
in
$
{
num_of_proc
[@]
}
do
$EXEC_CMD
$i
./ping-pong-bandwidth
$OUTPUT_PATH
"/bandwidth_"
$i
".out"
done
...
...
mpi-assign3/ping-pong-bandwidth.c
View file @
383950c6
...
...
@@ -7,6 +7,8 @@
#define MAX_CMDARG 2
char
*
filename
;
#define PING_PONG_COUNT 100
struct
data_bandwidth
data_b
;
void
usage
()
...
...
@@ -17,7 +19,7 @@ void usage()
int
main
(
int
argc
,
char
**
argv
)
{
int
my_proc
,
other_proc
,
i
,
j
,
nprocs
,
size
;
int
my_proc
,
i
,
j
,
nprocs
,
size
;
int
tag
=
10
;
char
*
msg
;
char
*
buffer
;
...
...
@@ -37,26 +39,25 @@ int main (int argc, char **argv)
{
for
(
i
=
1
;
i
<
nprocs
;
i
++
)
{
other_proc
=
i
;
for
(
size
=
0
;
size
<=
20
;
size
++
)
{
buffer
=
malloc
(
pow
(
2
,
size
)
*
sizeof
(
char
));
buffer
=
malloc
(
(
pow
(
2
,
size
)
+
5
)
*
sizeof
(
char
));
msg
=
calloc
(
pow
(
2
,
size
),
sizeof
(
char
));
tstart
=
MPI_Wtime
();
for
(
j
=
0
;
j
<
5
;
j
++
)
for
(
j
=
0
;
j
<
PING_PONG_COUNT
;
j
++
)
{
MPI_Send
(
msg
,
pow
(
2
,
size
),
MPI_CHAR
,
other_proc
,
10
,
MPI_COMM_WORLD
);
MPI_Recv
(
buffer
,
pow
(
2
,
size
),
MPI_CHAR
,
other_proc
,
10
,
MPI_COMM_WORLD
,
&
status
);
MPI_Send
(
msg
,
pow
(
2
,
size
),
MPI_CHAR
,
i
,
10
,
MPI_COMM_WORLD
);
MPI_Recv
(
buffer
,
pow
(
2
,
size
),
MPI_CHAR
,
i
,
10
,
MPI_COMM_WORLD
,
&
status
);
}
tend
=
MPI_Wtime
();
free
(
msg
);
free
(
buffer
);
data_b
.
source_thread
=
0
;
data_b
.
dest_thread
=
other_proc
;
data_b
.
dest_thread
=
i
;
data_b
.
log_size
=
size
;
data_b
.
time
=
(
tend
-
tstart
)
/
10
;
data_b
.
bandwidth
=
0
;
data_b
.
time
=
(
tend
-
tstart
)
/
(
2
*
PING_PONG_COUNT
)
;
data_b
.
bandwidth
=
pow
(
2
,
size
)
/
data_b
.
time
;
submit_bandwidth_data
(
data_b
);
}
}
...
...
@@ -67,7 +68,7 @@ int main (int argc, char **argv)
{
buffer
=
malloc
(
pow
(
2
,
size
)
*
sizeof
(
char
));
for
(
j
=
0
;
j
<
5
;
j
++
)
for
(
j
=
0
;
j
<
PING_PONG_COUNT
;
j
++
)
{
MPI_Recv
(
buffer
,
pow
(
2
,
size
),
MPI_CHAR
,
0
,
10
,
MPI_COMM_WORLD
,
&
status
);
MPI_Send
(
buffer
,
pow
(
2
,
size
),
MPI_CHAR
,
0
,
10
,
MPI_COMM_WORLD
);
...
...
mpi-assign3/result.c
View file @
383950c6
...
...
@@ -8,9 +8,9 @@ int submit_bandwidth_data(struct data_bandwidth data_b)
FILE
*
fp
;
fp
=
fopen
(
filename
,
"a"
);
fprintf
(
fp
,
"%d
\t
%d
\t
%d
\t
%lf
\t
%lf
\n
"
,
data_b
.
source_thread
,
fprintf
(
fp
,
"%d
\t
%d
\t
%d
\t
%lf
\t
%lf
MB/s
\n
"
,
data_b
.
source_thread
,
data_b
.
dest_thread
,
data_b
.
log_size
,
data_b
.
time
,
data_b
.
bandwidth
);
data_b
.
time
,
data_b
.
bandwidth
/
1000000
);
fclose
(
fp
);
return
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment