From e2ff60bafa27d0c6bba263223c2803174c33a871 Mon Sep 17 00:00:00 2001 From: Robert Grumbine Date: Fri, 25 Jul 2025 17:34:46 +0000 Subject: [PATCH 1/2] nearly running on wcoss2 --- configuration/scripts/cice.batch.csh | 11 ++++ configuration/scripts/cice.launch.csh | 8 +++ .../scripts/machines/Macros.wcoss2_intel | 58 +++++++++++++++++++ .../scripts/machines/env.wcoss2_intel | 36 ++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 configuration/scripts/machines/Macros.wcoss2_intel create mode 100644 configuration/scripts/machines/env.wcoss2_intel diff --git a/configuration/scripts/cice.batch.csh b/configuration/scripts/cice.batch.csh index c8c9ddc51..a09f021b0 100755 --- a/configuration/scripts/cice.batch.csh +++ b/configuration/scripts/cice.batch.csh @@ -467,6 +467,17 @@ cat >> ${jobfile} << EOFB #BSUB -e /u/Robert.Grumbine/${ICE_CASENAME}.err.%J EOFB +else if (${ICE_MACHINE} =~ wcoss2*) then +cat >> ${jobfile} << EOFB +#PBS -N ${ICE_CASENAME} +#PBS -o ${ICE_CASENAME} +#PBS -j oe +#PBS -A ICE-DEV +#PBS -l walltime=${batchtime} +#PBS -l select=${nnodes}:ncpus=${corespernode}:mpiprocs=${taskpernodelimit}:ompthreads=${nthrds} +EOFB + + else if (${ICE_MACHINE} =~ high_Sierra*) then cat >> ${jobfile} << EOFB # nothing to do diff --git a/configuration/scripts/cice.launch.csh b/configuration/scripts/cice.launch.csh index a2c38e597..9d3d74ab1 100755 --- a/configuration/scripts/cice.launch.csh +++ b/configuration/scripts/cice.launch.csh @@ -284,6 +284,14 @@ cat >> ${jobfile} << EOFR srun -n ${ntasks} -c ${nthrds} ./cice >&! \$ICE_RUNLOG_FILE EOFR +#======= +else if (${ICE_MACHCOMP} =~ wcoss2*) then +cat >> ${jobfile} << EOFR +mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE +#echo hello from wcoss2 >&! \$ICE_RUNLOG_FILE +#./cice >&! \$ICE_RUNLOG_FILE +EOFR + #======= else if (${ICE_MACHCOMP} =~ orion*) then cat >> ${jobfile} << EOFR diff --git a/configuration/scripts/machines/Macros.wcoss2_intel b/configuration/scripts/machines/Macros.wcoss2_intel new file mode 100644 index 000000000..3bf8c5444 --- /dev/null +++ b/configuration/scripts/machines/Macros.wcoss2_intel @@ -0,0 +1,58 @@ +#============================================================================== +# Makefile macros for NOAA wcoss2, intel compiler +#============================================================================== + +CPP := fpp +CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +#CFLAGS := -c -O2 -fp-model precise -xHost +CFLAGS := -c -O2 + +FIXEDFLAGS := -132 +FREEFLAGS := -FR +#FFLAGS := -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -align array64byte -xHost +FFLAGS := -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -align array64byte +FFLAGS_NOOPT:= -O0 + +ifeq ($(ICE_BLDDEBUG), true) + FFLAGS += -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -link_mpi=dbg +else + FFLAGS += -O2 +endif + +SCC := cc +SFC := ftn +MPICC := mpiicc +MPIFC := mpiifort + +ifeq ($(ICE_COMMDIR), mpi) + FC := $(MPIFC) + CC := $(MPICC) +else + FC := $(SFC) + CC := $(SCC) +endif +LD:= $(FC) + +NETCDF_PATH := $(NETCDF) + +PIO_CONFIG_OPTS:= --enable-filesystem-hints=gpfs + +#PNETCDF_PATH := $(PNETCDF) +#PNETCDF_PATH := /glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib + +INC_NETCDF := $(NETCDF_PATH)/include +LIB_NETCDF := $(NETCDF_PATH)/lib + +#LIB_PNETCDF := $(PNETCDF_PATH)/lib +#LIB_MPI := $(IMPILIBDIR) + +INCLDIR := $(INCLDIR) -I$(INC_NETCDF) +#SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff -L$(LIB_PNETCDF) -lpnetcdf -lgptl +SLIBS := -L$(LIB_NETCDF) -lnetcdf -lnetcdff + +ifeq ($(ICE_THREADED), true) + LDFLAGS += -qopenmp + CFLAGS += -fopenmp + FFLAGS += -qopenmp +endif + diff --git a/configuration/scripts/machines/env.wcoss2_intel b/configuration/scripts/machines/env.wcoss2_intel new file mode 100644 index 000000000..548573e5a --- /dev/null +++ b/configuration/scripts/machines/env.wcoss2_intel @@ -0,0 +1,36 @@ +#!/bin/csh -f + +set inp = "undefined" +if ($#argv == 1) then + set inp = $1 +endif + +if ("$inp" != "-nomodules") then +source ${MODULESHOME}/init/csh +module list +#module purge +module load PrgEnv-intel/8.3.3 +module load intel +module load netcdf/4.7.4 +module load cray-mpich/8.1.19 +module list + +# May be needed for OpenMP memory +setenv OMP_STACKSIZE 64M + +endif + +setenv ICE_MACHINE_MACHNAME wcoss2 +setenv ICE_MACHINE_MACHINFO "" +setenv ICE_MACHINE_ENVNAME intel +setenv ICE_MACHINE_ENVINFO "" +setenv ICE_MACHINE_MAKE gmake +setenv ICE_MACHINE_WKDIR $HOME/scratch/CICE_RUNS +setenv ICE_MACHINE_INPUTDATA /u/robert.grumbine/noscrub/CICE_INPUTDATA +setenv ICE_MACHINE_BASELINE $HOME/scratch/CICE_BASELINE +setenv ICE_MACHINE_SUBMIT "qsub" +setenv ICE_MACHINE_TPNODE 40 +setenv ICE_MACHINE_ACCT ICE-DEV +setenv ICE_MACHINE_QUEUE "normal" +setenv ICE_MACHINE_BLDTHRDS 1 +setenv ICE_MACHINE_QSTAT "qst" From 0613c30ffe8916eb2416ff55e0c2e2a4f223e4e0 Mon Sep 17 00:00:00 2001 From: Robert Grumbine Date: Wed, 8 Oct 2025 12:58:55 +0000 Subject: [PATCH 2/2] mostly running on wcoss2 --- configuration/scripts/cice.batch.csh | 3 ++- configuration/scripts/machines/env.wcoss2_intel | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configuration/scripts/cice.batch.csh b/configuration/scripts/cice.batch.csh index f2c605165..25f9ab5de 100755 --- a/configuration/scripts/cice.batch.csh +++ b/configuration/scripts/cice.batch.csh @@ -450,7 +450,8 @@ cat >> ${jobfile} << EOFB #PBS -l walltime=${batchtime} ##PBS -l select=${nnodes}:ncpus=${taskpernodelimit} ##PBS -l select=${nnodes}:ncpus=${corespernode}:mpiprocs=${taskpernodelimit}:ompthreads=${nthrds} -#PBS -l place=vscatter,select=${nnodes}:ncpus=${corespernode}:mpiprocs=${corespernode}:mem=256M +##PBS -l place=vscatter,select=${nnodes}:ncpus=${corespernode}:mpiprocs=${corespernode}:mem=512M +#PBS -l place=vscatter,select=${nnodes}:ncpus=${corespernode}:mpiprocs=${corespernode} EOFB else if (${ICE_MACHINE} =~ orion*) then diff --git a/configuration/scripts/machines/env.wcoss2_intel b/configuration/scripts/machines/env.wcoss2_intel index 548573e5a..5c25f04be 100644 --- a/configuration/scripts/machines/env.wcoss2_intel +++ b/configuration/scripts/machines/env.wcoss2_intel @@ -10,7 +10,9 @@ source ${MODULESHOME}/init/csh module list #module purge module load PrgEnv-intel/8.3.3 -module load intel +module load intel/19.1.3.304 +#module load PrgEnv-intel/8.5.0 +#module load intel-oneapi/2022.2.0.262 module load netcdf/4.7.4 module load cray-mpich/8.1.19 module list