Skip to content

Commit

Permalink
Adding gnu compiler for betzy
Browse files Browse the repository at this point in the history
Requires small updates for SLAP solver
  • Loading branch information
hgoelzer committed Mar 20, 2022
1 parent 88af01c commit 425e67f
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 2 deletions.
10 changes: 10 additions & 0 deletions builds/betzy-gnu/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CMakeCache.txt
CMakeFiles
Makefile
autocopy.log
cism_driver
cmake_install.cmake
fortran_autocopy_includes
fortran_autogen_srcs
fortran_mod_files
lib
71 changes: 71 additions & 0 deletions builds/betzy-gnu/betzy-gnu-cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Run this script by typing: source cheyenne-intel-cmake
# After this script completes, type: make -j 8
# If rebuilding, type 'make clean' before running 'make -j 8'

# This cmake configuration script is set up to perform a parallel build with Trilinos

#module reset
#module load ncarenv/1.2
#module load gnu/8.3.0
#module load openblas/0.3.6
#module load openmpi/3.1.4
#module load netcdf/4.7.1
#module load ncarcompilers/0.5.0
#module load cmake/3.14.4
#module load python/2.7.13
#module load numpy/1.12.0
#module load netcdf4-python/1.2.7

module purge
module load StdEnv
module load GCCcore/11.2.0
module load CMake/3.22.1-GCCcore-11.2.0
module load netCDF/4.8.1-gompi-2021b
module load netCDF-Fortran/4.5.3-gompi-2021b
module load OpenBLAS/0.3.18-GCC-11.2.0

# remove old build data:
rm -f ./CMakeCache.txt
rm -rf ./CMakeFiles

echo
echo "Doing CMake Configuration step"

# Note: the compilation flags were taken from the defaults for a CESM build on
# cheyenne-intel (using cime at 84aafd5). Some of these options are probably
# unnecessary for a standalone cism build, but I am keeping things consistent
# with the CESM build for simplicity.
cmake \
-D CISM_BUILD_CISM_DRIVER:BOOL=ON \
-D CISM_ENABLE_BISICLES=OFF \
-D CISM_ENABLE_FELIX=OFF \
\
-D CISM_USE_TRILINOS:BOOL=OFF \
-D CISM_MPI_MODE:BOOL=ON \
-D CISM_SERIAL_MODE:BOOL=OFF \
\
-D CISM_USE_GPTL_INSTRUMENTATION:BOOL=OFF \
-D CISM_COUPLED:BOOL=OFF \
-D CISM_USE_CISM_FRONT_END:BOOL=OFF \
\
-D CISM_NETCDF_DIR=$EBROOTNETCDFMINFORTRAN \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
\
-D CMAKE_CXX_COMPILER=mpiicpc \
-D CMAKE_C_COMPILER=mpicc \
-D CMAKE_Fortran_COMPILER=mpif90 \
\
-D CMAKE_EXE_LINKER_FLAGS="-ldl" \
\
-D CMAKE_Fortran_FLAGS:STRING="-fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -ffree-form -O" \
-D CMAKE_C_FLAGS:STRING="-std=gnu99 -O" \
-D CISM_EXTRA_LIBS:STRING="-lopenblas" \
../..

# Note: last argument above "../.." is path to top-level cism directory

# -D CMAKE_C_FLAGS:STRING="-qno-opt-dynamic-align -fp-model precise -std=gnu99 -qopt-report -O2 -debug minimal " \
# -D CMAKE_CXX_FLAGS:STRING="-qno-opt-dynamic-align -fp-model precise -std=gnu99 -qopt-report -O2 -debug minimal " \# -D CMAKE_Fortran_FLAGS:STRING="-qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source -qopt-report -O2 -debug minimal " \


# -D CMAKE_Fortran_FLAGS:STRING="-fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -ffree-form -O -L/cluster/software/OpenBLAS/0.3.18-GCC-11.2.0/lib/libopenblas.a" \
11 changes: 11 additions & 0 deletions builds/betzy-gnu/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rm -rf autocopy.log
rm -rf cism_driver
rm -rf CMakeCache.txt
rm -rf CMakeFiles
rm -rf cmake_install.cmake
rm -rf fortran_autocopy_includes
rm -rf fortran_autogen_srcs
rm -rf fortran_mod_files
rm -rf include
rm -rf lib
rm -rf Makefile
5 changes: 3 additions & 2 deletions libglimmer-solve/SLAP/dgmres.f
Original file line number Diff line number Diff line change
Expand Up @@ -2547,8 +2547,9 @@ FUNCTION ISDGMR(N, B, X, XL, NELT, IA, JA, A, ISYM, MSOLVE,
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
INTEGER KMP, LGMR, MAXL, MAXLP1, JPRE, NMSL
DOUBLE PRECISION DXNRM, RNRM, R0NRM, SNORMW, SOLNRM, PROD
DOUBLE PRECISION B(*), X(*), IA(*), JA(*), A(*), R(*), Z(*), DZ(*)
DOUBLE PRECISION RWORK(*), IWORK(*), SB(*), SX(*), Q(*), V(N,*)
DOUBLE PRECISION B(*), X(*), A(*), R(*), Z(*), DZ(*)
INTEGER IA(*), JA(*), IWORK(*)
DOUBLE PRECISION RWORK(*), SB(*), SX(*), Q(*), V(N,*)
DOUBLE PRECISION HES(MAXLP1,MAXL), XL(*)
EXTERNAL MSOLVE
COMMON /SOLBLK/ SOLN(1)
Expand Down
1 change: 1 addition & 0 deletions libglimmer-solve/SLAP/xersla.f
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ subroutine xerabt(messg,nmessg)
c 1982.
c***routines called (none)
c***end prologue xerabt
character*(*) messg
dimension messg(nmessg)
c***first executable statement xerabt
stop 1
Expand Down

0 comments on commit 425e67f

Please sign in to comment.