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
6 changes: 4 additions & 2 deletions cmake/modules/FindOrFetchMADWorld.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ if (NOT TARGET MADworld)

# look for C and MPI here to make troubleshooting easier and be able to override defaults for MADNESS
enable_language(C)
find_package(MPI REQUIRED COMPONENTS C CXX)
find_package(MPI REQUIRED COMPONENTS C)

set(FETCHCONTENT_QUIET FALSE)
include(FetchContent)
FetchContent_Declare(
MADNESS
GIT_REPOSITORY https://github.com/m-a-d-n-e-s-s/madness.git
GIT_REPOSITORY https://github.com/m-a-d-n-e-s-s/madness.git
GIT_TAG ${TA_TRACKED_MADNESS_TAG}
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(MADNESS)
FetchContent_GetProperties(MADNESS
Expand Down
9 changes: 3 additions & 6 deletions python/src/TiledArray/python/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ static World &initialize() {
// this loads MPI before TA tries to do it
int initialized = 0;
MPI_Initialized(&initialized);
MPI_Comm ta_comm;

if (!initialized) {
ta_comm = MPI_COMM_WORLD;
} else {
if (initialized) {
int thread_level;
MPI_Query_thread(&thread_level);
if (thread_level != MPI_THREAD_MULTIPLE)
Expand All @@ -58,10 +55,10 @@ static World &initialize() {
char *_argv[0];
char **argv = _argv;
if (!madness::initialized()) {
madness::initialize(argc, argv, ta_comm);
madness::initialize(argc, argv);
initialized_madness = true;
}
TiledArray::World &world = TiledArray::initialize(argc, argv, ta_comm);
TiledArray::World &world = TiledArray::initialize(argc, argv, MPI_COMM_WORLD);
TiledArray::set_default_world(world);
if (world.rank() == 0) {
std::cout << "initialized TA in a world with " << world.size() << " ranks"
Expand Down
Loading