Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

[submodule "src/cmake/blt"]
path = src/cmake/blt
url = [email protected]:LLNL/blt.git
url = ../../LLNL/blt.git
2 changes: 0 additions & 2 deletions src/components/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
message( "Entering /src/components/CMakeLists.txt")
blt_append_custom_compiler_flag(FLAGS_VAR CMAKE_CXX_FLAGS DEFAULT -I${CMAKE_SOURCE_DIR}/components/core/src)
blt_append_custom_compiler_flag(FLAGS_VAR CMAKE_CXX_FLAGS DEFAULT -I${PROJECT_BINARY_DIR}/include )


# Python config
Expand Down
2 changes: 1 addition & 1 deletion src/components/PhysicsSolverPackage1
70 changes: 44 additions & 26 deletions src/components/core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,36 @@ set(geosx_headers "" )
#

set(geosx_core_sources "" )

add_subdirectory(codingUtilities)
add_subdirectory(common)
add_subdirectory(constitutive)
add_subdirectory(dataRepository)
add_subdirectory(fileIO)
add_subdirectory(finiteElement)
#add_subdirectory(legacy)
add_subdirectory(math)
add_subdirectory(mesh)
add_subdirectory(schema)
add_subdirectory(managers)
add_subdirectory(MeshUtilities)
add_subdirectory(MPI_Communications)
add_subdirectory(PhysicsSolvers)
add_subdirectory(python)
add_subdirectory(systemSolverInterface)




set( coreLibs
codingUtilities
common
constitutive
dataRepository
fileIO
finiteElement
math
mesh
managers
meshUtilities
MPI_Communications
physicsSolvers
python
systemSolverInterface
)


set( coreLibLinkLine "")
foreach( lib ${coreLibs} )
add_subdirectory(${lib})
if( NOT ( ${lib} STREQUAL "math" OR ${lib} STREQUAL "python" ) )
set( coreLibLinkLine ${coreLibLinkLine} ${GEOSX_LINK_PREPEND_FLAG} ${lib} ${GEOSX_LINK_POSTPEND_FLAG} )
endif()
endforeach()



# Python config
Expand All @@ -49,14 +62,19 @@ endif()
#message( "extraComponentsListLink = ${extraComponentsListLink}" )
message("adding geosx_core library")

blt_add_library( NAME geosx_core
SOURCES ${geosx_core_sources}
HEADERS ${geosx_headers}
DEPENDS_ON optionparser cxx-utilities pugixml
${extraComponentsListLink}
${thirdPartyLibs}
SHARED TRUE
)

#blt_add_library( NAME geosx_core
# SOURCES ${geosx_core_sources}
# HEADERS ${geosx_headers}
# DEPENDS_ON ${coreLibs}
# ${extraComponentsListLink}
# ${thirdPartyLibs}
# SHARED TRUE
# )


message( "coreLibLinkLine = ${coreLibLinkLine}" )
add_library ( geosx_core SHARED ${coreLibs} )
target_link_libraries(geosx_core ${coreLibLinkLine})

geosx_add_code_checks(PREFIX core )

50 changes: 31 additions & 19 deletions src/components/core/src/MPI_Communications/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,39 @@
#
# Specify all headers
#
set(geosx_headers
${geosx_headers}
MPI_Communications/CommBufferOps.hpp
MPI_Communications/CommBufferOps_inline.hpp
MPI_Communications/CommunicationTools.hpp
MPI_Communications/NeighborCommunicator.hpp
MPI_Communications/NeighborCommunication.hpp
MPI_Communications/PartitionBase.hpp
MPI_Communications/SpatialPartition.hpp
PARENT_SCOPE )
set(MPI_Communications_headers
CommunicationTools.hpp
NeighborCommunicator.hpp
NeighborCommunication.hpp
PartitionBase.hpp
SpatialPartition.hpp
)


#
# Specify all sources
#
set(geosx_core_sources
${geosx_core_sources}
MPI_Communications/CommBufferOps.cpp
MPI_Communications/CommunicationTools.cpp
MPI_Communications/NeighborCommunicator.cpp
MPI_Communications/NeighborCommunication.cpp
MPI_Communications/PartitionBase.cpp
MPI_Communications/SpatialPartition.cpp
PARENT_SCOPE )
set(MPI_Communications_sources
CommunicationTools.cpp
NeighborCommunicator.cpp
NeighborCommunication.cpp
PartitionBase.cpp
SpatialPartition.cpp
)

set( dependencyList fileIO common )
set( dependencyList2 trilinos )
foreach( lib ${dependencyList} )
set( dependencyList2 ${dependencyList2} ${GEOSX_LINK_PREPEND_FLAG} ${lib} ${GEOSX_LINK_POSTPEND_FLAG} )
endforeach()
message( "dependencyList2 = ${dependencyList2}" )

blt_add_library( NAME MPI_Communications
SOURCES ${MPI_Communications_sources}
HEADERS ${MPI_Communications_headers}
DEPENDS_ON ${dependencyList2}
SHARED FALSE
)

target_include_directories( MPI_Communications PUBLIC ${CMAKE_SOURCE_DIR}/components/core/src)
geosx_add_code_checks(PREFIX MPI_Communications )
29 changes: 0 additions & 29 deletions src/components/core/src/MeshUtilities/CMakeLists.txt

This file was deleted.

26 changes: 0 additions & 26 deletions src/components/core/src/PhysicsSolvers/CMakeLists.txt

This file was deleted.

33 changes: 24 additions & 9 deletions src/components/core/src/codingUtilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,31 @@
#
# Specify all headers
#
set(geosx_headers
${geosx_headers}
codingUtilities/StringUtilities.hpp
codingUtilities/IOUtilities.hpp
PARENT_SCOPE )
set( codingUtilities_headers
StringUtilities.hpp
IOUtilities.hpp
)

#
# Specify all sources
#
set(geosx_core_sources
${geosx_core_sources}
codingUtilities/StringUtilities.cpp
PARENT_SCOPE )
set( codingUtilities_sources
StringUtilities.cpp
)

set( dependencyList common )
set( dependencyList2 RAJA )
foreach( lib ${dependencyList} )
set( dependencyList2 ${dependencyList2} ${GEOSX_LINK_PREPEND_FLAG} ${lib} ${GEOSX_LINK_POSTPEND_FLAG} )
endforeach()
message( "dependencyList2 = ${dependencyList2}" )

blt_add_library( NAME codingUtilities
SOURCES ${codingUtilities_sources}
HEADERS ${codingUtilities_headers}
DEPENDS_ON ${dependencyList2}
SHARED FALSE
)

target_include_directories( codingUtilities PUBLIC ${CMAKE_SOURCE_DIR}/components/core/src)
geosx_add_code_checks(PREFIX codingUtilities )
42 changes: 30 additions & 12 deletions src/components/core/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,37 @@
#
# Specify all headers
#
set(geosx_headers
${geosx_headers}
common/integer_conversion.hpp
common/DataTypes.hpp
common/InterObjectRelation.hpp
common/Logger.hpp
common/SortedArray.hpp
PARENT_SCOPE )
set(common_headers
integer_conversion.hpp
DataTypes.hpp
InterObjectRelation.hpp
Logger.hpp
SortedArray.hpp )

#
# Specify all sources
#
set(geosx_core_sources
${geosx_core_sources}
common/Logger.cpp
PARENT_SCOPE )
set(common_sources
Logger.cpp )


set( dependencyList cxx-utilities )
set( dependencyList2 mpi )
foreach( lib ${dependencyList} )
set( dependencyList2 ${dependencyList2} ${GEOSX_LINK_PREPEND_FLAG} ${lib} ${GEOSX_LINK_POSTPEND_FLAG} )
endforeach()
message( "dependencyList2 = ${dependencyList2}" )


blt_add_library( NAME common
SOURCES ${common_sources}
HEADERS ${common_headers}
DEPENDS_ON ${dependencyList2}
SHARED FALSE
)



target_include_directories( common PUBLIC ${CMAKE_SOURCE_DIR}/components/core/src)

geosx_add_code_checks(PREFIX common )
24 changes: 12 additions & 12 deletions src/components/core/src/common/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ void geos_abort( std::string message )
{
std::cerr<<message<<std::endl;
cxx_utilities::handler1(EXIT_FAILURE);
//#if USE_MPI == 1
// int mpi = 0;
// MPI_Initialized( &mpi );
// if ( mpi )
// {
// MPI_Abort( MPI_COMM_WORLD, EXIT_FAILURE );
// }
// else
//#endif
// {
// exit( EXIT_FAILURE );
// }
#if USE_MPI == 1
int mpi = 0;
MPI_Initialized( &mpi );
if ( mpi )
{
MPI_Abort( MPI_COMM_WORLD, EXIT_FAILURE );
}
else
#endif
{
exit( EXIT_FAILURE );
}
}

}
2 changes: 1 addition & 1 deletion src/components/core/src/common/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define SRC_COMPONENTS_CORE_SRC_COMMON_LOGGER_HPP_

#include <string>
#include "common/GeosxConfig.hpp"
#include "GeosxConfig.hpp"
#include <sstream>
#ifdef USE_ATK
#include "slic/slic.hpp"
Expand Down
39 changes: 27 additions & 12 deletions src/components/core/src/constitutive/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
#
# Specify all headers
#
set(geosx_core_sources
${geosx_core_sources}
constitutive/ConstitutiveManager.hpp
constitutive/ConstitutiveBase.hpp
constitutive/LinearElasticIsotropic.hpp
PARENT_SCOPE )
set( constitutive_headers
ConstitutiveManager.hpp
ConstitutiveBase.hpp
LinearElasticIsotropic.hpp
)
#
# Specify all sources
#
set(geosx_core_sources
${geosx_core_sources}
constitutive/ConstitutiveManager.cpp
constitutive/ConstitutiveBase.cpp
constitutive/LinearElasticIsotropic.cpp
PARENT_SCOPE )
set( constitutive_sources
ConstitutiveManager.cpp
ConstitutiveBase.cpp
LinearElasticIsotropic.cpp
)

set( dependencyList dataRepository )
set( dependencyList2 "" )
foreach( lib ${dependencyList} )
set( dependencyList2 ${dependencyList2} ${GEOSX_LINK_PREPEND_FLAG} ${lib} ${GEOSX_LINK_POSTPEND_FLAG} )
endforeach()
message( "dependencyList2 = ${dependencyList2}" )

blt_add_library( NAME constitutive
SOURCES ${constitutive_sources}
HEADERS ${constitutive_headers}
DEPENDS_ON ${dependencyList2}
SHARED FALSE
)

target_include_directories( constitutive PUBLIC ${CMAKE_SOURCE_DIR}/components/core/src)
geosx_add_code_checks(PREFIX constitutive )
Loading