Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
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
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
Antoine Cyril David Hoffmann
Gyacomo
Commits
5dfed14b
Commit
5dfed14b
authored
1 year ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
explicit array size and cleaning
parent
8551675d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/parallel_mod.F90
+11
-17
11 additions, 17 deletions
src/parallel_mod.F90
with
11 additions
and
17 deletions
src/parallel_mod.F90
+
11
−
17
View file @
5dfed14b
...
...
@@ -378,17 +378,14 @@ CONTAINS
SUBROUTINE
manual_3D_bcast
(
field_
,
n1
,
n2
,
n3
)
IMPLICIT
NONE
INTEGER
,
INTENT
(
IN
)
::
n1
,
n2
,
n3
COMPLEX
(
xp
),
DIMENSION
(
:,:,:
),
INTENT
(
INOUT
)
::
field_
COMPLEX
(
xp
),
DIMENSION
(
n1
,
n2
,
n3
),
INTENT
(
INOUT
)
::
field_
COMPLEX
(
xp
)
::
buffer
(
n1
,
n2
,
n3
)
INTEGER
::
i_
,
root
,
world_rank
,
world_size
,
count
,
i1
,
i2
,
i3
root
=
0
;
count
=
n1
*
n2
*
n3
;
CALL
MPI_COMM_RANK
(
comm_p
,
world_rank
,
ierr
)
CALL
MPI_COMM_SIZE
(
comm_p
,
world_size
,
ierr
)
IF
(
world_size
.GT.
1
)
THEN
INTEGER
::
i_
,
root
,
count
,
i1
,
i2
,
i3
root
=
0
count
=
n1
*
n2
*
n3
IF
(
num_procs_p
.GT.
1
)
THEN
!! Broadcast phi to the other processes on the same k range (communicator along p)
IF
(
world_
rank
.EQ.
root
)
THEN
IF
(
rank
_p
.EQ.
root
)
THEN
! Fill the buffer
DO
i3
=
1
,
n3
DO
i2
=
1
,
n2
...
...
@@ -399,7 +396,7 @@ CONTAINS
ENDDO
! Send it to all the other processes
DO
i_
=
0
,
num_procs_p
-1
IF
(
i_
.NE.
world_
rank
)
&
IF
(
i_
.NE.
rank
_p
)
&
CALL
MPI_SEND
(
buffer
,
count
,
mpi_xp_c
,
i_
,
0
,
comm_p
,
ierr
)
ENDDO
ELSE
...
...
@@ -422,20 +419,17 @@ CONTAINS
IMPLICIT
NONE
COMPLEX
(
xp
),
INTENT
(
INOUT
)
::
v
COMPLEX
(
xp
)
::
buffer
INTEGER
::
i_
,
root
,
world_rank
,
world_size
,
count
INTEGER
::
i_
,
root
,
count
root
=
0
;
count
=
1
;
CALL
MPI_COMM_RANK
(
comm_z
,
world_rank
,
ierr
)
CALL
MPI_COMM_SIZE
(
comm_z
,
world_size
,
ierr
)
IF
(
world_size
.GT.
1
)
THEN
IF
(
num_procs_z
.GT.
1
)
THEN
!! Broadcast phi to the other processes on the same k range (communicator along p)
IF
(
world_
rank
.EQ.
root
)
THEN
IF
(
rank
_z
.EQ.
root
)
THEN
! Fill the buffer
buffer
=
v
! Send it to all the other processes
DO
i_
=
0
,
num_procs_z
-1
IF
(
i_
.NE.
world_
rank
)
&
IF
(
i_
.NE.
rank
_z
)
&
CALL
MPI_SEND
(
buffer
,
count
,
mpi_xp_c
,
i_
,
0
,
comm_z
,
ierr
)
ENDDO
ELSE
...
...
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