Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICE updates to support IntelLLVM compiler #91

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cicecore/cicedyn/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2325,9 +2325,11 @@ subroutine accum_hist (dt)
! increment field
!---------------------------------------------------------------

#ifndef __INTEL_LLVM_COMPILER
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block, &
!$OMP k,n,qn,ns,sn,rho_ocn,rho_ice,Tice,Sbr,phi,rhob,dfresh,dfsalt,sicen, &
!$OMP worka,workb,worka3,Tinz4d,Sinz4d,Tsnz4d)
#endif

do iblk = 1, nblocks
this_block = get_block(blocks_ice(iblk),iblk)
Expand Down Expand Up @@ -3637,7 +3639,9 @@ subroutine accum_hist (dt)
call accum_hist_snow (iblk)

enddo ! iblk
#ifndef __INTEL_LLVM_COMPILER
!$OMP END PARALLEL DO
#endif

call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
Expand Down
4 changes: 1 addition & 3 deletions cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ subroutine ice_prescribed_phys()
!--------------------------------------------------------------------
! compute aggregate ice state and open water area
!--------------------------------------------------------------------
call icepack_aggregate(ncat = ncat, &
aicen = aicen(i,j,:,iblk), &
call icepack_aggregate(aicen = aicen(i,j,:,iblk), &
trcrn = trcrn(i,j,1:ntrcr,:,iblk), &
vicen = vicen(i,j,:,iblk), &
vsnon = vsnon(i,j,:,iblk), &
Expand All @@ -456,7 +455,6 @@ subroutine ice_prescribed_phys()
vice = vice (i,j, iblk), &
vsno = vsno (i,j, iblk), &
aice0 = aice0(i,j, iblk), &
ntrcr = ntrcr, &
trcr_depend = trcr_depend(1:ntrcr), &
trcr_base = trcr_base(1:ntrcr,:), &
n_trcr_strata = n_trcr_strata(1:ntrcr), &
Expand Down
9 changes: 5 additions & 4 deletions configuration/scripts/machines/Macros.derecho_inteloneapi
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ FFLAGS := -fp-model precise -convert big_endian -assume byterecl -ftz -trace
FFLAGS_NOOPT:= -O0

ifeq ($(ICE_BLDDEBUG), true)
FFLAGS += -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -link_mpi=dbg
# FFLAGS += -O0 -g -check all -fpe0 -ftrapuv -fp-model except -check noarg_temp_created -link_mpi=dbg -stand f08
# FFLAGS += -O0 -g -check all -fpe0 -ftrapuv -fp-model except -check noarg_temp_created -init=snan,arrays -link_mpi=dbg
# -check uninit is needed on the ld step but it still throws errors in 2023.* and 2024.0.*, likely compiler bug
FFLAGS += -O0 -g -check bounds -check pointers -fpe0 -check noarg_temp_created -link_mpi=dbg
# FFLAGS += -O0 -g -check uninit -check bounds -check pointers -fpe0 -check noarg_temp_created -link_mpi=dbg
# LDFLAGS += -check uninit
else
FFLAGS += -O2
FFLAGS += -O1
endif

SCC := icx
Expand Down
10 changes: 5 additions & 5 deletions configuration/scripts/machines/env.derecho_cray
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if ("$inp" != "-nomodules") then
source ${MODULESHOME}/init/csh

module --force purge
module load ncarenv/23.06
module load ncarenv/23.09
module load craype
module load cce/15.0.1
module load cce/16.0.1
module load ncarcompilers
module load cray-mpich/8.1.25
module load cray-mpich/8.1.27
module load netcdf/4.9.2
#module load hdf5/1.12.2
#module load netcdf-mpi/4.9.2
Expand All @@ -29,7 +29,7 @@ if ($ICE_IOTYPE =~ pio*) then
if ($ICE_IOTYPE == "pio1") then
module load parallelio/1.10.1
else
module load parallelio/2.6.1
module load parallelio/2.6.2
endif
endif
endif
Expand Down Expand Up @@ -61,7 +61,7 @@ setenv OMP_STACKSIZE 64M
setenv ICE_MACHINE_MACHNAME derecho
setenv ICE_MACHINE_MACHINFO "HPE Cray EX Milan Slingshot 11"
setenv ICE_MACHINE_ENVNAME cray
setenv ICE_MACHINE_ENVINFO "cce 15.0.1, cray-mpich 8.1.25, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.1"
setenv ICE_MACHINE_ENVINFO "Cray clang/fortran cce 16.0.1, cray-mpich 8.1.27, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.2"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR /glade/derecho/scratch/$user/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /glade/campaign/cesm/development/pcwg
Expand Down
12 changes: 6 additions & 6 deletions configuration/scripts/machines/env.derecho_intel
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ if ("$inp" != "-nomodules") then
source ${MODULESHOME}/init/csh

module --force purge
module load ncarenv/23.06
module load ncarenv/23.09
module load craype
module load intel/2023.0.0
module load intel/2023.2.1
module load ncarcompilers
module load cray-mpich/8.1.25
module load cray-mpich/8.1.27
module load netcdf/4.9.2
#module load hdf5/1.12.2
#module load netcdf-mpi/4.9.2

module load cray-libsci/23.02.1.1
module load cray-libsci/23.09.1.1

if ($?ICE_IOTYPE) then
if ($ICE_IOTYPE =~ pio*) then
Expand All @@ -29,7 +29,7 @@ if ($ICE_IOTYPE =~ pio*) then
if ($ICE_IOTYPE == "pio1") then
module load parallelio/1.10.1
else
module load parallelio/2.6.1
module load parallelio/2.6.2
endif
endif
endif
Expand Down Expand Up @@ -61,7 +61,7 @@ setenv OMP_STACKSIZE 64M
setenv ICE_MACHINE_MACHNAME derecho
setenv ICE_MACHINE_MACHINFO "HPE Cray EX Milan Slingshot 11"
setenv ICE_MACHINE_ENVNAME intel
setenv ICE_MACHINE_ENVINFO "ifort 2021.8.0 20221119, oneAPI DPC++/C++ 2023.0.0.20221201), cray-mpich 8.1.25, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.1"
setenv ICE_MACHINE_ENVINFO "ifort 2021.10.0 20230609, oneAPI DPC++/C++ 2023.2.0.20230721, cray-mpich 8.1.27, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.2"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR /glade/derecho/scratch/$user/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /glade/campaign/cesm/development/pcwg
Expand Down
15 changes: 8 additions & 7 deletions configuration/scripts/machines/env.derecho_inteloneapi
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ if ("$inp" != "-nomodules") then
source ${MODULESHOME}/init/csh

module --force purge
module load ncarenv/23.06
module load ncarenv/23.09
module load craype
module load intel-oneapi/2023.0.0
module load ncarcompilers
module load cray-mpich/8.1.25
module load intel-oneapi/2023.2.1
#module load mkl/2023.3.0
module load ncarcompilers/1.0.0
module load cray-mpich/8.1.27
module load netcdf/4.9.2
#module load hdf5/1.12.2
#module load netcdf-mpi/4.9.2

module load cray-libsci/23.02.1.1
module load cray-libsci/23.09.1.1

if ($?ICE_IOTYPE) then
if ($ICE_IOTYPE =~ pio*) then
Expand All @@ -29,7 +30,7 @@ if ($ICE_IOTYPE =~ pio*) then
if ($ICE_IOTYPE == "pio1") then
module load parallelio/1.10.1
else
module load parallelio/2.6.1
module load parallelio/2.6.2
endif
endif
endif
Expand Down Expand Up @@ -61,7 +62,7 @@ setenv OMP_STACKSIZE 64M
setenv ICE_MACHINE_MACHNAME derecho
setenv ICE_MACHINE_MACHINFO "HPE Cray EX Milan Slingshot 11"
setenv ICE_MACHINE_ENVNAME inteloneapi
setenv ICE_MACHINE_ENVINFO "ifx 2023.0.0 20221201, oneAPI DPC++/C++ 2023.0.0.20221201, cray-mpich 8.1.25, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.1"
setenv ICE_MACHINE_ENVINFO "oneAPI DPC++/C++/ifx 2023.2.0 20230721, cray-mpich 8.1.27, netcdf4.9.2, pnetcdf1.12.3, pio1.10.1, pio2.6.2"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR /glade/derecho/scratch/$user/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /glade/campaign/cesm/development/pcwg
Expand Down
8 changes: 4 additions & 4 deletions configuration/scripts/machines/env.derecho_nvhpc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if ("$inp" != "-nomodules") then
source ${MODULESHOME}/init/csh

module --force purge
module load ncarenv/23.06
module load ncarenv/23.09
module load craype
module load nvhpc/23.5
module load nvhpc/23.7
module load ncarcompilers
module load cray-mpich/8.1.25
module load cray-mpich/8.1.27
module load netcdf/4.9.2
#module load hdf5/1.12.2
#module load netcdf-mpi/4.9.2
Expand All @@ -29,7 +29,7 @@ if ($ICE_IOTYPE =~ pio*) then
if ($ICE_IOTYPE == "pio1") then
module load parallelio/1.10.1
else
module load parallelio/2.6.0
module load parallelio/2.6.2
endif
endif
endif
Expand Down
6 changes: 4 additions & 2 deletions doc/source/user_guide/ug_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1107,11 +1107,13 @@ You can also setup a conda env with the same utitities
To run the validation test, setup a baseline run with the original baseline model and then
a perturbation run based on recent model changes. Use ``--set qc`` in both runs in addition
to other settings needed. Then use the QC script to compare history output,
to other settings needed. Then use the QC script to compare history output. The QC script should
be run from the ``configuration/scripts/tests/QC`` directory because other files from that
directory are required for the script.

.. code-block:: bash
cp configuration/scripts/tests/QC/cice.t-test.py .
cd configuration/scripts/tests/QC
./cice.t-test.py /path/to/baseline/history /path/to/test/history
The script will produce output similar to:
Expand Down
Loading