Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
Removed -fpe0 from Intel CFLAGS/CXXFLAGS - this is an ifort option on…
Browse files Browse the repository at this point in the history
…ly. Adapted Intel Xeon Phi build target to Knights Landing architecture. Additional information on build targets in INSTALL file.
  • Loading branch information
climbfuji committed Nov 8, 2016
1 parent 6a386b4 commit b56fd20
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
12 changes: 11 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ Installing MPAS
For general information on how to install MPAS, see https://mpas-dev.github.io.
Additional notes on building MPAS on specific architectures are summarized here.

Compiling MPAS on MacOSX (10.11 El Capitan - 10.12 Sierra)

ifort-phi: Compiling MPAS on Intel Xeon Phi Knights Landing
----------
The compiler options specified in the Makefile apply to the Knights Landing
architecture only, not the Knights Corner architecture. The latter requires
cross-compiling amongst others and is not supported by this release of MPAS.
The compiler optimization settings are conservative and users may experiment
with additional options such as "-xMIC-AVX512" and/or "-align array64byte".


gfortran-clang: Compiling MPAS on MacOSX (10.11 El Capitan - 10.12 Sierra)
----------
MPAS should compile out of the box on MacOSX with the standard (OS) clang compiler
and the gfortran compiler. The gfortran compiler can be installed using homebrew
Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ ifort:
"CXXFLAGS_OPT = -O3" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -g -convert big_endian -FR -CU -CB -check all -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -fpe0 -traceback" \
"CXXFLAGS_DEBUG = -g -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
Expand All @@ -160,7 +160,7 @@ ifort:
"OPENMP = $(OPENMP)" \
"CPPFLAGS = $(MODEL_FORMULATION) -D_MPI -DUNDERSCORE" )

ifort-mic:
ifort-phi:
( $(MAKE) all \
"FC_PARALLEL = mpiifort" \
"CC_PARALLEL = mpiicc" \
Expand All @@ -169,14 +169,14 @@ ifort-mic:
"CC_SERIAL = icc" \
"CXX_SERIAL = icpc" \
"FFLAGS_PROMOTION = -real-size 64" \
"FFLAGS_OPT = -O2 -mmic -convert big_endian -FR" \
"CFLAGS_OPT = -O2 -mmic" \
"CXXFLAGS_OPT = -O2 -mmic" \
"LDFLAGS_OPT = -O2 -mmic" \
"FFLAGS_DEBUG = -O0 -mmic -g -convert big_endian -FR -CU -CB -check all -fp-model strict -traceback" \
"CFLAGS_DEBUG = -O0 -mmic -g -fp-model strict -traceback" \
"CXXFLAGS_DEBUG = -O0 -mmic -g -fp-model strict -traceback" \
"LDFLAGS_DEBUG = -O0 -mmic -g -fp-model strict -traceback" \
"FFLAGS_OPT = -O3 -convert big_endian -FR" \
"CFLAGS_OPT = -O3" \
"CXXFLAGS_OPT = -O3" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -O0 -g -convert big_endian -FR -CU -CB -check all -fpe0 -traceback" \
"CFLAGS_DEBUG = -O0 -g -traceback" \
"CXXFLAGS_DEBUG = -O0 -g -traceback" \
"LDFLAGS_DEBUG = -O0 -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
"CORE = $(CORE)" \
Expand All @@ -199,8 +199,8 @@ ifort-scorep:
"CXXFLAGS_OPT = -O3" \
"LDFLAGS_OPT = -O3" \
"FFLAGS_DEBUG = -g -convert big_endian -FR -CU -CB -check all -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -fpe0 -traceback" \
"CXXFLAGS_DEBUG = -g -fpe0 -traceback" \
"CFLAGS_DEBUG = -g -traceback" \
"CXXFLAGS_DEBUG = -g -traceback" \
"LDFLAGS_DEBUG = -g -fpe0 -traceback" \
"FFLAGS_OMP = -qopenmp" \
"CFLAGS_OMP = -qopenmp" \
Expand Down Expand Up @@ -693,15 +693,15 @@ endif
compiler_test:
ifeq "$(OPENMP)" "true"
@echo "Testing compiler for OpenMP support"
@echo "int main() { return 0; }" > conftest.c; $(SCC) $(CFLAGS) -o conftest.out conftest.c || \
@echo "#include <omp.h>" > conftest.c; echo "int main() { int n = omp_get_num_threads(); return 0; }" >> conftest.c; $(SCC) $(CFLAGS) -o conftest.out conftest.c || \
(echo "$(SCC) does not support OpenMP - see INSTALL in top-level directory for more information"; rm -fr conftest.*; exit 1)
@echo "int main() { return 0; }" > conftest.c; $(CC) $(CFLAGS) -o conftest.out conftest.c || \
@echo "#include <omp.h>" > conftest.c; echo "int main() { int n = omp_get_num_threads(); return 0; }" >> conftest.c; $(CC) $(CFLAGS) -o conftest.out conftest.c || \
(echo "$(CC) does not support OpenMP - see INSTALL in top-level directory for more information"; rm -fr conftest.*; exit 1)
@echo "int main() { return 0; }" > conftest.cpp; $(CXX) $(CFLAGS) -o conftest.out conftest.cpp || \
@echo "#include <omp.h>" > conftest.cpp; echo "int main() { int n = omp_get_num_threads(); return 0; }" >> conftest.cpp; $(CXX) $(CFLAGS) -o conftest.out conftest.cpp || \
(echo "$(CXX) does not support OpenMP - see INSTALL in top-level directory for more information"; rm -fr conftest.*; exit 1)
@echo "program test; stop 0; end program" > conftest.f90; $(SFC) $(FFLAGS) -o conftest.out conftest.f90 || \
@echo "program test; use omp_lib; integer n; n = OMP_GET_NUM_THREADS(); stop 0; end program" > conftest.f90; $(SFC) $(FFLAGS) -o conftest.out conftest.f90 || \
(echo "$(SFC) does not support OpenMP - see INSTALL in top-level directory for more information"; rm -fr conftest.*; exit 1)
@echo "program test; stop 0; end program" > conftest.f90; $(FC) $(FFLAGS) -o conftest.out conftest.f90 || \
@echo "program test; use omp_lib; integer n; n = OMP_GET_NUM_THREADS(); stop 0; end program" > conftest.f90; $(FC) $(FFLAGS) -o conftest.out conftest.f90 || \
(echo "$(FC) does not support OpenMP - see INSTALL in top-level directory for more information"; rm -fr conftest.*; exit 1)
@rm -fr conftest.*
endif
Expand Down

0 comments on commit b56fd20

Please sign in to comment.