From a3b386c6a91a8b503184a7264a832e8d94b1ce1b Mon Sep 17 00:00:00 2001 From: Jai Sachdev Date: Wed, 27 Nov 2019 08:49:46 -0500 Subject: [PATCH 1/2] Fixed error in Makefile for creating shared libraries --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f7a0ef0..998993b 100644 --- a/Makefile +++ b/Makefile @@ -63,15 +63,19 @@ install: @test -d $(INCDIR) || mkdir -p $(INCDIR) @test -d $(TESTDR) || mkdir -p $(TESTDR) @cp *.mod $(INCDIR) + @cp $(CZSDIR)/czspline_capi.h $(INCDIR) @test ! -f $(LIBAR) || cp $(LIBAR) $(LIBDIR) @test ! -f $(LIBSO) || cp $(LIBSO) $(LIBDIR) @cp $(PSPDIR)/pspltest.output $(TESTDR) + @cp $(PSPDIR)/lookup_test.output $(TESTDR) @cp $(EZSDIR)/ezspline_test.ref $(TESTDR) @cp $(EZSDIR)/qk_pspline.output $(TESTDR) + @cp $(CZSDIR)/czspline_test.out $(TESTDR) @test ! -f $(EXELUP) || cp $(EXELUP) $(TESTDR) @test ! -f $(EXEPSP) || cp $(EXEPSP) $(TESTDR) @test ! -f $(EXEQKS) || cp $(EXEQKS) $(TESTDR) @test ! -f $(EXEEZS) || cp $(EXEEZS) $(TESTDR) + @test ! -f $(EXECZS) || cp $(EXECZS) $(TESTDR) debug: FFLAGS += $(DFFLAGS) debug: LDFLAGS += $(DFFLAGS) @@ -83,7 +87,7 @@ debug: $(EXEEZS) debug: $(EXECZS) shared: FFLAGS += $(SFFLAGS) -shared: LDFLAGS += $(SFFLAGS) +shared: LDFLAGS += $(SLDFLAGS) shared: $(OBJS) $(FC) $(LDFLAGS) -o $(LIBSO) $(OBJS) From 7bfceefd2854c74435ff85e094b7eb9cd10599d2 Mon Sep 17 00:00:00 2001 From: Jai Sachdev Date: Wed, 27 Nov 2019 08:51:16 -0500 Subject: [PATCH 2/2] Added build options in the pppl-bashrc and created a basic sample config script. --- README.md | 5 ++++- config/pppl-bashrc | 38 ++++++++++++++++++++++++++++++++++++++ config/sample-bashrc | 6 ++++++ pppl-bashrc | 26 -------------------------- 4 files changed, 48 insertions(+), 27 deletions(-) create mode 100644 config/pppl-bashrc create mode 100644 config/sample-bashrc delete mode 100644 pppl-bashrc diff --git a/README.md b/README.md index 171b51e..ad2213a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,10 @@ Test programs are included in the source directories. ## Configuration -See the sample configuration used at PPPL: pppl-bashrc +See the sample configuration files in the config directory: + +pppl-bashrc - configuration file used at PPPL (modules based) +sample-bashrc - basic example configuration file ## Build diff --git a/config/pppl-bashrc b/config/pppl-bashrc new file mode 100644 index 0000000..c7c0029 --- /dev/null +++ b/config/pppl-bashrc @@ -0,0 +1,38 @@ +module purge +module load git + +# Specify compiler (GCC, ICC, PGC): +export COMPILER=ICC15 + +if [ $COMPILER = 'ICC' -o $COMPILER = 'ICC19' ]; then + module load intel/2019.u3 +elif [ $COMPILER = 'ICC15' ]; then + module load intel/2015.u1 +elif [ $COMPILER = 'PGC' ]; then + module load pgf/19.1 +elif [ $COMPILER = 'GCC6' ]; then + module load gcc/6.1.0 +else + module load gcc/9.1.0 +fi + +module load szip +module load curl +module load hdf +module load hdf5-serial +module load netcdf-c +module load netcdf-fortran + +if [ $COMPILER = 'ICC15' ]; then + export NETCDF_FORTRAN_HOME=$NETCDFHOME + export COMPILER=ICC +elif [ $COMPILER = 'GCC6' ]; then + export NETCDF_FORTRAN_HOME=$NETCDFHOME + export COMPILER=GCC +fi + +if [ ! -z "$NETCDF_FORTRAN_HOME" ]; then + export NETCDF_FLAGS=" -D_NETCDF" + export L_NETCDF=" -L$NETCDF_FORTRAN_HOME/lib -lnetcdff" + export I_NETCDF=" -I$NETCDF_FORTRAN_HOME/include" +fi diff --git a/config/sample-bashrc b/config/sample-bashrc new file mode 100644 index 0000000..e780fd5 --- /dev/null +++ b/config/sample-bashrc @@ -0,0 +1,6 @@ +export COMPILER=GCC +export FC=gfortran +export CXX=g++ +export NETCDF_FLAGS=" -D_NETCDF" +export L_NETCDF=" -L/usr/lib/x86_64-linux-gnu/lib -lnetcdff" +export I_NETCDF=" -I/usr/include" diff --git a/pppl-bashrc b/pppl-bashrc deleted file mode 100644 index 88e39bf..0000000 --- a/pppl-bashrc +++ /dev/null @@ -1,26 +0,0 @@ -module purge -module load git - -# Specify compiler (GCC, ICC, PGC): -export COMPILER=GCC - -if [ $COMPILER = 'ICC' ]; then - module load intel/2019.u3 -elif [ $COMPILER = 'PGC' ]; then - module load pgf/19.1 -else - module load gcc/9.1.0 -fi - -module load szip/2.1.1 -module load curl/7.59.0 -module load hdf/4.2.14 -module load hdf5-serial/1.10.5 -module load netcdf-c/4.6.3 -module load netcdf-fortran/4.4.5 - -if [ ! -z "$NETCDF_FORTRAN_HOME" ]; then - export NETCDF_FLAGS=" -D_NETCDF" - export L_NETCDF=" -L$NETCDF_FORTRAN_HOME/lib -lnetcdff" - export I_NETCDF=" -I$NETCDF_FORTRAN_HOME/include" -fi