diff --git a/builds/betzy-gnu/.gitignore b/builds/betzy-gnu/.gitignore new file mode 100644 index 00000000..5d5de4c4 --- /dev/null +++ b/builds/betzy-gnu/.gitignore @@ -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 diff --git a/builds/betzy-gnu/betzy-gnu-cmake.sh b/builds/betzy-gnu/betzy-gnu-cmake.sh new file mode 100755 index 00000000..05d3a97d --- /dev/null +++ b/builds/betzy-gnu/betzy-gnu-cmake.sh @@ -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" \ diff --git a/builds/betzy-gnu/clean.sh b/builds/betzy-gnu/clean.sh new file mode 100755 index 00000000..ad50af51 --- /dev/null +++ b/builds/betzy-gnu/clean.sh @@ -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 diff --git a/libglimmer-solve/SLAP/dgmres.f b/libglimmer-solve/SLAP/dgmres.f index b159b60d..26ce2f84 100644 --- a/libglimmer-solve/SLAP/dgmres.f +++ b/libglimmer-solve/SLAP/dgmres.f @@ -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) diff --git a/libglimmer-solve/SLAP/xersla.f b/libglimmer-solve/SLAP/xersla.f index 78e8049a..3693b093 100644 --- a/libglimmer-solve/SLAP/xersla.f +++ b/libglimmer-solve/SLAP/xersla.f @@ -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