Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Debug & MPI-Off builds #106

Merged
merged 22 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bbdbb63
Pulling in some blueos build scripts.
mdavis36 Sep 22, 2021
c433bb0
Add *.core to gitignore
mdavis36 Sep 22, 2021
a76f85a
Fixing conduit lib r-path
mdavis36 Sep 22, 2021
42118fc
Fixing testNestedGridNeigbor running on debug build w/ DBC enabled.
mdavis36 Sep 22, 2021
0501e7b
Attempting to add distributed flag to tests that always require dist …
mdavis36 Sep 22, 2021
b277490
Merge branch 'develop' into bugfix/debug-mpi-builds
mdavis36 Sep 22, 2021
41a3504
Use Conduit static libs.
mdavis36 Sep 30, 2021
de4bd9b
Fixing C++ test executable link line.
mdavis36 Sep 30, 2021
65a3763
Fixing runtime error from registrar when building debug + static libs.
mdavis36 Sep 30, 2021
e2fc5d3
Ensure we only build hdf5 static libs.
mdavis36 Sep 30, 2021
0d9b4c0
Merge branch 'develop' into bugfix/debug-mpi-builds
mdavis36 Oct 7, 2021
7ce8cb6
Merge branch 'develop' into bugfix/debug-mpi-builds
jmikeowen Oct 15, 2021
67c86d9
Updated all singleton classes to use the more modern singleton pattern
jmikeowen Oct 15, 2021
1822b7a
Merge branch 'develop' into bugfix/debug-mpi-builds
jmikeowen Oct 21, 2021
eb3442b
- Moved the Python MPI wrappers into Distributed
jmikeowen Oct 22, 2021
dddbfcd
Getting all our distributors up to date
jmikeowen Oct 22, 2021
398b176
Nodes are in a different order now -- loosened test tolerance so we're
jmikeowen Oct 22, 2021
4fee207
Adding backwards compatible default distributor
jmikeowen Oct 22, 2021
6aa9ee6
Getting bit-perfect same results as reference data requires using the
jmikeowen Oct 22, 2021
82acade
Merging Develop.
mdavis36 Jan 21, 2022
0a582c0
Fixing testSampleMultipleFields2Lattice2d.py for seq builds.
mdavis36 Jan 21, 2022
c1e8af0
Merge branch 'develop' into bugfix/develop/debug-mpi-off-builds
mdavis36 Jan 21, 2022
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 cmake/spheral/SpheralAddLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function(spheral_add_pybind11_library package_name)

# Set the r-path of the C++ lib such that it is independent of the build dir when installed
set_target_properties(${MODULE_NAME} PROPERTIES
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${boost_DIR}/lib;${python_DIR}/lib"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${boost_DIR}/lib;${python_DIR}/lib"
)

endfunction()
2 changes: 1 addition & 1 deletion cmake/tpl/hdf5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(${lib_name}_BUILD)
URL ${HDF5_URL}
URL_HASH "MD5=${HDF5_MD5}"
DOWNLOAD_DIR ${CACHE_DIR}
CONFIGURE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CXXFLAGS=-fPIC FCFLAGS=-fPIC ${HDF5_PREFIX}/src/hdf5/configure --prefix=${${lib_name}_DIR}
CONFIGURE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CXXFLAGS=-fPIC FCFLAGS=-fPIC ${HDF5_PREFIX}/src/hdf5/configure --prefix=${${lib_name}_DIR} --enable-shared=no
BUILD_COMMAND make
INSTALL_COMMAND make install

Expand Down
26 changes: 26 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-debug-mpi-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
26 changes: 26 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-debug-seq-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=Off \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
27 changes: 27 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-release-mpi-cxx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DENABLE_STATIC_CXXONLY=On \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
26 changes: 26 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-release-mpi-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
26 changes: 26 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-release-seq-cxx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DENABLE_OPENMP=On \
-DENABLE_MPI=Off \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DENABLE_STATIC_CXXONLY=On \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
26 changes: 26 additions & 0 deletions scripts/lc-builds/blueos_gcc8.3.1-release-seq-python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load gcc/8.3.1

cmake \
../.. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/blueos/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=Off \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
"$@" \
#-DSPHERAL_TPL_DIR=/usr/workspace/wsrzd/davis291/SPHERAL/blueos_Spheral_gcc8_noMPI/install/tpl \
27 changes: 27 additions & 0 deletions scripts/lc-builds/blueos_xl2021.03.11-release-seq-cxx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

SCRIPT_PATH=${0%/*}
. "$SCRIPT_PATH/utils/parse-args.sh"

# Inherit build directory name from script name
BUILD_SUFFIX="lc_$(TMP=${BASH_SOURCE##*/}; echo ${TMP%.*})"

rm -rf ${BUILD_SUFFIX} 2>/dev/null
mkdir -p ${BUILD_SUFFIX}/install
mkdir -p ${BUILD_SUFFIX}/build && cd ${BUILD_SUFFIX}/build

module load cmake/3.14.5
module load xl/2021.03.11

cmake \
${SRC_DIR} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/xl/xl-2021.03.11/bin/xlc++ \
-DCMAKE_Fortran_COMPILER=/usr/tce/packages/xl/xl-2021.03.11/bin/xlf \
-DENABLE_OPENMP=Off \
-DENABLE_MPI=Off \
-DENABLE_ANEOS=Off \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DENABLE_STATIC_CXXONLY=On \
$CMAKE_ARGS \
#-C ${HOST_CONFIGS_DIR}/lc-builds/toss3/gcc8.3.1_tpl.cmake \
1 change: 1 addition & 0 deletions scripts/lc-builds/toss3_gcc8.3.1-debug-mpi-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/toss3/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
Expand Down
1 change: 1 addition & 0 deletions scripts/lc-builds/toss3_gcc8.3.1-release-seq-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ \
-C ${HOST_CONFIGS_DIR}/lc-builds/toss3/gcc8.3.1_tpl.cmake \
-DBLT_CXX_STD=c++14 \
-DENABLE_OPENMP=On \
-DENABLE_MPI=Off \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
Expand Down
7 changes: 0 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,11 @@ list(APPEND _packages

if(NOT ENABLE_CXXONLY)
list(APPEND _packages
PythonMPIInterfaces
SimulationControl
Pybind11Wraps
)
endif()

if(NOT ENABLE_MPI)
list(REMOVE_ITEM _packages
Distributed
)
endif()

foreach(_package ${_packages})
add_subdirectory(${_package})
endforeach()
Expand Down
26 changes: 0 additions & 26 deletions src/DataOutput/RestartRegistrar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,6 @@ struct CompareWeakPtr: public std::binary_function<std::weak_ptr<T>, std::weak_p
}
};

//------------------------------------------------------------------------------
// Get the instance.
//------------------------------------------------------------------------------
RestartRegistrar&
RestartRegistrar::
instance() {
return *RestartRegistrar::instancePtr();
}

//------------------------------------------------------------------------------
// Get the instance (pointer).
//------------------------------------------------------------------------------
RestartRegistrar*
RestartRegistrar::
instancePtr() {
if (mInstancePtr == 0) mInstancePtr = new RestartRegistrar;
CHECK(mInstancePtr != 0);
mInstancePtr->removeExpiredPointers();
return mInstancePtr;
}

//------------------------------------------------------------------------------
// Register a RestartHandle.
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -235,8 +214,3 @@ RestartRegistrar::
}

}

//------------------------------------------------------------------------------
// Initialize the static instance pointer.
//-----------------------------------------------------------------------------
Spheral::RestartRegistrar* Spheral::RestartRegistrar::mInstancePtr = 0;
4 changes: 0 additions & 4 deletions src/DataOutput/RestartRegistrar.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public:

// Get the instance.
static RestartRegistrar& instance();
static RestartRegistrar* instancePtr();

// Methods for registering a RestartHandle.
void registerRestartHandle(std::shared_ptr<RestartHandle> restartHandlePtr,
Expand Down Expand Up @@ -68,9 +67,6 @@ private:
typedef PriorityContainer::const_iterator const_priority_iterator;
typedef PriorityContainer::iterator priority_iterator;

// The one and only instance.
static RestartRegistrar* mInstancePtr;

// The list of RestartHandles and their priorities.
RestartHandleContainer mRestartHandles;
PriorityContainer mPriorities;
Expand Down
11 changes: 11 additions & 0 deletions src/DataOutput/RestartRegistrarInline.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
namespace Spheral {

//------------------------------------------------------------------------------
// Get the instance.
//------------------------------------------------------------------------------
inline
RestartRegistrar&
RestartRegistrar::
instance() {
static RestartRegistrar theInstance;
return theInstance;
}

//------------------------------------------------------------------------------
// The non-const iterators.
//------------------------------------------------------------------------------
Expand Down
25 changes: 0 additions & 25 deletions src/Distributed/BoundingVolumeDistributedBoundary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,6 @@ using std::abs;

namespace Spheral {

// Static initialization of singleton instance.
template <typename Dimension>
BoundingVolumeDistributedBoundary<Dimension>*
BoundingVolumeDistributedBoundary<Dimension>::mInstance = 0;

//------------------------------------------------------------------------------
// Singleton instance method.
//------------------------------------------------------------------------------
template<typename Dimension>
BoundingVolumeDistributedBoundary<Dimension>&
BoundingVolumeDistributedBoundary<Dimension>::
instance() {
if (mInstance == 0) {
mInstance = new BoundingVolumeDistributedBoundary();
} // end if
return *mInstance;
}

template<typename Dimension>
BoundingVolumeDistributedBoundary<Dimension>*
BoundingVolumeDistributedBoundary<Dimension>::
instancePtr() {
return &(instance());
}

//------------------------------------------------------------------------------
// Constructor.
//------------------------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions src/Distributed/BoundingVolumeDistributedBoundary.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public:

// This method returns the singleton instance of the object.
static BoundingVolumeDistributedBoundary& instance();
static BoundingVolumeDistributedBoundary* instancePtr();

// Destructor.
virtual ~BoundingVolumeDistributedBoundary();
Expand All @@ -50,9 +49,6 @@ public:

private:
//--------------------------- Private Interface ---------------------------//
// Singleton instance pointer.
static BoundingVolumeDistributedBoundary* mInstance;

// Disabled methods.
BoundingVolumeDistributedBoundary();
BoundingVolumeDistributedBoundary(const BoundingVolumeDistributedBoundary&);
Expand All @@ -68,6 +64,8 @@ private:

}

#include "BoundingVolumeDistributedBoundaryInline.hh"

#else

// Forward declaration.
Expand Down
15 changes: 15 additions & 0 deletions src/Distributed/BoundingVolumeDistributedBoundaryInline.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Spheral {

//------------------------------------------------------------------------------
// Singleton instance method.
//------------------------------------------------------------------------------
template<typename Dimension>
inline
BoundingVolumeDistributedBoundary<Dimension>&
BoundingVolumeDistributedBoundary<Dimension>::
instance() {
static BoundingVolumeDistributedBoundary<Dimension> theInstance;
return theInstance;
}

}
Loading