Skip to content

Unable to build CLTs without MPI #68

Description

@jared321

The OpenBT Meson build system contains a use_mpi flag, which allows users to build the CLTs with and without MPI. By default, they are built with MPI parallelization. It does so by controlling appropriately the -D_OPENMPI compiler flag.

When I tried to build without MPI support as part of the v1.2.0 release testing, I got the following errors

../src/brt.cpp:1055:21: error: use of undeclared identifier 'MPI_IN_PLACE'
 1055 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                     ^
../src/brt.cpp:1055:49: error: use of undeclared identifier 'MPI_UNSIGNED'
 1055 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                 ^
../src/brt.cpp:1055:62: error: use of undeclared identifier 'MPI_SUM'
 1055 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                              ^
../src/brt.cpp:1055:70: error: use of undeclared identifier 'MPI_COMM_WORLD'
 1055 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                                      ^
../src/brt.cpp:1093:21: error: use of undeclared identifier 'MPI_IN_PLACE'
 1093 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                     ^
../src/brt.cpp:1093:49: error: use of undeclared identifier 'MPI_UNSIGNED'
 1093 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                 ^
../src/brt.cpp:1093:62: error: use of undeclared identifier 'MPI_SUM'
 1093 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                              ^
../src/brt.cpp:1093:70: error: use of undeclared identifier 'MPI_COMM_WORLD'
 1093 |       MPI_Allreduce(MPI_IN_PLACE,&nodenums[i],1,MPI_UNSIGNED,MPI_SUM,MPI_COMM_WORLD);
      |                                                                      ^
2 warnings and 8 errors generated.

If this failure is confirmed, should

  • MPI configurability be removed so that the CLT are always built with MPI or
  • fix the code so that such build errors don't occur?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions