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
60edba14
Commit
60edba14
authored
Jun 22, 2012
by
Viktor Bogischef
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.google.com/p/supercomputer
parents
fec5043e
94304c6d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
12 deletions
+21
-12
presentation4.odp
Presentation/presentation4.odp
+0
-0
presentation4_group6.pdf
Presentation/presentation4_group6.pdf
+0
-0
heat.c
mpi-assign4/gauss_1by4/heat.c
+4
-2
input.c
mpi-assign4/gauss_1by4/input.c
+1
-0
relax_gauss.c
mpi-assign4/gauss_1by4/relax_gauss.c
+4
-4
test.dat
mpi-assign4/gauss_1by4/test.dat
+2
-2
heat.c
mpi-assign4/gauss_4by1/heat.c
+5
-1
heat.h
mpi-assign4/gauss_4by1/heat.h
+1
-0
input.c
mpi-assign4/gauss_4by1/input.c
+1
-0
relax_gauss.c
mpi-assign4/gauss_4by1/relax_gauss.c
+1
-1
test.dat
mpi-assign4/gauss_4by1/test.dat
+2
-2
No files found.
Presentation/presentation4.odp
0 → 100644
View file @
60edba14
File added
Presentation/presentation4_group6.pdf
0 → 100644
View file @
60edba14
File added
mpi-assign4/gauss_1by4/heat.c
View file @
60edba14
...
...
@@ -10,7 +10,8 @@
#define FALSE 0
#define TRUE 1
#define INTERLEAVING_COUNT 1024
#define INTERLEAVING_COUNT 10
#include "input.h"
#include "heat.h"
#include "timing.h"
...
...
@@ -113,7 +114,8 @@ int main( int argc, char *argv[] )
usage
(
argv
[
0
]);
}
fprintf
(
stderr
,
"Resolution: %5u
\r
"
,
param
.
act_res
);
if
(
rank
==
0
)
fprintf
(
stderr
,
"Resolution: %5u
\r
"
,
param
.
act_res
);
// full size (param.act_res are only the inner points)
np
=
param
.
act_res
+
2
;
...
...
mpi-assign4/gauss_1by4/input.c
View file @
60edba14
...
...
@@ -74,6 +74,7 @@ void print_params( algoparam_t *param )
{
int
i
;
fprintf
(
stderr
,
"Number of Threads: (%d x %d)
\n
"
,
param
->
thread_dims
[
0
],
param
->
thread_dims
[
1
]);
fprintf
(
stderr
,
"Resolutions : (%u, %u, ... %u)
\n
"
,
param
->
initial_res
,
param
->
initial_res
+
param
->
res_step_size
,
...
...
mpi-assign4/gauss_1by4/relax_gauss.c
View file @
60edba14
...
...
@@ -87,7 +87,7 @@ double relax_gauss_return_residual( algoparam_t *param, int interleaving_count,
}
// Receive border values from bottom block
// Re
quest re
ceive border values from bottom block
if
(
rank_bottom
!=
-
1
)
{
if
(
k
>
0
)
...
...
@@ -111,7 +111,7 @@ double relax_gauss_return_residual( algoparam_t *param, int interleaving_count,
}
}
//
R
eceive border values from bottom block
//
Wait for r
eceive border values from bottom block
if
(
rank_bottom
!=
-
1
)
{
if
(
k
>
0
)
...
...
@@ -122,7 +122,7 @@ double relax_gauss_return_residual( algoparam_t *param, int interleaving_count,
}
}
//
do the calculation for the lower right border
//
calculate the bottom row
i
=
size_y
-
2
;
for
(
j
=
1
;
j
<
size_x
-
1
;
j
++
)
{
...
...
@@ -150,7 +150,7 @@ double relax_gauss_return_residual( algoparam_t *param, int interleaving_count,
// Receive border values from bottom block
if
(
rank_bottom
!=
-
1
)
{
MPI_Recv
(
&
(
param
->
u
[(
size_y
-
1
)
*
size_x
+
j
]),
size_y
-
2
,
MPI_DOUBLE
,
rank_right
,
10
,
comm2d
,
&
status
);
MPI_Recv
(
&
(
param
->
u
[(
size_y
-
1
)
*
size_x
+
1
]),
size_x
-
2
,
MPI_DOUBLE
,
rank_bottom
,
10
,
comm2d
,
&
status
);
}
}
...
...
mpi-assign4/gauss_1by4/test.dat
View file @
60edba14
1
16
# x and y dimensions for threads
1024
# iterations
1
4
# x and y dimensions for threads
50
# iterations
256 # initial resolution
4096 # max resolution (spatial resolution)
3840 # resolution step size
...
...
mpi-assign4/gauss_4by1/heat.c
View file @
60edba14
...
...
@@ -10,7 +10,7 @@
#define FALSE 0
#define TRUE 1
#define INTERLEAVING_COUNT 10
24
#define INTERLEAVING_COUNT 10
#include "input.h"
#include "heat.h"
...
...
@@ -93,6 +93,10 @@ int main( int argc, char *argv[] )
param
.
sendbuf_right
=
0
;
param
.
recbuf_left
=
0
;
param
.
recbuf_right
=
0
;
param
.
sendbuf_top
=
0
;
param
.
sendbuf_bottom
=
0
;
param
.
recbuf_top
=
0
;
param
.
recbuf_bottom
=
0
;
param
.
act_res
=
param
.
initial_res
;
...
...
mpi-assign4/gauss_4by1/heat.h
View file @
60edba14
...
...
@@ -35,6 +35,7 @@ typedef struct
double
*
u
,
*
uhelp
;
double
*
sendbuf_left
,
*
recbuf_left
,
*
sendbuf_right
,
*
recbuf_right
;
double
*
sendbuf_top
,
*
recbuf_top
,
*
sendbuf_bottom
,
*
recbuf_bottom
;
unsigned
numsrcs
;
// number of heat sources
heatsrc_t
*
heatsrcs
;
...
...
mpi-assign4/gauss_4by1/input.c
View file @
60edba14
...
...
@@ -74,6 +74,7 @@ void print_params( algoparam_t *param )
{
int
i
;
fprintf
(
stderr
,
"Number of Threads: (%d x %d)
\n
"
,
param
->
thread_dims
[
0
],
param
->
thread_dims
[
1
]);
fprintf
(
stderr
,
"Resolutions : (%u, %u, ... %u)
\n
"
,
param
->
initial_res
,
param
->
initial_res
+
param
->
res_step_size
,
...
...
mpi-assign4/gauss_4by1/relax_gauss.c
View file @
60edba14
...
...
@@ -100,7 +100,7 @@ double relax_gauss_return_residual( algoparam_t *param, int interleaving_count,
}
}
// do the calculation for the
left +
inner part
// do the calculation for the inner part
for
(
i
=
1
;
i
<
size_y
-
1
;
i
++
)
{
for
(
j
=
2
;
j
<
size_x
-
2
;
j
++
)
...
...
mpi-assign4/gauss_4by1/test.dat
View file @
60edba14
16
1 # x and y dimensions for threads
1024
# iterations
4
1 # x and y dimensions for threads
50
# iterations
256 # initial resolution
4096 # max resolution (spatial resolution)
3840 # resolution step size
...
...
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