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
c53a7c34
Commit
c53a7c34
authored
6 months ago
by
David Goz
Browse files
Options
Downloads
Patches
Plain Diff
mpi/miscellaneous/cartesian.cpp bugfix
parent
39c018b4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jacobi/mpi/miscellaneous/cartesian.cpp
+3
-3
3 additions, 3 deletions
jacobi/mpi/miscellaneous/cartesian.cpp
with
3 additions
and
3 deletions
jacobi/mpi/miscellaneous/cartesian.cpp
+
3
−
3
View file @
c53a7c34
...
...
@@ -14,7 +14,7 @@ int main(int argc, char **argv)
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
ntasks
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
task
);
if
(
argc
<
1
)
if
(
argc
<
=
1
)
{
if
(
!
task
)
{
...
...
@@ -23,7 +23,7 @@ int main(int argc, char **argv)
exit
(
EXIT_FAILURE
);
}
}
const
int
cartesian_grid_x
=
(
int
)
strtol
(
argv
[
1
],
NULL
,
10
);
const
int
cartesian_grid_y
=
((
ntasks
%
cartesian_grid_x
==
0
)
?
(
ntasks
/
cartesian_grid_x
)
:
-
1
);
if
(
cartesian_grid_y
==
-
1
)
...
...
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
cout
<<
endl
;
}
}
MPI_Comm_free
(
&
comm2d
);
MPI_Finalize
();
...
...
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