Skip to content

Commit

Permalink
Merge pull request #1583 from andlaus/more_flow_build_parallelism
Browse files Browse the repository at this point in the history
make the build of flow fully parallelizable
  • Loading branch information
akva2 committed Sep 28, 2018
2 parents 949b88d + d7efb36 commit 9ac269a
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 36 deletions.
19 changes: 17 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,26 @@ if (NOT EIGEN3_FOUND)
add_dependencies (opmsimulators Eigen3)
endif (NOT EIGEN3_FOUND)



if (HAVE_OPM_TESTS)
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
endif()

opm_add_test(flow
ONLY_COMPILE
ALWAYS_ENABLE
DEPENDS "opmsimulators"
LIBRARIES "opmsimulators"
SOURCES
flow/flow.cpp
flow/flow_ebos_blackoil.cpp
flow/flow_ebos_gasoil.cpp
flow/flow_ebos_oilwater.cpp
flow/flow_ebos_polymer.cpp
flow/flow_ebos_solvent.cpp
flow/flow_ebos_energy.cpp
flow/flow_ebos_oilwater_polymer.cpp)
install(TARGETS flow DESTINATION bin)

include(OpmBashCompletion)
opm_add_bash_completion(flow)

20 changes: 0 additions & 20 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@
# originally generated with the command:
# find opm -name '*.c*' -printf '\t%p\n' | sort
list (APPEND MAIN_SOURCE_FILES
# place the flow_ebos_*.cpp files on top of the list because they
# take the longest to compile, and compiling them first speeds up
# parallel builds because it allows the jobserver to do better scheduling
opm/simulators/flow_ebos_blackoil.cpp
opm/simulators/flow_ebos_gasoil.cpp
opm/simulators/flow_ebos_oilwater.cpp
opm/simulators/flow_ebos_polymer.cpp
opm/simulators/flow_ebos_solvent.cpp
opm/simulators/flow_ebos_energy.cpp
opm/simulators/flow_ebos_oilwater_polymer.cpp

opm/autodiff/Compat.cpp
opm/autodiff/ExtractParallelGridInformationToISTL.cpp
opm/autodiff/NewtonIterationBlackoilCPR.cpp
Expand Down Expand Up @@ -226,7 +215,6 @@ list (APPEND EXAMPLE_SOURCE_FILES
examples/flow_legacy.cpp
examples/flow_reorder.cpp
examples/flow_sequential.cpp
examples/flow.cpp
examples/sim_2p_incomp_ad.cpp
examples/sim_2p_comp_reorder.cpp
examples/sim_simple.cpp
Expand All @@ -252,7 +240,6 @@ list (APPEND PROGRAM_SOURCE_FILES
examples/sim_2p_incomp.cpp
examples/sim_2p_incomp_ad.cpp
examples/sim_2p_comp_reorder.cpp
examples/flow.cpp
examples/flow_legacy.cpp
examples/flow_reorder.cpp
examples/flow_sequential.cpp
Expand Down Expand Up @@ -447,13 +434,6 @@ list (APPEND PUBLIC_HEADER_FILES
opm/polymer/TransportSolverTwophaseCompressiblePolymer.hpp
opm/polymer/Point2D.hpp
opm/polymer/TransportSolverTwophasePolymer.hpp
opm/simulators/flow_ebos_blackoil.hpp
opm/simulators/flow_ebos_gasoil.hpp
opm/simulators/flow_ebos_oilwater.hpp
opm/simulators/flow_ebos_polymer.hpp
opm/simulators/flow_ebos_solvent.hpp
opm/simulators/flow_ebos_energy.hpp
opm/simulators/flow_ebos_oilwater_polymer.hpp
opm/simulators/ensureDirectoryExists.hpp
opm/simulators/ParallelFileMerger.hpp
opm/simulators/SimulatorCompressibleTwophase.hpp
Expand Down
14 changes: 7 additions & 7 deletions examples/flow.cpp → flow/flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
*/
#include "config.h"

#include <opm/simulators/flow_ebos_blackoil.hpp>
#include <opm/simulators/flow_ebos_gasoil.hpp>
#include <opm/simulators/flow_ebos_oilwater.hpp>
#include <opm/simulators/flow_ebos_solvent.hpp>
#include <opm/simulators/flow_ebos_polymer.hpp>
#include <opm/simulators/flow_ebos_energy.hpp>
#include <opm/simulators/flow_ebos_oilwater_polymer.hpp>
#include <flow/flow_ebos_blackoil.hpp>
#include <flow/flow_ebos_gasoil.hpp>
#include <flow/flow_ebos_oilwater.hpp>
#include <flow/flow_ebos_solvent.hpp>
#include <flow/flow_ebos_polymer.hpp>
#include <flow/flow_ebos_energy.hpp>
#include <flow/flow_ebos_oilwater_polymer.hpp>

#include <opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp>
#include <opm/autodiff/FlowMainEbos.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Define making clear that the simulator supports AMG
#define FLOW_SUPPORT_AMG 1

#include <opm/simulators/flow_ebos_blackoil.hpp>
#include <flow/flow_ebos_blackoil.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include "config.h"

#include <opm/simulators/flow_ebos_energy.hpp>
#include <flow/flow_ebos_energy.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Define making clear that the simulator supports AMG
#define FLOW_SUPPORT_AMG 1

#include <opm/simulators/flow_ebos_gasoil.hpp>
#include <flow/flow_ebos_gasoil.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <ewoms/models/blackoil/blackoiltwophaseindices.hh>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Define making clear that the simulator supports AMG
#define FLOW_SUPPORT_AMG 1

#include <opm/simulators/flow_ebos_oilwater.hpp>
#include <flow/flow_ebos_oilwater.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <ewoms/models/blackoil/blackoiltwophaseindices.hh>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Define making clear that the simulator supports AMG
#define FLOW_SUPPORT_AMG 1

#include <opm/simulators/flow_ebos_oilwater_polymer.hpp>
#include <flow/flow_ebos_oilwater_polymer.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <ewoms/models/blackoil/blackoiltwophaseindices.hh>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include "config.h"

#include <opm/simulators/flow_ebos_polymer.hpp>
#include <flow/flow_ebos_polymer.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include "config.h"

#include <opm/simulators/flow_ebos_solvent.hpp>
#include <flow/flow_ebos_solvent.hpp>

#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
Expand Down
File renamed without changes.

0 comments on commit 9ac269a

Please sign in to comment.