Ignore:
Timestamp:
07/05/17 20:18:51 (7 years ago)
Author:
sdipsl
Message:

CMIP6 workflow. Merging trunk into branch 'branch' r:1375:1398

Location:
tags/libIGCM_v3.0_beta1/libIGCM_sys
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys.ksh

    r1314 r1399  
    5252case $( hostname -s ) in 
    5353    ada*) 
    54         [ ! X${TaskType} = Xchecking ] && echo "sys source ada Intel X-64 lib." 
     54        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ada Intel X-64." 
    5555        CENTER=IDRIS 
    5656        SYSTEM=ada 
    5757        . ${libIGCM}/libIGCM_sys/libIGCM_sys_ada.ksh;; 
    5858    curie*) 
    59         [ ! X${TaskType} = Xchecking ] && echo "sys source curie Intel X-64 lib." 
     59        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for curie Intel X-64." 
    6060        CENTER=TGCC 
    6161        SYSTEM=curie 
    6262        . ${libIGCM}/libIGCM_sys/libIGCM_sys_curie.ksh;; 
    6363    airain*) 
    64         [ ! X${TaskType} = Xchecking ] && echo "sys source airain Intel X-64 lib." 
     64        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for airain Intel X-64." 
    6565        CENTER=TGCC 
    6666        SYSTEM=curie 
    6767        . ${libIGCM}/libIGCM_sys/libIGCM_sys_curie.ksh;; 
    6868    asterix*|obelix*) 
    69         [ ! X${TaskType} = Xchecking ] && echo "sys source obelix or asterix lib." 
     69        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for obelix or asterix." 
    7070        CENTER=LSCE 
    7171        SYSTEM=lxiv8 
    7272        . ${libIGCM}/libIGCM_sys/libIGCM_sys_obelix.ksh;; 
    7373    ciclad*) 
    74         [ ! X${TaskType} = Xchecking ] && echo "sys source ciclad lib for running at ciclad." 
     74        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ciclad for running at ciclad." 
    7575        CENTER=IPSL-ciclad 
    7676        SYSTEM=ifort_CICLAD 
    7777        . ${libIGCM}/libIGCM_sys/libIGCM_sys_ciclad.ksh;; 
    7878    camelot*|loholt1*|loholt2*|merlin*) 
    79         [ ! X${TaskType} = Xchecking ] && echo "sys source ciclad lib for running at climserv." 
     79        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for ciclad for running at climserv." 
    8080        CENTER=IPSL-climserv 
    8181        SYSTEM=ifort_CICLAD 
    8282        . ${libIGCM}/libIGCM_sys/libIGCM_sys_ciclad.ksh;; 
    8383    iitm*) 
    84         [ ! X${TaskType} = Xchecking ] && echo "sys source iitm lib." 
     84        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for iitm." 
    8585        CENTER=IITM 
    8686        SYSTEM=iitm 
    8787        . ${libIGCM}/libIGCM_sys/libIGCM_sys_iitm.ksh;; 
    8888    *) 
    89         [ ! X${TaskType} = Xchecking ] && echo "sys source default lib." 
     89        [ ! X${TaskType} = Xchecking ] && echo "Source machine dependent settings for a default machine." 
    9090        CENTER=DEFAULT 
    9191        SYSTEM=default 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_ada.ksh

    r1362 r1399  
    807807 
    808808  IGCM_debug_PopStack "IGCM_sys_GetDate_Monitoring" 
     809} 
     810 
     811#D-#================================================== 
     812#D-function IGCM_sys_Dods_Rm 
     813#D-* Purpose: DO NOTHING ! Put ${ARCHIVE} files on DODS internet protocole. 
     814#D-* Examples: 
     815#D- 
     816function IGCM_sys_Dods_Rm { 
     817  if ( $DEBUG_sys ) ; then 
     818    echo "IGCM_sys_Dods_Rm :" $@ 
     819  fi 
     820 
     821  typeset status 
     822  if [ $DRYRUN = 0 ]; then 
     823    if [ "$#" -eq 1 ]; then 
     824      rsh ${STOREHOST} exec /bin/ksh <<EOF 
     825          cd ${R_SAVE} 
     826          /arch/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS}/${1} > /dev/null 2>&1 
     827EOF 
     828      status=$? 
     829    else 
     830      rsh ${STOREHOST} exec /bin/ksh <<EOF 
     831          cd ${R_SAVE} 
     832          /arch/local/bin/dods_rm DODS/pub/${LOGIN}/${R_DODS} > /dev/null 2>&1 
     833EOF 
     834      status=$? 
     835    fi 
     836  fi 
     837 
     838  return ${status} 
     839} 
     840 
     841#D-#================================================== 
     842#D-function IGCM_sys_Dods_Cp 
     843#D-* Purpose: Copy $(ARCHIVE) files on DODS internet protocole. 
     844#D-* Examples: 
     845#D- 
     846function IGCM_sys_Dods_Cp { 
     847  if ( $DEBUG_sys ) ; then 
     848    echo "IGCM_sys_Dods_Cp :" $@ 
     849  fi 
     850  return 0 
    809851} 
    810852 
     
    15461588} 
    15471589 
     1590#D-#================================================== 
     1591#D-function IGCM_sys_rebuild_nemo 
     1592#D-* Purpose: rebuild nemo parallel files with general rebuild 
     1593#D-* Examples: 
     1594#D- 
     1595 
     1596function IGCM_sys_rebuild_nemo { 
     1597  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1598  if ( $DEBUG_sys ) ; then 
     1599    echo "IGCM_sys_rebuild_nemo :" $@ 
     1600  fi 
     1601 
     1602  nemo_generic_restart_file_name_out=${1} 
     1603  nemo_extension_out=${3} 
     1604  shift ; shift ; shift 
     1605 
     1606  IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 
     1607 
     1608  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1609} 
     1610 
     1611 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_ciclad.ksh

    r1358 r1399  
    12331233} 
    12341234 
     1235#D-#================================================== 
     1236#D-function IGCM_sys_rebuild_nemo 
     1237#D-* Purpose: rebuild nemo parallel files with general rebuild 
     1238#D-* Examples: 
     1239#D- 
     1240 
     1241function IGCM_sys_rebuild_nemo { 
     1242  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1243  if ( $DEBUG_sys ) ; then 
     1244    echo "IGCM_sys_rebuild_nemo :" $@ 
     1245  fi 
     1246 
     1247  nemo_generic_restart_file_name_out=${1} 
     1248  nemo_extension_out=${3} 
     1249  shift ; shift ; shift 
     1250 
     1251  IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 
     1252 
     1253  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1254} 
     1255 
     1256 
     1257 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_curie.ksh

    r1364 r1399  
    178178#==================================================== 
    179179#- HOST_MPIRUN_COMMAND 
    180 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="/usr/bin/time ccc_mprun -E-K1"} 
     180typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="/usr/bin/time ccc_mprun -E-K1 "} 
    181181 
    182182#==================================================== 
     
    922922#    fi 
    923923 
    924     /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
    925     status=$? 
     924    if [ "$#" -eq 1 ]; then 
     925      /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
     926      status=$? 
     927    else 
     928      /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS} # > out_dods_rm 2>&1 
     929      status=$? 
     930    fi 
    926931 
    927932#    if [ ${status} -gt 0 ] ; then 
     
    11111116 
    11121117  elif [ ${executionType} -eq 2 ] ; then 
    1113     # MPMD + MPI + OMP 
    1114     sed -e "/::openMPthreads::/d"                  \ 
    1115         -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
    1116       ${file} > ${file}.tmp 
    1117  
     1118    # MPMD + MPI + OMP : mpirun/ccc_mprun/error 
     1119    if ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "X" ] || [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xmpirun" ] ) ; then 
     1120      sed -e "/::openMPthreads::/d"                  \ 
     1121          -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
     1122        ${file} > ${file}.tmp 
     1123    elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xccc_mprun" ] ) ; then 
     1124      sed -e "/::openMPthreads::/d"                  \ 
     1125          -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
     1126          -e "/--cpu_bind=none/d"                    \ 
     1127        ${file} > ${file}.tmp 
     1128    else 
     1129     IGCM_debug_Print 1 "You have to set ExecutionModeOnCurie=ccc_mprun or mpirun in config.card" 
     1130     IGCM_debug_Exit "IGCM_sys_updateHeaders" 
     1131    fi 
    11181132  elif [ ${executionType} -eq 3 ] ; then 
    11191133    # SPMD + MPI/OMP 
     
    11841198  EXECUTION=${HOST_MPIRUN_COMMAND} 
    11851199 
    1186   # MPMD mode 
    11871200  if ( ${OK_PARA_MPMD} ) ; then 
    11881201 
    1189     # Only MPI (MPMD) 
     1202    # MPMD mode 
     1203    # 1 MPI only 
     1204    # 2 MPI/OpenMP mpirun method 
     1205    # 3 MPI/OpenMP ccc_mprun method 
     1206 
     1207    if [ -f run_file ] ; then 
     1208      IGCM_sys_Rm -f run_file 
     1209    fi 
     1210    touch run_file 
     1211 
     1212    # case 1 : Only MPI (MPMD) 
    11901213    if  ( ! ${OK_PARA_OMP} ) ; then 
    1191  
    1192       if [ -f run_file ] ; then 
    1193         IGCM_sys_Rm -f run_file 
    1194       fi 
    1195       touch run_file 
    11961214 
    11971215      # Build run_file 
     
    12361254      fi 
    12371255 
    1238     # MPI-OpenMP (MPMD) 
    1239     else 
     1256    elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "X" ] || [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xmpirun" ] ) ; then 
     1257 
     1258    # 2 MPI/OpenMP mpirun method 
    12401259 
    12411260      # Use of mpirun instead of ccc_mprun 
     
    13091328 
    13101329          #echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
    1311           echo "(( MYMPIRANK = OMPI_COMM_WORLD_RANK )) " >> script_${ExeNameOut}.ksh 
    1312           echo "MYMPIRANK=\$(printf '%3.3d\n' \${MYMPIRANK})" >> script_${ExeNameOut}.ksh 
    1313           echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${MYMPIRANK} 2>out_${ExeNameOut}.err.\${MYMPIRANK}" >> script_${ExeNameOut}.ksh 
    1314           IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
     1330          echo "(( MYMPIRANK = OMPI_COMM_WORLD_RANK )) " >> script_${ExeNameOut}.ksh 
     1331          echo "MYMPIRANK=\$(printf '%3.3d\n' \${MYMPIRANK})" >> script_${ExeNameOut}.ksh 
     1332          echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${MYMPIRANK} 2>out_${ExeNameOut}.err.\${MYMPIRANK}" >> script_${ExeNameOut}.ksh 
     1333          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    13151334 
    13161335          if [ ${init_exec} = y ] ; then 
     
    13521371        fi 
    13531372      done 
    1354     fi 
    1355  
     1373 
     1374    elif ( [ "X${config_UserChoices_ExecutionModeOnCurie}" = "Xccc_mprun" ] ) ; then 
     1375 
     1376    # 3 MPI/OpenMP ccc_mprun method 
     1377 
     1378    # MPI-OpenMP (MPMD) 
     1379    # example of run_file 
     1380    # 71-8 env OMP_NUM_THREADS=8 ./script_lmdz.x.ksh 
     1381    # 480-1 env OMP_NUM_THREADS=1 ./script_opa.xx.ksh 
     1382    # 1-1 env OMP_NUM_THREADS=1 ./script_xios.x.ksh 
     1383 
     1384      # Loop on the components 
     1385      for comp in ${config_ListOfComponents[*]} ; do 
     1386 
     1387        eval ExeNameIn=\${config_Executable_${comp}[0]} 
     1388        eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1389 
     1390        # Not possible if oasis has an executable (i.e old version of oasis3) 
     1391        if ( [ "X${ExeNameOut}" != X\"\" ] &&  [ "X${comp}" = "XCPL" ] ) ; then 
     1392          IGCM_debug_Exit "ERROR MPMD with hybrid MPI-OpenMP is not available with oasis3 version" 
     1393          IGCM_debug_Print 2 "Only available with oasis3-MCT version coupler" 
     1394          IGCM_debug_Verif_Exit 
     1395        fi 
     1396 
     1397        # Only if we really have an executable for the component : 
     1398        if [ "X${ExeNameOut}" != X\"\" ] ; then 
     1399 
     1400          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1401          eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
     1402 
     1403          # Build script files 
     1404 
     1405          echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
     1406          echo ""  >> script_${ExeNameOut}.ksh 
     1407          if [ ${comp_proc_omp_loc} -gt 1 ] ; then 
     1408 
     1409            # Check if the number of threads is correct 
     1410            case ${comp_proc_omp_loc} in 
     1411            2|4|8|16) 
     1412              IGCM_debug_Print 1 "You run ${ExeNameOut} on ${comp_proc_omp_loc} OMP threads" 
     1413              ;; 
     1414            *) 
     1415              IGCM_debug_Exit "ERROR with OMP parameters !" 
     1416              IGCM_debug_Print 2 "${comp_proc_omp_loc} is not possible as number of OMP threads" 
     1417              IGCM_debug_Print 2 "Only 2,4,8,16 as number of OMP threads are possible " 
     1418              IGCM_debug_Verif_Exit 
     1419              ;; 
     1420            esac 
     1421            ### only for LMDZ? 
     1422            echo "export KMP_STACKSIZE=3g"  >> script_${ExeNameOut}.ksh 
     1423            echo "export KMP_LIBRARY=turnaround"  >> script_${ExeNameOut}.ksh 
     1424            echo "export MKL_SERIAL=YES"  >> script_${ExeNameOut}.ksh 
     1425            echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
     1426 
     1427          fi 
     1428 
     1429          # to have out/err per process on different files 
     1430          echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${SLURM_PROCID} 2>out_${ExeNameOut}.err.\${SLURM_PROCID}" >> script_${ExeNameOut}.ksh 
     1431          #echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
     1432 
     1433          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
     1434 
     1435          # Complete run_file 
     1436 
     1437          echo "${comp_proc_mpi_loc}-${comp_proc_omp_loc} env OMP_NUM_THREADS=${comp_proc_omp_loc} ./script_${ExeNameOut}.ksh " >>run_file 
     1438 
     1439        fi 
     1440      done 
     1441 
     1442      ## variable added to stop after 60s instead of 600s by default.  
     1443      ## This is used when no error comes from executables and when something stopped an executable without notice.  
     1444      export SLURM_WAIT=60 
     1445 
     1446      ## module advised by TGCC (instead of 2 variables) 
     1447      module load feature/bridge/heterogenous_mpmd 
     1448 
     1449      # set EXECUTION for ccc_mprun case (similar to #1 : MPI only MPMD method)  
     1450 
     1451      EXECUTION="${HOST_MPIRUN_COMMAND} -f ./run_file" 
     1452 
     1453      IGCM_sys_Chmod u+x run_file 
     1454      if ( $DEBUG_sys ) ; then 
     1455        echo "run_file contains : " 
     1456        cat run_file 
     1457      fi 
     1458 
     1459    else 
     1460 
     1461      IGCM_debug_Print 1 "sys Curie :  choose mpirun or ccc_mprun in config.card for ExecutionModeOnCurie" 
     1462 
     1463    fi # 1 2 or 3 if ${OK_PARA_MPMD} 
     1464 
     1465  else 
    13561466  # Only one executable (SPMD mode). 
    1357   else 
    13581467 
    13591468    for comp in ${config_ListOfComponents[*]} ; do 
     
    13621471      eval ExeNameOut=\${config_Executable_${comp}[1]} 
    13631472      if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 
     1473 
     1474        # Build script files 
    13641475 
    13651476        echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
     
    13981509    done 
    13991510 
    1400   fi 
     1511  fi # ${OK_PARA_MPMD} 
    14011512 
    14021513  IGCM_debug_Print 1 "sys Curie : execution command is " 
     
    16891800} 
    16901801 
     1802#D-#================================================== 
     1803#D-function IGCM_sys_rebuild_nemo 
     1804#D-* Purpose: rebuild nemo parallel files with nemo specific rebuild on curie 
     1805#D-* Examples: 
     1806#D- 
     1807 
     1808function IGCM_sys_rebuild_nemo { 
     1809  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1810  if ( $DEBUG_sys ) ; then 
     1811    echo "IGCM_sys_rebuild_nemo :" $@ 
     1812  fi 
     1813 
     1814  $( ccc_home -u p86ipsl )/REBUILD_NEMO/rebuild_nemo ${1} ${2} 
     1815 
     1816  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1817} 
     1818 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_default.ksh

    r1318 r1399  
    11721172} 
    11731173 
     1174#D-#================================================== 
     1175#D-function IGCM_sys_rebuild_nemo 
     1176#D-* Purpose: rebuild nemo parallel files with general rebuild 
     1177#D-* Examples: 
     1178#D- 
     1179 
     1180function IGCM_sys_rebuild_nemo { 
     1181  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1182  if ( $DEBUG_sys ) ; then 
     1183    echo "IGCM_sys_rebuild_nemo :" $@ 
     1184  fi 
     1185 
     1186  nemo_generic_restart_file_name_out=${1} 
     1187  nemo_extension_out=${3} 
     1188  shift ; shift ; shift 
     1189 
     1190  IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 
     1191 
     1192  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1193} 
     1194 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_iitm.ksh

    r1244 r1399  
    10301030  IGCM_debug_PopStack "IGCM_sys_CountJobInQueue" 
    10311031} 
     1032 
     1033#D-#================================================== 
     1034#D-function IGCM_sys_rebuild_nemo 
     1035#D-* Purpose: rebuild nemo parallel files with general rebuild 
     1036#D-* Examples: 
     1037#D- 
     1038 
     1039function IGCM_sys_rebuild_nemo { 
     1040  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1041  if ( $DEBUG_sys ) ; then 
     1042    echo "IGCM_sys_rebuild_nemo :" $@ 
     1043  fi 
     1044 
     1045  nemo_generic_restart_file_name_out=${1} 
     1046  nemo_extension_out=${3} 
     1047  shift ; shift ; shift 
     1048 
     1049  IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 
     1050 
     1051  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1052} 
     1053 
     1054 
  • tags/libIGCM_v3.0_beta1/libIGCM_sys/libIGCM_sys_obelix.ksh

    r1360 r1399  
    11951195} 
    11961196 
     1197 
     1198#D-#================================================== 
     1199#D-function IGCM_sys_rebuild_nemo 
     1200#D-* Purpose: rebuild nemo parallel files with general rebuild 
     1201#D-* Examples: 
     1202#D- 
     1203 
     1204function IGCM_sys_rebuild_nemo { 
     1205  IGCM_debug_PushStack "IGCM_sys_rebuild_nemo" $@ 
     1206  if ( $DEBUG_sys ) ; then 
     1207    echo "IGCM_sys_rebuild_nemo :" $@ 
     1208  fi 
     1209 
     1210  nemo_generic_restart_file_name_out=${1} 
     1211  nemo_extension_out=${3} 
     1212  shift ; shift ; shift 
     1213 
     1214  IGCM_sys_rebuild -o ${nemo_generic_restart_file_name_out}.${nemo_extension_out} $@ 
     1215 
     1216  IGCM_debug_PopStack "IGCM_sys_rebuild_nemo" 
     1217} 
     1218 
Note: See TracChangeset for help on using the changeset viewer.