[cig-commits] [commit] master: preparing Makefile for parallel netcdf (253023e)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Oct 17 05:28:50 PDT 2014
Repository : https://github.com/geodynamics/axisem
On branch : master
Link : https://github.com/geodynamics/axisem/compare/607f803cf074063627513d235f9ed0837fc1dd44...b6457db24acdde4a4e1c08935ae1b22adf87f5bf
>---------------------------------------------------------------
commit 253023e1a74ad65551fb486d65a136b9f11e167a
Author: Martin van Driel <vamartin at daint101.cm.cluster>
Date: Tue Oct 14 15:17:15 2014 +0200
preparing Makefile for parallel netcdf
>---------------------------------------------------------------
253023e1a74ad65551fb486d65a136b9f11e167a
SOLVER/Makefile.TEMPLATE | 18 ++++++++++++++----
make_axisem.macros.TEMPLATE | 1 +
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/SOLVER/Makefile.TEMPLATE b/SOLVER/Makefile.TEMPLATE
index 9951881..123d519 100644
--- a/SOLVER/Makefile.TEMPLATE
+++ b/SOLVER/Makefile.TEMPLATE
@@ -28,7 +28,12 @@ OBJS = background_models.o commpi.o commun.o get_model.o \
wavefields_io.o ftz.o pthread.o
ifeq ($(strip $(USE_NETCDF)),true)
- FFLAGS += -Dunc
+ ifeq ($(strip $(USE_PAR_NETCDF)),true)
+ FFLAGS += -Dupnc
+ else
+ FFLAGS += -Dunc
+ endif
+
ifdef NETCDF_PATH
LIBS = -L $(strip $(NETCDF_PATH))/lib -lnetcdff -Wl,-rpath,$(strip $(NETCDF_PATH))/lib
INCLUDE = -I $(strip $(NETCDF_PATH))/include
@@ -42,8 +47,8 @@ else
endif
ifeq ($(strip $(SERIAL)),true)
- FFLAGS += -Dserial
- LDFLAGS += -pthread
+ FFLAGS += -Dserial
+ LDFLAGS += -pthread
endif
@@ -57,7 +62,12 @@ FFLAGS += -Dsolver
all: $(PROG) utils
$(PROG): $(OBJS)
- $(FC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ ifeq ($(strip $(SERIAL)),true)
+ ifeq ($(strip $(USE_PAR_NETCDF)),true)
+ $(error SERIAL and USE_PAR_NETCDF cannot be true at the same time)
+ endif
+ endif
+ $(FC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(PROG) $(OBJS) *.M *.mod *.d *.il core
diff --git a/make_axisem.macros.TEMPLATE b/make_axisem.macros.TEMPLATE
index f7105d2..ab3653c 100644
--- a/make_axisem.macros.TEMPLATE
+++ b/make_axisem.macros.TEMPLATE
@@ -11,6 +11,7 @@ MPIRUN = mpirun
# Enable NetCDF
USE_NETCDF = false
+USE_PAR_NETCDF = false
NETCDF_PATH = # e.g. $(HOME)/local, uses /usr/include if not defined
# compile without MPI (possible values: 'false', 'true')
More information about the CIG-COMMITS
mailing list