Skip to content

Commit

Permalink
More cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilke committed Feb 3, 2016
1 parent c26c4fd commit 44478f6
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 189 deletions.
2 changes: 1 addition & 1 deletion Base/BuildInfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* \file BuildInfo.h.in
* \file BuildInfo.h
* 24/08/2010 LB Initial implementation
* #defines which gets set through CMake
*/
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set(OGS_CONFIG "FEM" CACHE STRING "OpenGeoSys configuration")
set_property(CACHE OGS_CONFIG PROPERTY STRINGS
FEM # Default
SP
GEMS
JFNK
PETSC
PETSC_GEMS
Expand Down
6 changes: 3 additions & 3 deletions ThirdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ if(OGS_USE_CVODE)
set_target_properties(sundials_cvode_shared sundials_nvecserial_shared PROPERTIES MACOSX_RPATH ON)
endif()

if(OGS_FEM_IPQC)
if(OGS_CONFIG STREQUAL IPQC)
add_subdirectory(IPQC)
endif()

if(OGS_FEM_GEMS OR OGS_FEM_PETSC_GEMS)
if(OGS_CONFIG STREQUAL GEMS OR OGS_CONFIG STREQUAL PETSC_GEMS)
add_subdirectory(GEM)
endif()

if(OGS_FEM_PQC)
if(OGS_CONFIG STREQUAL PQC)
add_subdirectory ( PQC )
endif()
100 changes: 0 additions & 100 deletions scripts/cmake/Benchmark.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/cmake/CompilerSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif ()
if(COMPILER_IS_GCC)
set(GCC ON)
if( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
if (OGS_FEM_PETSC_GEMS)
if (OGS_CONFIG STREQUAL PETSC_GEMS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -DNDEBUG")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG")
Expand Down
77 changes: 0 additions & 77 deletions scripts/cmake/test/AddBenchmark.cmake

This file was deleted.

15 changes: 10 additions & 5 deletions scripts/cmake/test/Benchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Benchmark(
# AUTHOR <Author short code>
# PATH <benchmark path incl. name> # relative to the Benchmarks folder
# REQUIRED_CMAKE_OPTIONS <0..N CMake options> # Pass e.g. the CMake config (OGS_FEM)
# CONFIG <ogs configuration> # defaults to FEM
# REQUIRED_CMAKE_OPTIONS <0..N CMake options> # optional
# OUTPUT_FILES <0..N names of result files to compare>
# NUM_PROCESSORS <number of processors to run this test on> # Is passed to mpirun
# TIMEOUT <Time in minutes> # Build is aborted if timeout is exceeded
Expand All @@ -18,7 +19,7 @@
#
# Benchmark(AUTHOR YS
# PATH RWPT/Forchheimer/forchheimer_rwpt
# REQUIRED_CMAKE_OPTIONS OGS_FEM
# CONFIG FEM
# OUTPUT_FILES
# forchheimer_rwpt_GROUNDWATER_FLOW60.vtu
# forchheimer_rwpt_domain_ele_GROUNDWATER_FLOW.tec
Expand All @@ -30,24 +31,28 @@ function(Benchmark)

# parse arguments
set(options NONE)
set(oneValueArgs AUTHOR PATH NUM_PROCESSORS TIMEOUT RUNTIME)
set(oneValueArgs AUTHOR PATH NUM_PROCESSORS TIMEOUT RUNTIME CONFIG)
set(multiValueArgs REQUIRED_CMAKE_OPTIONS OUTPUT_FILES)
cmake_parse_arguments(Benchmark "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

# set defaults
if(NOT Benchmark_CONFIG)
set(Benchmark_CONFIG FEM)
endif()
if(NOT Benchmark_NUM_PROCESSORS)
set(Benchmark_NUM_PROCESSORS 1)
endif()

if(NOT Benchmark_TIMEOUT)
set(Benchmark_TIMEOUT ${BENCHMARK_TIMEOUT})
endif()

if(NOT Benchmark_RUNTIME)
set(Benchmark_RUNTIME 1)
endif()

# Check required CMake configuration
if(NOT Benchmark_CONFIG STREQUAL OGS_CONFIG)
return()
endif()
foreach(REQUIRED_CMAKE_OPTION ${Benchmark_REQUIRED_CMAKE_OPTIONS})
if(NOT ${REQUIRED_CMAKE_OPTION})
return()
Expand Down
4 changes: 2 additions & 2 deletions scripts/cmake/test/RunBenchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ if (WIN32)

else ()

if(OGS_FEM_CONFIG STREQUAL "OGS_FEM_PETSC" OR OGS_FEM_CONFIG STREQUAL "OGS_FEM_PETSC_GEMS" OR OGS_FEM_CONFIG STREQUAL "OGS_FEM_MPI")
if(OGS_CONFIG STREQUAL PETSC OR OGS_CONFIG STREQUAL PETSC_GEMS OR OGS_CONFIG STREQUAL MPI)
set(MPI_RUN_COMMAND "mpirun" "-np" "${NUM_PROCESSES}")
else()
set(MPI_RUN_COMMAND "")
endif()

if(OGS_PROFILE AND NOT (OGS_FEM_CONFIG STREQUAL "OGS_FEM_PETSC" OR OGS_FEM_CONFIG STREQUAL "OGS_FEM_PETSC_GEMS" OR OGS_FEM_CONFIG STREQUAL "OGS_FEM_MPI"))
if(OGS_PROFILE AND NOT (OGS_CONFIG STREQUAL PETSC OR OGS_CONFIG STREQUAL PETSC_GEMS OR OGS_CONFIG STREQUAL MPI))
message(STATUS "Profiling benchmark")
if(OGS_OUTPUT_PROFILE)
message(STATUS "Executing gprof2dot.py")
Expand Down

0 comments on commit 44478f6

Please sign in to comment.