Skip to content

Commit

Permalink
o ctests/Makefile and ftests/Makefile: Restore passing down CFLAGS an…
Browse files Browse the repository at this point in the history
…d FFLAGS

  so the xeonphi build doesn't get confused.
o macros.make.*: Use "git" to automatically install revision number when
  installing.
o Removed some obsolete macros.make.* files
o Added new macros.make for gaea and titan (macros.make.ornlintel)

runalltests.csh passed on workstation and jet
  • Loading branch information
jmrosinski committed Jul 7, 2013
1 parent 67cdd8a commit 08687ec
Show file tree
Hide file tree
Showing 16 changed files with 206 additions and 43 deletions.
7 changes: 3 additions & 4 deletions ctests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ include ../macros.make

null =

# For some reason, -g seems to disable -h omp with craycc
# Override CFLAGS settings in macros.make: Use -O0 to avoid confusing optimizations
CFLAGS = -g -O0
# Ensure that CFLAGS are set for no optimization
CFLAGS += -g -O0

TESTS = global
ifeq ($(HAVE_MPI),yes)
Expand All @@ -28,7 +27,7 @@ else
LIBNAME = gptl
endif

LDFLAGS = -g -L.. -l$(LIBNAME) $(ABIFLAGS) -lm
LDFLAGS = $(CFLAGS) -L.. -l$(LIBNAME) $(ABIFLAGS) -lm

ifeq ($(OPENMP),yes)
CFLAGS += -DTHREADED_OMP $(COMPFLAG)
Expand Down
5 changes: 2 additions & 3 deletions ftests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ endif
# May be reset below
THREADED = no

# For some reason, -g seems to disable -h omp with crayftn
# Override FFLAGS settings in macros.make: Use -O1 to avoid confusing optimizations
FFLAGS = -g -O1
# Ensure that FFLAGS are set for low optimization
FFLAGS += -g -O1

# TESTS defines which of EXES have a built-in testing procedure.
TESTS = testbasics nlreader
Expand Down
6 changes: 4 additions & 2 deletions macros.make.AIX
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/aix
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/aix

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.bluegene
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/bluegene
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/bluegene

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
8 changes: 4 additions & 4 deletions macros.make.jet
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /home/hpc/GPTL/gptl-4.3.2/mvapich
# For zeus:
#INSTALLDIR = /scratch1/portfolios/BMC/fim/GPTL/gptl-4.3.2/intel_mpi
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = /home/hpc/GPTL/gptl-$(REVNO)/mvapich

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.jet.singlethreaded → macros.make.jet.nompi
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/jet/gptl-3.7single/intel
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/intel_nompi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.lahey
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/jet/gptl-3.7single/lahey
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/lahey_nompi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
4 changes: 3 additions & 1 deletion macros.make.linux
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /usr/local
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = /usr/local/gptl-$(REVNO)

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.macos
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /usr/local
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/macos

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
20 changes: 11 additions & 9 deletions macros.make.frost → macros.make.ornlintel
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/frost/intel
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/GPTL/gptl-$(REVNO)/intel_mpi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =

# C compiler
CC = icc
CC = cc

# Whether to build debug lib or optimized lib, and associated flags
DEBUG = no
Expand Down Expand Up @@ -70,7 +72,7 @@ ifeq ($(FORTRAN),yes)
# Set Fortran compiler, flags, and OpenMP compiler flag. Note that Fortran
# OpenMP tests are possible with OPENMP=no as long as PTHREADS=yes
# These settings are only used by the Fortran test applications in ftests/.
FC = ifort
FC = ftn
FFLAGS = -g -O2
FOMPFLAG = -openmp
endif
Expand All @@ -82,8 +84,8 @@ AR = ar
# info as appropriate.
HAVE_PAPI = no
ifeq ($(HAVE_PAPI),yes)
PAPI_INCFLAGS =
PAPI_LIBFLAGS =
PAPI_INCFLAGS = -I/contrib/papi/5.0.1/include
PAPI_LIBFLAGS = -L/contrib/papi/5.0.1/lib -lpapi
endif

# Whether to build GPTL with MPI support. Set inc and lib info if needed.
Expand All @@ -93,9 +95,9 @@ ifeq ($(HAVE_MPI),yes)
# Hopefully MPI_Comm_f2c() exists, but if not, set HAVE_COMM_F2C = no
HAVE_COMM_F2C = yes
MPI_INCFLAGS =
MPI_LIBFLAGS = -lmpi
MPI_LIBFLAGS =
# Want 2 MPI tasks
MPICMD = mpiexec_mpt -n 2
MPICMD = aprun -n 2
endif

# clock_gettime() in librt.a is an option for gathering wallclock time stats
Expand Down Expand Up @@ -126,7 +128,7 @@ HAVE_GETTIMEOFDAY = yes
TEST_AUTOPROFILE = yes
ifeq ($(TEST_AUTOPROFILE),yes)
INSTRFLAG = -finstrument-functions
CXX = icpc
CXX = CC
endif

# Whether to enable PMPI wrappers. Turning this on will result in automatic
Expand Down
6 changes: 4 additions & 2 deletions macros.make.pgi
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /home/hpc/GPTL/gptl-4.3.2/pgi_nompi
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/pgi_nompi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.sicortex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /usr/local
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/sicortex

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
8 changes: 4 additions & 4 deletions macros.make.intel → macros.make.xeon
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /home/hpc/GPTL/gptl-4.3.2/intel_nompi
# For zeus:
#INSTALLDIR = /scratch1/portfolios/BMC/fim/GPTL/gptl-4.3.2/intel_nompi
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/xeon

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
143 changes: 143 additions & 0 deletions macros.make.xeonphi
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# This file contains macro settings which are used by the Makefile. Some require
# "yes" or "no", where various subflags are required if the value is
# "yes". The intent is for the user to edit whichever parts of this file are
# necessary, save to a file named "macros.make", then run "make" to build the
# GPTL library.

##########################################################################

# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/xeonphi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =

# C compiler. If HAVE_MPI=yes (see below), this should probably be set to the wrapper script.
CC = mpiicc

# Whether to build debug lib or optimized lib, and associated flags
DEBUG = no
ifeq ($(DEBUG),yes)
CFLAGS = -g -mmic -O0 -Wall -fno-inline
else
CFLAGS = -g -mmic -O3 -finline-functions -Winline -Wall
endif

# Set compiler flags for non-default ABIs (e.g. 64-bit addressing).
# Normally this can be blank.
ABIFLAGS =

# Is the /proc filesystem available? On most Linux systems it is. If available, get_memusage()
# reads from it to find memory usage info. Otherwise get_memusage() will use get_rusage()
HAVE_SLASHPROC = yes

# GPTL can enable threading either via OPENMP=yes, or PTHREADS=yes. Since
# most OpenMP implementations are built on top of pthreads, OpenMP
# applications linked with GPTL as built with PTHREADS=yes should work fine.
# Thus COMPFLAG should be set to the compiler flag that enables OpenMP directives
# if either OPENMP=yes, or PTHREADS=yes. If OPENMP=no and PTHREADS=no, GPTL
# will not be thread-safe.
OPENMP = yes
COMPFLAG = -openmp
# Set PTHREADS if available and OPENMP=no
ifeq ($(OPENMP),no)
PTHREADS = yes
endif

# For gcc, -Dinline=inline is a no-op. For other C compilers, things like
# -Dinline=__inline__ may be required. To find your compiler's definition, try
# running "./suggestions CC=<your_C_compiler>".
INLINEFLAG = -Dinline=inline

# To get some C compilers such as gcc to behave properly with -O0 and no inlining,
# need to effectively delete the "inline" keyword
ifeq ($(DEBUG),yes)
INLINEFLAG = -Dinline=
endif

# To build the Fortran interface, set FORTRAN=yes and define the entries under
# ifeq ($(FORTRAN),yes). Otherwise, set FORTRAN=no and skip this section.
FORTRAN = yes
ifeq ($(FORTRAN),yes)
# Fortran name mangling: possibilities are: leave UNDERSCORING blank meaning none
# (e.g. xlf90), -DFORTRANDOUBLEUNDERSCORE (e.g. g77), and -DFORTRANUNDERSCORE
# (e.g. gfortran, pathf95)
#
# UNDERSCORING =
# UNDERSCORING = -DFORTRANDOUBLEUNDERSCORE
UNDERSCORING = -DFORTRANUNDERSCORE

# Set Fortran compiler, flags, and OpenMP compiler flag. Note that Fortran
# OpenMP tests are possible with OPENMP=no as long as PTHREADS=yes
# These settings are only used by the Fortran test applications in ftests/.
FC = mpiifort
FFLAGS = -g -O2 -mmic
FOMPFLAG = -openmp
endif

# Archiver: normally it's just ar
AR = ar

# PAPI: If the PAPI library is already installed, set HAVE_PAPI=yes and set inc and lib
# info as appropriate.
HAVE_PAPI = no
ifeq ($(HAVE_PAPI),yes)
PAPI_INCFLAGS = -I/contrib/papi/5.0.1/include
PAPI_LIBFLAGS = -L/contrib/papi/5.0.1/lib -lpapi
endif

# Whether to build GPTL with MPI support. Set inc and lib info if needed.
# If CC=mpicc or equivalent MPI driver, MPI_INCFLAGS and MPI_LIBFLAGS can be blank.
HAVE_MPI = yes
ifeq ($(HAVE_MPI),yes)
# Hopefully MPI_Comm_f2c() exists, but if not, set HAVE_COMM_F2C = no
HAVE_COMM_F2C = yes
MPI_INCFLAGS =
MPI_LIBFLAGS =
# Want 2 MPI tasks
MPICMD = mpiexec -n 2
endif

# clock_gettime() in librt.a is an option for gathering wallclock time stats
# on some machines. Setting HAVE_LIBRT=yes enables this, but will probably
# require linking applications with -lrt
HAVE_LIBRT = no

# Only define HAVE_NANOTIME if this is a x86. It provides by far the finest grained,
# lowest overhead wallclock timer on that architecture.
# If HAVE_NANOTIME=yes, set BIT64=yes if this is an x86_64
HAVE_NANOTIME = yes
ifeq ($(HAVE_NANOTIME),yes)
BIT64 = yes
endif

# Some old compilers don't support vprintf. Set to "no" in this case
HAVE_VPRINTF = yes

# Some old compilers don't support the C times() function. Set to "no" in this case
HAVE_TIMES = yes

# gettimeofday() should be available everywhere. But if not, set to "no"
HAVE_GETTIMEOFDAY = yes

# Whether to test auto-profiling (adds 2 tests to "make test"). If compiler is gcc or
# pathscale, set INSTRFLAG to -finstrument-functions. PGI 8.0.2 and later provide
# -Minstrument:functions.
TEST_AUTOPROFILE = yes
ifeq ($(TEST_AUTOPROFILE),yes)
INSTRFLAG = -finstrument-functions
CXX = mpiicpc
endif

# Whether to enable PMPI wrappers. Turning this on will result in automatic
# start/stop entries for a number of MPI calls.
ifeq ($(HAVE_MPI),yes)
ENABLE_PMPI = no
# If Fortran is enabled, the ability to automatically initialize GPTL from
# mpi_init can be enabled if iargc() and getarg() are available.
ifeq ($(FORTRAN),yes)
HAVE_IARGCGETARG = no
endif
endif
6 changes: 4 additions & 2 deletions macros.make.xt5.cray
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = $(HOME)/xt5/cray
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = $(HOME)/gptl-$(REVNO)/cray

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down
6 changes: 4 additions & 2 deletions macros.make.zeus
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

##########################################################################

# Where to install GPTL library and include files
INSTALLDIR = /scratch1/portfolios/BMC/fim/GPTL/gptl-4.3.2/intel_mpi
# Where to install GPTL library and include files.
# if "git" is not available, set REVNO by hand
REVNO = $(shell git describe)
INSTALLDIR = /scratch1/portfolios/BMC/fim/GPTL/gptl-$(REVNO)/intel_mpi

# Where to install man pages (if blank, defaults to $INSTALLDIR)
MANDIR =
Expand Down

0 comments on commit 08687ec

Please sign in to comment.