Skip to content

Commit

Permalink
Merge branch 'netcdf_fix' into develop
Browse files Browse the repository at this point in the history
This merging PR #9 to the code
  • Loading branch information
supreethms1809 committed Jan 30, 2018
2 parents 93d7547 + c23b39a commit a5be6b2
Show file tree
Hide file tree
Showing 46 changed files with 3,677 additions and 1,580 deletions.
73 changes: 70 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ xlf:
"LDFLAGS_DEBUG = -O0 -g" \
"FFLAGS_OMP = -qsmp=omp" \
"CFLAGS_OMP = -qsmp=omp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )

ftn:
Expand All @@ -44,10 +47,13 @@ ftn:
"LDFLAGS_OPT = " \
"FFLAGS_OMP = -mp" \
"CFLAGS_OMP = -mp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

titan-cray:
Expand All @@ -62,10 +68,13 @@ titan-cray:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = " \
"CFLAGS_OMP = " \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

pgi:
Expand All @@ -87,10 +96,13 @@ pgi:
"LDFLAGS_DEBUG = -O0 -g -Mbounds -Mchkptr -Ktrap=divz,fp,inv,ovf -traceback" \
"FFLAGS_OMP = -mp" \
"CFLAGS_OMP = -mp" \
"FFLAGS_ACC = -Mnofma -acc -ta=tesla:cc60 -Minfo" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

pgi-nersc:
Expand All @@ -108,10 +120,13 @@ pgi-nersc:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = -mp" \
"CFLAGS_OMP = -mp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

pgi-llnl:
Expand All @@ -129,10 +144,13 @@ pgi-llnl:
"LDFLAGS_OPT = " \
"FFLAGS_OMP = -mp" \
"CFLAGS_OMP = -mp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

ifort:
Expand All @@ -144,20 +162,23 @@ ifort:
"CC_SERIAL = icc" \
"CXX_SERIAL = icpc" \
"FFLAGS_PROMOTION = -real-size 64" \
"FFLAGS_OPT = -O3 -convert big_endian -FR" \
"CFLAGS_OPT = -O3" \
"CXXFLAGS_OPT = -O3" \
"FFLAGS_OPT = -O3 -convert big_endian -FR -xMIC-AVX512" \
"CFLAGS_OPT = -O3 -xMIC-AVX512" \
"CXXFLAGS_OPT = -O3 -xMIC-AVX512" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -g -convert big_endian -FR -CU -CB -check all -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

ifort-scorep:
Expand All @@ -179,10 +200,13 @@ ifort-scorep:
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

ifort-gcc:
Expand All @@ -204,10 +228,13 @@ ifort-gcc:
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -fopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

gfortran:
Expand All @@ -229,10 +256,13 @@ gfortran:
"LDFLAGS_DEBUG = -g -m64" \
"FFLAGS_OMP = -fopenmp" \
"CFLAGS_OMP = -fopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

gfortran-clang:
Expand All @@ -254,10 +284,13 @@ gfortran-clang:
"LDFLAGS_DEBUG = -g -m64" \
"FFLAGS_OMP = -fopenmp" \
"CFLAGS_OMP = -fopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

g95:
Expand All @@ -275,10 +308,13 @@ g95:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = -fopenmp" \
"CFLAGS_OMP = -fopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

pathscale-nersc:
Expand All @@ -296,10 +332,13 @@ pathscale-nersc:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = -mp" \
"CFLAGS_OMP = -mp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

cray-nersc:
Expand All @@ -317,10 +356,13 @@ cray-nersc:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = " \
"CFLAGS_OMP = " \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

gnu-nersc:
Expand Down Expand Up @@ -361,6 +403,8 @@ intel-nersc:
"LDFLAGS_OPT = -O3" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"FFLAGS_DEBUG = -real-size 64 -g -convert big_endian -FR -CU -CB -check all -gen-interfaces -warn interfaces -traceback" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
Expand All @@ -369,6 +413,7 @@ intel-nersc:
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

bluegene:
Expand All @@ -390,10 +435,13 @@ bluegene:
"LDFLAGS_DEBUG = -O0 -g" \
"FFLAGS_OMP = -qsmp=omp" \
"CFLAGS_OMP = -qsmp=omp" \
"FFLAGS_ACC =" \
"CFLAGS_ACC =" \
"CORE = $(CORE)" \
"DEBUG = $(DEBUG)" \
"USE_PAPI = $(USE_PAPI)" \
"OPENMP = $(OPENMP)" \
"OPENACC = $(OPENACC)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI" )

CPPINCLUDES =
Expand Down Expand Up @@ -508,6 +556,13 @@ ifeq "$(OPENMP)" "true"
LDFLAGS += $(FFLAGS_OMP)
endif #OPENMP IF

ifeq "$(OPENACC)" "true"
FFLAGS += $(FFLAGS_ACC)
CFLAGS += $(CFLAGS_ACC)
override CPPFLAGS += "-DMPAS_OPENACC"
LDFLAGS += $(FFLAGS_ACC)
endif #OPENACC IF

ifeq "$(PRECISION)" "single"
CFLAGS += "-DSINGLE_PRECISION"
CXXFLAGS += "-DSINGLE_PRECISION"
Expand Down Expand Up @@ -580,6 +635,12 @@ else
OPENMP_MESSAGE="MPAS was built without OpenMP support."
endif

ifeq "$(OPENACC)" "true"
OPENACC_MESSAGE="MPAS was built with OpenACC enabled."
else
OPENACC_MESSAGE="MPAS was built without OpenACC support."
endif

ifneq ($(wildcard .mpas_core_*), ) # CHECK FOR BUILT CORE

ifneq ($(wildcard .mpas_core_$(CORE)), ) # CHECK FOR SAME CORE AS ATTEMPTED BUILD.
Expand Down Expand Up @@ -680,6 +741,10 @@ ifeq "$(OPENMP)" "true"
@rm -fr conftest.*
endif

ifeq "$(OPENACC)" "true"
@echo "Testing compiler for OpenACC support"
endif


mpas_main: compiler_test
ifeq "$(AUTOCLEAN)" "true"
Expand Down Expand Up @@ -717,6 +782,7 @@ endif
@echo $(PAPI_MESSAGE)
@echo $(TAU_MESSAGE)
@echo $(OPENMP_MESSAGE)
@echo $(OPENACC_MESSAGE)
ifeq "$(AUTOCLEAN)" "true"
@echo $(AUTOCLEAN_MESSAGE)
endif
Expand Down Expand Up @@ -798,6 +864,7 @@ errmsg:
@echo " TIMER_LIB=gptl - Uses gptl for the timer interface instead of the native interface"
@echo " TIMER_LIB=tau - Uses TAU for the timer interface instead of the native interface"
@echo " OPENMP=true - builds and links with OpenMP flags. Default is to not use OpenMP."
@echo " OPENACC=true - builds and links with OpenACC flags. Default is to not use OpenACC."
@echo " USE_PIO2=true - links with the PIO 2 library. Default is to use the PIO 1.x library."
@echo " PRECISION=single - builds with default single-precision real kind. Default is to use double-precision."
@echo ""
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ drver: $(AUTOCLEAN_DEPS) externals frame ops dycore
endif

build_tools: externals
(cd tools; $(MAKE) CPPFLAGS="$(CPPFLAGS)" CC="$(SCC)" CFLAGS="$(CFLAGS)")
(cd tools; $(MAKE) CPPFLAGS="$(CPPFLAGS)" CC="$(SCC)" CFLAGS="-O")

frame: $(AUTOCLEAN_DEPS) externals
( cd framework; $(MAKE) CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)" all )
Expand Down
8 changes: 4 additions & 4 deletions src/core_atmosphere/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.SUFFIXES: .F .o

PHYSICS=-DDO_PHYSICS
#PHYSICS=
#PHYSICS=-DDO_PHYSICS
PHYSICS=

OBJS = mpas_atm_core.o \
mpas_atm_core_interface.o \
Expand Down Expand Up @@ -34,7 +34,7 @@ physcore: mpas_atm_dimensions.o
( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*TBL .)
( cd ../..; ln -sf ./src/core_atmosphere/physics/physics_wrf/files/*DATA* .)

dycore: mpas_atm_dimensions.o
dycore: mpas_atm_dimensions.o physcore
( cd dynamics; $(MAKE) all PHYSICS="$(PHYSICS)" )

diagcore: physcore dycore
Expand All @@ -48,7 +48,7 @@ atmcore: physcore dycore diagcore $(OBJS)

mpas_atm_core_interface.o: mpas_atm_core.o

mpas_atm_core.o: dycore mpas_atm_threading.o
mpas_atm_core.o: dycore diagcore mpas_atm_threading.o

mpas_atm_dimensions.o:

Expand Down
Loading

0 comments on commit a5be6b2

Please sign in to comment.