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 4687 for trunk/NEMOGCM – NEMO

Changeset 4687 for trunk/NEMOGCM


Ignore:
Timestamp:
2014-06-24T17:22:03+02:00 (10 years ago)
Author:
acc
Message:

#1351 alternative loop structure to fix errors in dynspg_ts.F90 when compiling with -O3 and the ifort compiler. Without this change the AMM12 SETTE tests fail after 12 timesteps. Also included a single line efficiency change in domzgr.F90 and improvements to sette scripts and local NOCS files.

Location:
trunk/NEMOGCM
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r4624 r4687  
    14451445            DO jk = 1, jpkm1 
    14461446               IF( scobot(ji,jj) >= fsdept(ji,jj,jk) )   mbathy(ji,jj) = MAX( 2, jk ) 
    1447                IF( scobot(ji,jj) == 0._wp            )   mbathy(ji,jj) = 0 
    1448             END DO 
     1447            END DO 
     1448            IF( scobot(ji,jj) == 0._wp               )   mbathy(ji,jj) = 0 
    14491449         END DO 
    14501450      END DO 
  • trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r4624 r4687  
    290290      ! 
    291291      DO jk = 1, jpkm1 
    292 #if defined key_vectopt_loop 
    293          DO jj = 1, 1         !Vector opt. => forced unrolling 
    294             DO ji = 1, jpij 
    295 #else  
    296          DO jj = 1, jpj 
    297             DO ji = 1, jpi 
    298 #endif                                                                    
    299                zu_frc(ji,jj) = zu_frc(ji,jj) + fse3u_n(ji,jj,jk) * ua(ji,jj,jk) * umask(ji,jj,jk) 
    300                zv_frc(ji,jj) = zv_frc(ji,jj) + fse3v_n(ji,jj,jk) * va(ji,jj,jk) * vmask(ji,jj,jk)          
    301             END DO 
    302          END DO 
     292         zu_frc(:,:) = zu_frc(:,:) + fse3u_n(:,:,jk) * ua(:,:,jk) * umask(:,:,jk) 
     293         zv_frc(:,:) = zv_frc(:,:) + fse3v_n(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)          
    303294      END DO 
    304295      ! 
  • trunk/NEMOGCM/SETTE/prepare_job.sh

    r4373 r4687  
    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            ;; 
  • trunk/NEMOGCM/SETTE/sette_rpt

    r3725 r4687  
    1717  cd $NEMO_VALID 
    1818# 
    19 # The script also needs the date or revision tag. Currently this is taken from the latest sub-directory 
    20 # found in the WGYRE_LONG directory 
    21 # 
    22   set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l ` 
    23   set dorv = $dorv:t 
     19# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
     20# 
    2421# 
    2522# Now loop through all the test directories. On the second pass the user can optionally examine any mismatched 
     
    3027foreach pass (0 1 ) 
    3128  if ( -d ./WGYRE_LONG ) then 
     29    set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l ` 
     30    set dorv = $dorv:t 
    3231    set f1o = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/ocean.output 
    3332    set f1s = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/solver.stat 
     
    3938    cmp -s f1.tmp$$ $f2s 
    4039    if ( $status == 0 ) then 
    41       echo "GYRE     restartability  passed" 
    42     else 
    43       echo "GYRE     restartability  FAILED" 
     40      echo "GYRE        restartability  passed" 
     41    else 
     42      echo "GYRE        restartability  FAILED" 
    4443      if ( $pass == 1 ) then 
    4544        echo "<return> to view solver.stat differences" 
     
    5756   
    5857  if ( -d ./WORCA2LIMPIS_LONG ) then 
     58    set dorv = `ls -1rtd ./WORCA2LIMPIS_LONG/{$mach}/* | tail -1l ` 
     59    set dorv = $dorv:t 
    5960    set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output 
    6061    set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat 
     
    8485 
    8586  if ( -d ./WORCA2OFFPIS_LONG ) then 
     87    set dorv = `ls -1rtd ./WORCA2OFFPIS_LONG/{$mach}/* | tail -1l ` 
     88    set dorv = $dorv:t 
    8689    set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output 
    8790    set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat 
     
    111114   
    112115  if ( -d ./WAMM12_LONG ) then 
     116    set dorv = `ls -1rtd ./WAMM12_LONG/{$mach}/* | tail -1l ` 
     117    set dorv = $dorv:t 
    113118    set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output 
    114119    set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat 
     
    136141    rm f1.tmp$$ 
    137142  endif 
    138  
     143NEXT0: 
     144  if ( -d ./WSAS_LONG ) then 
     145    set dorv = `ls -1rtd ./WSAS_LONG/{$mach}/* | tail -1l ` 
     146    set dorv = $dorv:t 
     147    set f1o = ./WSAS_LONG/{$mach}/{$dorv}/LONG/ocean.output 
     148    set f1s = ./WSAS_LONG/{$mach}/{$dorv}/LONG/solver.stat 
     149    set f2o = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/ocean.output 
     150    set f2s = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/solver.stat 
     151 
     152    foreach f ( $f1o $f1s $f2o $f2s ) 
     153     if ( ! -f $f ) then 
     154      echo 'SAS         restartability  inconclusive ( ' $f:t ' not found )' 
     155      goto NEXT 
     156     endif 
     157    end 
     158 
     159    set nl = `wc -l $f2s` 
     160    tail -$nl[1] $f1s > f1.tmp$$ 
     161    cmp -s f1.tmp$$ $f2s 
     162    if ( $status == 0 ) then 
     163      echo "SAS         restartability  passed" 
     164    else 
     165      echo "SAS         restartability  FAILED" 
     166      if ( $pass == 1 ) then 
     167        echo "<return> to view solver.stat differences" 
     168        set y = $< 
     169        sdiff f1.tmp$$ $f2s 
     170        echo "<return> to view ocean.output differences" 
     171        set y = $< 
     172        sdiff $f1o $f2o | grep "|" 
     173        echo "<return> to continue" 
     174        set y = $< 
     175      endif 
     176    endif 
     177    rm f1.tmp$$ 
     178  endif 
     179 
     180NEXT: 
    139181echo 
    140182   
    141183  if ( -d ./WGYRE_4 ) then 
     184    set dorv = `ls -1rtd ./WGYRE_4/{$mach}/* | tail -1l ` 
     185    set dorv = $dorv:t 
    142186    set f1o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output 
    143187    set f1s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat 
     
    147191    cmp -s $f1s $f2s 
    148192    if ( $status == 0 ) then 
    149       echo "GYRE     reproducibility passed" 
    150     else 
    151       echo "GYRE     reproducibility FAILED" 
     193      echo "GYRE        reproducibility passed" 
     194    else 
     195      echo "GYRE        reproducibility FAILED" 
    152196      if ( $pass == 1 ) then 
    153197        echo "<return> to view solver.stat differences" 
     
    164208   
    165209  if ( -d ./WORCA2LIMPIS_16 ) then 
     210    set dorv = `ls -1rtd ./WORCA2LIMPIS_16/{$mach}/* | tail -1l ` 
     211    set dorv = $dorv:t 
    166212    set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output 
    167213    set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat 
     
    188234 
    189235  if ( -d ./WORCA2OFFPIS_16 ) then 
     236    set dorv = `ls -1rtd ./WORCA2OFFPIS_16/{$mach}/* | tail -1l ` 
     237    set dorv = $dorv:t 
    190238    set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output 
    191239    set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat 
     
    212260   
    213261  if ( -d ./WAMM12_32 ) then 
     262    set dorv = `ls -1rtd ./WAMM12_32/{$mach}/* | tail -1l ` 
     263    set dorv = $dorv:t 
    214264    set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output 
    215265    set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat 
     
    235285  endif 
    236286 
     287  if ( -d ./WSAS_32 ) then 
     288    set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l ` 
     289    set dorv = $dorv:t 
     290    set f1o = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output 
     291    set f1s = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat 
     292    set f2o = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output 
     293    set f2s = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat 
     294 
     295    foreach f ( $f1o $f1s $f2o $f2s ) 
     296     if ( ! -f $f ) then 
     297      echo 'SAS         reproducibility inconclusive ( ' $f:t ' not found )' 
     298      goto NEXT1 
     299     endif 
     300    end 
     301 
     302    cmp -s $f1s $f2s 
     303    if ( $status == 0 ) then 
     304      echo "SAS reproducibility passed" 
     305    else 
     306      echo "SAS reproducibility FAILED" 
     307      if ( $pass == 1 ) then 
     308        echo "<return> to view solver.stat differences" 
     309        set y = $< 
     310        sdiff $f1s $f2s 
     311        echo "<return> to view ocean.output differences" 
     312        set y = $< 
     313        sdiff $f1o $f2o | grep "|" 
     314        echo "<return> to continue" 
     315        set y = $< 
     316      endif 
     317    endif 
     318  endif 
     319NEXT1: 
     320 
    237321  if ( -d ./WORCA2AGUL_1_2 ) then 
     322    set dorv = `ls -1rtd ./WORCA2AGUL_1_2/{$mach}/* | tail -1l ` 
     323    set dorv = $dorv:t 
    238324    set f1o = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/ocean.output 
    239325    set f1s = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/solver.stat 
  • trunk/NEMOGCM/SETTE/sette_xios.sh

    r4373 r4687  
    104104CMP_NAM=${1:-$COMPILER} 
    105105# Copy job_batch_COMPILER file for specific compiler into job_batch_template 
     106#================================================================================= 
     107# Note this script sets up and submits a mixture of SPMD and MPMD jobs corresponding  
     108# to ATTACHED and DETACHED mode, XIOS jobs. In general, the launch command for these 
     109# jobs is different and is accommodated here by employing two different batch-file 
     110# templates. This script expects to find both a BATCH_TEMPLATE/batch-${COMPILER} and 
     111# a BATCH_TEMPLATE/batch-mpmd-${COMPILER} template. If your test system doesn't  
     112# require this distinction, simply make both files identical. 
     113#================================================================================= 
     114# Initially copy standard (SPMD) template for attached mode tests 
    106115cd ${SETTE_DIR} 
    107116cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
     
    124133    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_XIOS_LR -r GYRE_XIOS -j 8  
    125134    cd ${SETTE_DIR} 
    126     . param.cfg 
    127     . all_functions.sh 
    128     . prepare_exe_dir.sh 
     135    . ./param.cfg 
     136    . ./all_functions.sh 
     137    . ./prepare_exe_dir.sh 
    129138    JOB_FILE=${EXE_DIR}/run_job.sh 
    130139    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    154163    export USING_MPMD="false" 
    155164    cd ${SETTE_DIR}  
    156     . prepare_exe_dir.sh 
     165    . ./prepare_exe_dir.sh 
    157166    JOB_FILE=${EXE_DIR}/run_job.sh 
    158167    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    182191    export USING_MPMD="true" 
    183192    cd ${SETTE_DIR} 
    184     . prepare_exe_dir.sh 
     193# 
     194# Copy MPMD job_batch_COMPILER file for specific compiler into job_batch_template 
     195    cp BATCH_TEMPLATE/batch-mpmd-${COMPILER} job_batch_template || exit 
     196# 
     197    . ./prepare_exe_dir.sh 
    185198    JOB_FILE=${EXE_DIR}/run_job.sh 
    186199    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    209222    export USING_MPMD="true" 
    210223    cd ${SETTE_DIR} 
    211     . prepare_exe_dir.sh 
     224    . ./prepare_exe_dir.sh 
    212225    JOB_FILE=${EXE_DIR}/run_job.sh 
    213226    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    246259    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_XIOS_HR -r GYRE_XIOS -j 8 
    247260    cd ${SETTE_DIR} 
    248     . param.cfg 
    249     . all_functions.sh 
    250     . prepare_exe_dir.sh 
     261# 
     262# Copy SPMD job_batch_COMPILER file for specific compiler into job_batch_template 
     263    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
     264# 
     265    . ./param.cfg 
     266    . ./all_functions.sh 
     267    . ./prepare_exe_dir.sh 
     268# 
    251269    JOB_FILE=${EXE_DIR}/run_job.sh 
    252270    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    278296    export USING_MPMD="false" 
    279297    cd ${SETTE_DIR} 
    280     . prepare_exe_dir.sh 
     298# 
     299# Copy SPMD job_batch_COMPILER file for specific compiler into job_batch_template 
     300    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
     301# 
     302    . ./prepare_exe_dir.sh 
     303# 
    281304    JOB_FILE=${EXE_DIR}/run_job.sh 
    282305    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    306329    export USING_MPMD="true" 
    307330    cd ${SETTE_DIR} 
    308     . prepare_exe_dir.sh 
     331# 
     332# Copy MPMD job_batch_COMPILER file for specific compiler into job_batch_template 
     333    cp BATCH_TEMPLATE/batch-mpmd-${COMPILER} job_batch_template || exit 
     334# 
     335    . ./prepare_exe_dir.sh 
     336# 
    309337    JOB_FILE=${EXE_DIR}/run_job.sh 
    310338    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     
    334362    export USING_MPMD="true" 
    335363    cd ${SETTE_DIR} 
    336     . prepare_exe_dir.sh 
     364    . ./prepare_exe_dir.sh 
    337365    JOB_FILE=${EXE_DIR}/run_job.sh 
    338366    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
Note: See TracChangeset for help on using the changeset viewer.