Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HPC_SCHOOL_2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HPC_SCHOOL
HPC_SCHOOL_2024
Commits
ab66905e
"...servlet/src/main/java/cutout/webapi/ServletCutout.java" did not exist on "69b91ce43e0d9f974856f61d43f1fc4e80d7cb52"
Commit
ab66905e
authored
11 months ago
by
David Goz
Browse files
Options
Downloads
Patches
Plain Diff
/mpi/comp_comm/ comments global data structure
parent
5d29c556
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jacobi/mpi/comp_comm/src/jacobi_2D_mpi_comp_comm.c
+15
-17
15 additions, 17 deletions
jacobi/mpi/comp_comm/src/jacobi_2D_mpi_comp_comm.c
with
15 additions
and
17 deletions
jacobi/mpi/comp_comm/src/jacobi_2D_mpi_comp_comm.c
+
15
−
17
View file @
ab66905e
...
...
@@ -19,25 +19,25 @@ MyData **global_phi;
typedef
struct
MyGrid
{
int
local_start
[
NDIM
];
int
local_end
[
NDIM
];
int
global_start
[
NDIM
];
int
global_end
[
NDIM
];
int
dim
[
NDIM
];
int
local_start
[
NDIM
];
/* Local start index in each dimension */
int
local_end
[
NDIM
];
/* Local end index in each dimension */
int
global_start
[
NDIM
];
/* Global start index in each dimension */
int
global_end
[
NDIM
];
/* Global end index in each dimension */
int
dim
[
NDIM
];
/* Local domain size (no ghosts) */
}
myDomain
;
typedef
struct
Task_2D_Cartesian
{
int
rank
;
int
nranks
;
int
coords
[
NDIM
];
myDomain
domain
;
int
nbrtop
;
int
nbrbottom
;
int
nbrleft
;
int
nbrright
;
MPI_Comm
comm2d
;
int
rank
;
/* Local process rank */
int
nranks
;
/* Communicator size */
int
coords
[
NDIM
];
/* Cartesian topology coordinate */
myDomain
domain
;
/* MyGrid structure (defined above) */
int
nbrtop
;
/* Top neighbor process in cartesian topology */
int
nbrbottom
;
/* Bottom neighbor process in cartesian topology */
int
nbrleft
;
/* Left neighbor process in cartesian topology */
int
nbrright
;
/* Right neighbor process in cartesian topology */
MPI_Comm
comm2d
;
/* Cartesian communicator */
}
Task
;
/* function prototypes */
...
...
@@ -136,9 +136,7 @@ int main(int argc, char **argv)
/************************************************************************************************************/
/* 2D MPI-cartesian decomposition:
the grids are replicated across the MPI processes.
This approach is not the most efficient in terms of memory usage,
because the arrays are replicated across MPI process instead of to be distributed */
the grids are distributed across the MPI processes.
/* get the reminder, i.e. take into account uneven
decomposition of points among the processes */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment