variable tile seems to always be 0, how the mpi really runs?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
chimera.u
Posts: 4
Joined: Mon Nov 10, 2008 8:44 pm
Location: IOCAS, TAMU

variable tile seems to always be 0, how the mpi really runs?

#1 Unread post by chimera.u »

!$OMP PARALLEL DO PRIVATE(thread,subs,tile) SHARED(ng,numthreads)
DO thread=0,numthreads-1
subs=NtileX(ng)*NtileE(ng)/numthreads
DO tile=subs*(thread+1)-1,subs*thread,-1
CALL step3d_uv (ng, TILE)
END DO
END DO
!$OMP END PARALLEL DO

codes like that, in define distribute situation, NtileX=NtileE=1, numthreads=1, subs=1, thread=0,
it seems that tile always equals 0, so what the multiple processes really runs?
is there any different between the lowercase tile and the Capital TILE?
in the get_grid.F, tile=myrank, it looks like reasonable if tile relates to myrank when call for subroutines, but tile is always a local var...

could somebody introduce something about this?

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: variable tile seems to always be 0, how the mpi really runs?

#2 Unread post by kate »

From globaldefs.h:

Code: Select all

#ifdef DISTRIBUTE
# define TILE MyRank
#else
# define TILE tile
#endif
So, yes, it is case sensitive in this circumstance because the C preprocessor is.

chimera.u
Posts: 4
Joined: Mon Nov 10, 2008 8:44 pm
Location: IOCAS, TAMU

Re: variable tile seems to always be 0, how the mpi really runs?

#3 Unread post by chimera.u »

Thanks, really helpful!

Post Reply