1587-114 Incorrect nesting of OpenMP directives.
1587-114 Incorrect nesting of OpenMP directives.
SVN Revision: 442M. ROMS/TOMS version 3.4. The last entry in the ROMS log file is:
I am using 4 threads with 2x2 tiling. My build.bash file has:Initial basin volumes: TotVolume = 5.0360477799E+10 m3
MinVolume = -2.2072826138E+05 m3
MaxVolume = 3.3109239207E+05 m3
Max/Min = -1.5000000000E+00
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00086400)
export FORT=xlf
export USE_OpenMP=on
export USE_LARGE=on
I changed 'make' to 'gmake' in my build.bash. The environment variable OMP_NUM_THREADS=4. The other MP_ env vars are:
Setting MP_PROCS=4 causes the error message to occur only once, but does not fix the problem.be1105en$ env | grep MP_
MP_EUIDEVICE=sn_all
MP_PROCS=1
MP_WAIT_MODE=poll
MP_COREFILE_FORMAT=core_lite
MP_POLLING_INTERVAL=2000000
MP_USE_BULK_XFER=no
MP_EUILIB=us
MP_RC_USE_LMC=yes
MP_EAGER_LIMIT=10240
MP_BULK_MIN_MSG_SIZE=12k
MP_TASKS_PER_NODE=4
MP_INSTANCES=2
Here are the rules for OpenMP directive nesting:
https://computing.llnl.gov/tutorials/op ... ingNesting
I looked through the built code (especially Build/main2d.f90) and did not see any obvious violations of these rules. The problem goes away when I set my tiling to 1x1 and the environment variable
OMP_NUM_THREADS=1
but of course I want to run the model in parallel because it's faster.
Work-around:
Here is line 132 of ROMS/Nonlinear/main2d.F:
Code: Select all
!-----------------------------------------------------------------------
! If applicable, process input data: time interpolate between data
! snapshots.
!-----------------------------------------------------------------------
!
!$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,subs*(thread+1)-1,+1
CALL set_data (ng, TILE)
END DO
END DO
!$OMP END PARALLEL DO
Even with that workaround in place, the ROMS model still runs quite faster than the single-threaded version. I suspect that this is a bug, but perhaps I am not building ROMS correctly for parallel operation?
Carl