Skip to content

Commit 169b4f7

Browse files
authored
Merge pull request #1783 from eyalshimony/devel
Correct num_device value in initialize_GPU
2 parents 8f39006 + b4a8a95 commit 169b4f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/specfem3D/initialize_simulation.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ subroutine initialize_GPU()
583583

584584
if (NPROC == 1 .and. NUMBER_OF_SIMULTANEOUS_RUNS > 1 ) then
585585
num_device = mygroup
586+
else if (NPROC > 1 .and. NUMBER_OF_SIMULTANEOUS_RUNS > 1 ) then
587+
num_device = myrank + mygroup * NPROC
586588
else
587589
num_device = myrank
588590
endif

0 commit comments

Comments
 (0)