Skip to content

Commit 5fbdbec

Browse files
committed
Fix issues wrt MPICH
1 parent df1a8a6 commit 5fbdbec

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

cmake/modules/FindOrFetchMADWorld.cmake

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ if (NOT TARGET MADworld)
4141

4242
# look for C and MPI here to make troubleshooting easier and be able to override defaults for MADNESS
4343
enable_language(C)
44-
find_package(MPI REQUIRED COMPONENTS C CXX)
44+
find_package(MPI REQUIRED COMPONENTS C)
4545

46+
set(FETCHCONTENT_QUIET FALSE)
4647
include(FetchContent)
4748
FetchContent_Declare(
4849
MADNESS
49-
GIT_REPOSITORY https://github.com/m-a-d-n-e-s-s/madness.git
50+
GIT_REPOSITORY https://github.com/m-a-d-n-e-s-s/madness.git
5051
GIT_TAG ${TA_TRACKED_MADNESS_TAG}
52+
GIT_PROGRESS TRUE
5153
)
5254
FetchContent_MakeAvailable(MADNESS)
5355
FetchContent_GetProperties(MADNESS

python/src/TiledArray/python/module.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ static World &initialize() {
4040
// this loads MPI before TA tries to do it
4141
int initialized = 0;
4242
MPI_Initialized(&initialized);
43-
MPI_Comm ta_comm;
4443

45-
if (!initialized) {
46-
ta_comm = MPI_COMM_WORLD;
47-
} else {
44+
if (initialized) {
4845
int thread_level;
4946
MPI_Query_thread(&thread_level);
5047
if (thread_level != MPI_THREAD_MULTIPLE)
@@ -58,10 +55,10 @@ static World &initialize() {
5855
char *_argv[0];
5956
char **argv = _argv;
6057
if (!madness::initialized()) {
61-
madness::initialize(argc, argv, ta_comm);
58+
madness::initialize(argc, argv);
6259
initialized_madness = true;
6360
}
64-
TiledArray::World &world = TiledArray::initialize(argc, argv, ta_comm);
61+
TiledArray::World &world = TiledArray::initialize(argc, argv, MPI_COMM_WORLD);
6562
TiledArray::set_default_world(world);
6663
if (world.rank() == 0) {
6764
std::cout << "initialized TA in a world with " << world.size() << " ranks"

0 commit comments

Comments
 (0)