New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 8279 for branches/2017/wrk_OMP_test_for_Silvia/NEMOGCM/SETTE/sette.sh – NEMO

Ignore:
Timestamp:
2017-07-04T17:46:48+02:00 (7 years ago)
Author:
mocavero
Message:

Implementation of OMP coarse-grained parallelization on ZDF new package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/wrk_OMP_test_for_Silvia/NEMOGCM/SETTE/sette.sh

    r8055 r8279  
    3636#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers 
    3737#                      "no"  to run in SPMD (attached) mode without separate IO servers  
     38# USING_OMP         : flag to control the use of OpenMP parallelization 
    3839# NUM_XIOSERVERS    : number of stand-alone IO servers to employ 
    3940#                     set to zero if USING_MPMD="no" 
     
    8889# 
    8990# Compiler among those in NEMOGCM/ARCH 
    90 COMPILER=X64_ADA 
    91  
    92 export BATCH_COMMAND_PAR="llsubmit" 
     91# 
     92COMPILER=ifort_athena_xios_omp 
     93 
     94export BATCH_COMMAND_PAR="bsub < " 
    9395export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR 
    9496export INTERACT_FLAG="no" 
    9597export MPIRUN_FLAG="yes" 
    9698export USING_XIOS="yes" 
     99export USING_OMP="yes" 
    97100# 
    98101export DEL_KEYS="key_iomput" 
     
    119122   echo "Incompatible choices. MPMD mode requires the XIOS server" 
    120123   exit 
     124fi 
     125# 
     126# Settings which control the hybrid parallel execution 
     127# 
     128OMP_NTHR=1 
     129ADD_OMP_KEY="" 
     130if [ ${USING_OMP} == "yes" ] 
     131 then 
     132   OMP_NTHR=4 
     133   ADD_OMP_KEY="key_omp" 
    121134fi 
    122135 
     
    152165    export TEST_NAME="LONG" 
    153166    cd ${CONFIG_DIR0} 
    154     . ./makenemo -m ${CMP_NAM} -n GYREPIS_LONG -r GYRE_PISCES -j 8 del_key ${DEL_KEYS} 
     167    if [ ${USING_OMP} == "yes" ] 
     168    then 
     169       . ./makenemo -m ${CMP_NAM} -n GYREPIS_LONG_omp -r GYRE_PISCES -j 8 add_key ${ADD_OMP_KEY} del_key ${DEL_KEYS} 
     170    else 
     171       . ./makenemo -m ${CMP_NAM} -n GYREPIS_LONG_mpi -r GYRE_PISCES -j 8 del_key ${DEL_KEYS} 
     172    fi 
    155173    cd ${SETTE_DIR} 
    156174    . ./param.cfg 
     
    161179    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    162180    cd ${EXE_DIR}   
     181    set_namelist namelist_cfg nn_GYRE 12 
     182    set_namelist namelist_cfg ln_bench .true. 
    163183    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\" 
    164184    set_namelist namelist_cfg nn_it000 1 
     
    169189    set_namelist namelist_cfg ln_read_cfg .false. 
    170190    set_namelist namelist_cfg nn_fwb 0 
    171     set_namelist namelist_cfg jpni 4 
    172     set_namelist namelist_cfg jpnj 8 
    173     set_namelist namelist_cfg jpnij 32 
    174     if [ ${USING_MPMD} == "yes" ] ; then 
    175        set_xio_using_server iodef.xml true 
    176     else 
    177        set_xio_using_server iodef.xml false 
    178     fi 
    179     cd ${SETTE_DIR} 
    180     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     191    set_namelist namelist_cfg jpni 8 
     192    set_namelist namelist_cfg jpnj 4 
     193    set_namelist namelist_cfg jpnij 32 
     194    set_namelist namelist_cfg jtni 2      # to be set when using OpenMP 
     195    if [ ${USING_MPMD} == "yes" ] ; then 
     196       set_xio_using_server iodef.xml true 
     197    else 
     198       set_xio_using_server iodef.xml false 
     199    fi 
     200    cd ${SETTE_DIR} 
     201    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${OMP_NTHR} 
    181202 
    182203    cd ${SETTE_DIR} 
     
    184205    . ./prepare_exe_dir.sh 
    185206    cd ${EXE_DIR} 
     207    set_namelist namelist_cfg nn_GYRE 12 
     208    set_namelist namelist_cfg ln_bench .true. 
    186209    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\" 
    187210    set_namelist namelist_cfg nn_it000 61 
     
    194217    set_namelist namelist_cfg ln_read_cfg .false. 
    195218    set_namelist namelist_cfg nn_fwb 0 
    196     set_namelist namelist_cfg jpni 4 
    197     set_namelist namelist_cfg jpnj 8 
    198     set_namelist namelist_cfg jpnij 32 
     219    set_namelist namelist_cfg jpni 8 
     220    set_namelist namelist_cfg jpnj 4 
     221    set_namelist namelist_cfg jpnij 32 
     222    set_namelist namelist_cfg jtni 2      # to be set when using OpenMP 
    199223    set_namelist namelist_top_cfg ln_rsttr .true. 
    200224    set_namelist namelist_top_cfg nn_rsttr 2 
     
    218242    fi 
    219243    cd ${SETTE_DIR} 
    220     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     244    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${OMP_NTHR} 
    221245    cd ${SETTE_DIR} 
    222246    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    227251    export TEST_NAME="REPRO_4_8" 
    228252    cd ${CONFIG_DIR0} 
    229     . ./makenemo -m ${CMP_NAM} -n GYREPIS_32 -r GYRE_PISCES -j 8 del_key ${DEL_KEYS} 
    230     cd ${SETTE_DIR} 
    231     . ./param.cfg 
    232     . ./all_functions.sh 
    233     . ./prepare_exe_dir.sh 
    234     JOB_FILE=${EXE_DIR}/run_job.sh 
    235     NPROC=32 
    236     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    237     cd ${EXE_DIR} 
     253    if [ ${USING_OMP} == "yes" ] 
     254    then 
     255       . ./makenemo -m ${CMP_NAM} -n GYREPIS_32_omp -r GYRE_PISCES -j 8 add_key ${ADD_OMP_KEY} del_key ${DEL_KEYS} 
     256    else 
     257       . ./makenemo -m ${CMP_NAM} -n GYREPIS_32_mpi -r GYRE_PISCES -j 8 del_key ${DEL_KEYS} 
     258    fi 
     259    cd ${SETTE_DIR} 
     260    . ./param.cfg 
     261    . ./all_functions.sh 
     262    . ./prepare_exe_dir.sh 
     263    JOB_FILE=${EXE_DIR}/run_job.sh 
     264    NPROC=32 
     265    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     266    cd ${EXE_DIR} 
     267    set_namelist namelist_cfg nn_GYRE 12 
     268    set_namelist namelist_cfg ln_bench .true. 
    238269    set_namelist namelist_cfg cn_exp \"GYREPIS_48\" 
    239270    set_namelist namelist_cfg nn_it000 1 
     
    247278    set_namelist namelist_cfg jpnj 8 
    248279    set_namelist namelist_cfg jpnij 32 
    249     if [ ${USING_MPMD} == "yes" ] ; then 
    250        set_xio_using_server iodef.xml true 
    251     else 
    252        set_xio_using_server iodef.xml false 
    253     fi 
    254     cd ${SETTE_DIR} 
    255     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     280    set_namelist namelist_cfg jtni 2      # to be set when using OpenMP 
     281    if [ ${USING_MPMD} == "yes" ] ; then 
     282       set_xio_using_server iodef.xml true 
     283    else 
     284       set_xio_using_server iodef.xml false 
     285    fi 
     286    cd ${SETTE_DIR} 
     287    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${OMP_NTHR} 
    256288    cd ${SETTE_DIR} 
    257289    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    264296    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    265297    cd ${EXE_DIR} 
     298    set_namelist namelist_cfg nn_GYRE 12 
     299    set_namelist namelist_cfg ln_bench .true. 
    266300    set_namelist namelist_cfg cn_exp \"GYREPIS_84\" 
    267301    set_namelist namelist_cfg nn_it000 1 
     
    275309    set_namelist namelist_cfg jpnj 4 
    276310    set_namelist namelist_cfg jpnij 32 
    277     if [ ${USING_MPMD} == "yes" ] ; then 
    278        set_xio_using_server iodef.xml true 
    279     else 
    280        set_xio_using_server iodef.xml false 
    281     fi 
    282     cd ${SETTE_DIR} 
    283     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     311    set_namelist namelist_cfg jtni 2      # to be set when using OpenMP 
     312    if [ ${USING_MPMD} == "yes" ] ; then 
     313       set_xio_using_server iodef.xml true 
     314    else 
     315       set_xio_using_server iodef.xml false 
     316    fi 
     317    cd ${SETTE_DIR} 
     318    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} ${OMP_NTHR} 
    284319    cd ${SETTE_DIR} 
    285320    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
Note: See TracChangeset for help on using the changeset viewer.