Skip to content

Commit

Permalink
Merge pull request #5 from transp/config-updates
Browse files Browse the repository at this point in the history
Config file updates
  • Loading branch information
jsachdev authored Nov 27, 2019
2 parents 91178a2 + 7bfceef commit 06860a5
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 28 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -83,7 +87,7 @@ debug: $(EXEEZS)
debug: $(EXECZS)

shared: FFLAGS += $(SFFLAGS)
shared: LDFLAGS += $(SFFLAGS)
shared: LDFLAGS += $(SLDFLAGS)
shared: $(OBJS)
$(FC) $(LDFLAGS) -o $(LIBSO) $(OBJS)

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions config/pppl-bashrc
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions config/sample-bashrc
Original file line number Diff line number Diff line change
@@ -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"
26 changes: 0 additions & 26 deletions pppl-bashrc

This file was deleted.

0 comments on commit 06860a5

Please sign in to comment.