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 5965 for branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION/NEMOGCM/SETTE/prepare_job.sh – NEMO

Ignore:
Timestamp:
2015-12-01T16:35:30+01:00 (8 years ago)
Author:
timgraham
Message:

Upgraded branch to r5518 of trunk (v3.6 stable revision)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.5_SST_BIAS_CORRECTION/NEMOGCM/SETTE/prepare_job.sh

    r4373 r5965  
    182182fi 
    183183 
    184 # example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
     184# example for NOCS ClusterVision system using SLURM batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
    185185# 
    186186  #  if [ ${MPI_FLAG} == "no" ] ; then 
    187187      case ${COMPILER} in  
    188          ALTIX_NAUTILUS_MPT) 
    189                                 NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 4}') 
     188         X64_MOBILIS) 
     189                                NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 16}') 
    190190               if [ ${NB_REM} == 0 ] ; then 
    191                # number of processes required is an integer multiple of 4 
     191               # number of processes required is an integer multiple of 16 
    192192               # 
    193                NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 4}') 
     193               NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 16}') 
    194194            else 
    195195               # 
    196                # number of processes required is not an integer multiple of 4 
     196               # number of processes required is not an integer multiple of 16 
    197197               # round up the number of nodes required. 
    198198               # 
    199                NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1 + $2 ) / 4 + 1 )}') 
     199               NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1 + $2 ) / 16 + 1 )}') 
    200200                  fi 
    201201            ;; 
     202                        XC_ARCHER_INTEL) 
     203                                # ocean cores are packed 24 to a node 
     204                                NB_REM=$( echo $NB_PROC | awk '{print ( $1 % 24 ) }') 
     205                                if [ ${NB_REM} == 0 ] ; then 
     206                                        # number of processes required is an integer multiple of 24 
     207                                        # 
     208                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1) / 24}') 
     209                                else 
     210                                        # 
     211                                        # number of processes required is not an integer multiple of 24 
     212                                        # round up the number of nodes required. 
     213                                        # 
     214                                        NB_NODES=$( echo $NB_PROC | awk '{printf("%d",($1) / 24 + 1 )}') 
     215                                fi 
     216                                # xios cores are sparsely packed at 4 to a node 
     217                                # but can not share nodes with the ocean cores 
     218                                NB_REM=$( echo $NXIO_PROC | awk '{print ( $2 % 4 ) }') 
     219                                if [ ${NB_REM} == 0 ] ; then 
     220                                        # number of processes required is an integer multiple of 4                            
     221                                        # 
     222                                        NB_NODES=$( echo $NB_NODES $NXIO_PROC | awk '{print ($1 + ( $2 / 4 ))}')                     
     223                                else 
     224                                        # 
     225                                        # number of processes required is not an integer multiple of 4                              
     226                                        # round up the number of nodes required. 
     227                                        # 
     228                                        NB_NODES=$( echo $NB_NODES $NXIO_PROC | awk '{print ($1 + ( $2 / 4 ) + 1)}')  
     229                                fi 
     230                                ;; 
     231                        XC40_METO*) #Setup for Met Office XC40 with any compiler 
     232                                # ocean cores are packed 32 to a node 
     233                                # If we need more than one node then have to use parallel queue and XIOS must have a node to itself 
     234                                NB_REM=$( echo $NB_PROC | awk '{print ( $1 % 32 ) }') 
     235                                if [ ${NB_REM} == 0 ] ; then 
     236                                        # number of processes required is an integer multiple of 32 
     237                                        # 
     238                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1) / 32}') 
     239                                else 
     240                                        # 
     241                                        # number of processes required is not an integer multiple of 32 
     242                                        # round up the number of nodes required. 
     243                                        # 
     244                                        NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1) / 32 + 1 )}') 
     245                                fi 
     246                                # xios cores are sparsely packed at 4 to a node 
     247                                if [ $NXIO_PROC == 0 ] ; then 
     248                                    NB_XNODES=0 
     249                                else 
     250                                    NB_REM=$( echo $NXIO_PROC | awk '{print ( $1 % 4 ) }') 
     251                                    if [ ${NB_REM} == 0 ] ; then 
     252                                            # number of processes required is an integer multiple of 4                            
     253                                            # 
     254                                            NB_XNODES=$( echo $NXIO_PROC | awk '{print (( $1 / 4 ) + 1)}')  
     255                                    else 
     256                                            # 
     257                                            # number of processes required is not an integer multiple of 4                              
     258                                            # round up the number of nodes required. 
     259                                            # 
     260                                            NB_XNODES=$( echo $NXIO_PROC | awk '{printf("%d",($1) / 4 + 1) }')                     
     261                                    fi 
     262                                fi 
     263                                if [ ${NB_XNODES} -ge 1 ] ; then 
     264                                   NB_NODES=$((NB_NODES+NB_XNODES)) 
     265                                fi 
     266                                echo NB_XNODES=${NB_XNODES}  
     267                                echo Total NB_NODES=${NB_NODES} 
     268                                if [ ${NB_NODES} -eq 1 ] ; then 
     269                                   QUEUE=shared 
     270                                   #Not using XIOS in detatched mode and using less than one node so should be ok on shared node 
     271                                   #Load snplauncher module to allow use of mpiexec 
     272                                   SELECT="select=1:ncpus=$((NXIO_PROC + NB_PROC))":mem=15GB 
     273                                   module load cray-snplauncher 
     274                                   echo 'Shared Queue' 
     275                                else 
     276                                   QUEUE=normal 
     277                                   SELECT="select=$NB_NODES" 
     278                                   module unload cray-snplauncher #Make sure snplauncher module is not loaded 
     279                                   echo 'Normal Queue' 
     280                                fi 
     281                                ;; 
    202282                        ifort_MERCATOR_CLUSTER) 
    203283                                echo NB_PROCS ${NB_PROC} 
     
    250330                    cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" \ 
    251331                                                 -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job 
     332                    mv run_sette_test1.job run_sette_test.job 
     333                    ;; 
     334              XC40_METO*) 
     335                    cat run_sette_test.job | sed -e"s/QUEUE/${QUEUE}/" \ 
     336                                                 -e"s/SELECT/${SELECT}/" > run_sette_test1.job 
    252337                    mv run_sette_test1.job run_sette_test.job 
    253338                    ;; 
Note: See TracChangeset for help on using the changeset viewer.