From 9217457f609d3fd6c2d9cd8d6c675ff339cb1ed8 Mon Sep 17 00:00:00 2001 From: George Gayno Date: Tue, 17 Mar 2020 19:23:06 +0000 Subject: [PATCH] feature/cmake This commit references #91. Add back package_find for netcdf. Remove set of compiler and compiler flags from dell build module, which are not used by cmake. Minor cleanup of "build_chgres_cube.sh". --- CMakeLists.txt | 1 + modulefiles/chgres_cube.wcoss_dell_p3 | 7 ------- sorc/build_chgres_cube.sh | 16 ++++------------ 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4593c0dbf..4070b2cb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ if(NOT NETCDF) list(APPEND CMAKE_PREFIX_PATH $ENV{NETCDF_FORTRAN}) endif() endif() +find_package(NetCDF MODULE REQUIRED) find_package(MPI REQUIRED COMPONENTS Fortran) find_package(ESMF MODULE REQUIRED) diff --git a/modulefiles/chgres_cube.wcoss_dell_p3 b/modulefiles/chgres_cube.wcoss_dell_p3 index a6e46c3aa..6aefb0039 100644 --- a/modulefiles/chgres_cube.wcoss_dell_p3 +++ b/modulefiles/chgres_cube.wcoss_dell_p3 @@ -16,10 +16,3 @@ module use /gpfs/dell2/emc/modeling/noscrub/emc.nemspara/soft/modulefiles module load esmf/8.0.0 export WGRIB2_ROOT=/u/Wesley.Ebisuzaki/home/grib2.v2.0.8.intel/lib -#export WGRIB2API_INC=/u/Wesley.Ebisuzaki/home/grib2.v2.0.8.intel/lib -#export WGRIB2_LIB=/u/Wesley.Ebisuzaki/home/grib2.v2.0.8.intel/lib/libwgrib2.a - -export FCOMP=mpif90 -export FFLAGS="-O3 -fp-model precise -g -traceback -r8 -i4 -qopenmp -convert big_endian -assume byterecl" -# for debugging -#export FFLAGS="-O0 -g -traceback -r8 -i4 -qopenmp -convert big_endian -check bounds -warn unused -assume byterecl" diff --git a/sorc/build_chgres_cube.sh b/sorc/build_chgres_cube.sh index 619dffdd1..a24a8a714 100755 --- a/sorc/build_chgres_cube.sh +++ b/sorc/build_chgres_cube.sh @@ -29,21 +29,13 @@ if [ ! -d "../exec" ]; then mkdir ../exec fi +# +# --- Chgres part +# rm -fr ../build mkdir ../build cd ../build echo $ESMFMKFILE cmake .. -DCMAKE_Fortran_COMPILER=ifort -make -exit - -# -# --- Chgres part -# -cd chgres_cube.fd - -make clean -make -make install - +make -j 8 VERBOSE=1 exit