Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Goddard-Fortran-Ecosystem/pFUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Clune committed Sep 4, 2018
2 parents bc70d16 + a80a6b9 commit bb130e6
Show file tree
Hide file tree
Showing 37 changed files with 1,098 additions and 488 deletions.
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,25 @@ elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL PGI)
add_definitions(-DPGI)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -g -traceback -Mallocatable=03 -Mbounds -Mchkfpstk -Mchkstk")

elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL Cray)

# The Fortran module does not set a variable to the compiler version
# number like the C module does. Since CCE is a suite of compilers we
# can use the C version as a proxy for the Fortran version.
#
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 8.6.0)
message( FATAL_ERROR "Cray compiler version number ${CMAKE_C_COMPILER_VERSION} < 8.6.0 minimum" )
endif()

# Use Cray
add_definitions(-DCray)
add_definitions(-DSTRINGIFY_SIMPLE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_DEBUG} -G0 -Rb ${CMAKE_Fortran_FLAGS}")
set(OPENMP_FLAGS " ")

else()

message( FATAL_ERROR "Unrecognized compiler. Please use ifort, gfortran, gfortran-mp-4.8, PGI, or nagfor" )
message( FATAL_ERROR "Unrecognized compiler. Please use ifort, gfortran, gfortran-mp-4.8, pgfortran, nagfor or cce" )

endif()

Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

3.2.10 - Cmake fix (#12) -- spaces in COMMAND
- moved to GitHub
3.2.9 October 29, 2017
- bug fix for #62 -- stalled test in some environments

Expand Down
6 changes: 1 addition & 5 deletions Examples/Fixture/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ VPATH = . $(SRC_DIR) $(TEST_DIR)

include $(PFUNIT)/include/base.mk

ifeq ($(USEMPI),YES)
FC=mpif90
endif

EXE = tests$(EXE_EXT)

all: $(EXE)
ifeq ($(USEMPI),YES)
mpirun -np 1 ./$(EXE)
mpiexec -n 1 ./$(EXE)
else
./$(EXE)
endif
Expand Down
2 changes: 1 addition & 1 deletion Examples/Fixture/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifndef SKIP_INTENTIONALLY_BROKEN
endif

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(FC) -c $(FFLAGS) $(FPPFLAGS) $<
Expand Down
6 changes: 1 addition & 5 deletions Examples/MPI_Halo/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ VPATH = . $(SRC_DIR) $(TEST_DIR)

include $(PFUNIT)/include/base.mk

ifeq ($(USEMPI),YES)
MPIF90=mpif90
endif

EXE = tests$(EXE_EXT)

all: $(EXE)
mpirun -np 4 ./$(EXE)
mpiexec -n 4 ./$(EXE)

SUT:
make -C $(SRC_DIR) SUT
Expand Down
2 changes: 1 addition & 1 deletion Examples/MPI_Halo/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifndef SKIP_INTENTIONALLY_BROKEN
endif

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(MPIF90) -c $(FFLAGS) $<
Expand Down
6 changes: 1 addition & 5 deletions Examples/MPI_SimpleParameterizedTest/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ VPATH = . $(TEST_DIR)

include $(PFUNIT)/include/base.mk

ifeq ($(USEMPI),YES)
MPIF90=mpif90
endif

EXE = tests$(EXE_EXT)

all: $(EXE)
mpirun -np 4 ./$(EXE)
mpiexec -n 4 ./$(EXE)

SUT:
make -C $(TEST_DIR) tests
Expand Down
2 changes: 1 addition & 1 deletion Examples/MPI_SimpleParameterizedTest/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ifndef SKIP_INTENTIONALLY_BROKEN
endif

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(MPIF90) -c $(FFLAGS) $<
Expand Down
6 changes: 1 addition & 5 deletions Examples/ParameterizedTest/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ VPATH = . $(SRC_DIR) $(TEST_DIR)

include $(PFUNIT)/include/base.mk

ifeq ($(USEMPI),YES)
FC=mpif90
endif

EXE = tests$(EXE_EXT)

all: $(EXE)
ifeq ($(USEMPI),YES)
mpirun -np 1 ./$(EXE)
mpiexec -n 1 ./$(EXE)
else
./$(EXE)
endif
Expand Down
2 changes: 1 addition & 1 deletion Examples/ParameterizedTest/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ testSuites.inc: $(SRCS)
FFLAGS += -I$(SRC_DIR) -I$(PFUNIT)/mod

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(FC) -c $(FFLAGS) $<
Expand Down
14 changes: 6 additions & 8 deletions Examples/Robust/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ VPATH = . $(SRC_DIR) $(TEST_DIR)

include $(PFUNIT)/include/base.mk

ifeq ($(USEMPI),YES)
FC=mpif90
endif

EXE = tests$(EXE_EXT)

# NOTE: use the -robust flag
all: $(EXE)
ifeq ($(USEMPI),YES)
echo Warning: Testing -robust flag with MPI, robust will override.
echo driver.F90 will call mpirun on itself with robust set.
echo "Top" level mpirun not needed, may be problemmatic.
@echo
@echo 'Warning: Testing -robust flag with MPI, robust will override.'
@echo ' driver.F90 will call mpirun on itself with robust set.'
@echo ' "Top" level mpirun not needed, may be problemmatic.'
@echo
./$(EXE) -robust
# mpirun -np 1 ./$(EXE) -robust
# mpiexec -n 1 ./$(EXE) -robust
else
./$(EXE) -robust -max-timeout-duration 0.16 -max-launch-duration 4.72
endif
Expand Down
2 changes: 1 addition & 1 deletion Examples/Robust/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifndef SKIP_INTENTIONALLY_BROKEN
endif

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(FC) -c $(FFLAGS) $<
Expand Down
14 changes: 1 addition & 13 deletions Examples/Simple/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ ifeq ($(UNAME),Windows)
endif
endif

# The following may be redundant since FC should already be
# appropriately set in include/base.mk.
ifeq ($(USEMPI),YES)
FC=mpif90
endif

EXE = tests$(EXE_EXT)
ifneq ($(UNAME),Windows)
LIBS = -L$(PFUNIT)/lib -lpfunit
Expand All @@ -51,14 +45,8 @@ endif

all: $(EXE)

# ifeq ($(USEMPI),YES)
# mpirun -np 1 ./$(EXE)
# else
# ./$(EXE)
# endif

ifeq ($(USEMPI),YES)
mpirun -np 1 ./$(EXE) -xml tests.xml
mpiexec -n 1 ./$(EXE) -xml tests.xml
else
./$(EXE) -xml tests.xml
endif
Expand Down
2 changes: 1 addition & 1 deletion Examples/Simple/tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ifneq ($(UNAME),Windows)
endif

%.F90: %.pf
$(PFUNIT)/bin/pFUnitParser.py $< $@
$(PFUNIT)/bin/pFUnitParser.py $(FUFLAGS) $< $@

%$(OBJ_EXT): %.F90
$(FC) -c $(FFLAGS) $(FPPFLAGS) $<
Expand Down
Loading

0 comments on commit bb130e6

Please sign in to comment.