Skip to content

MPI support relies on removed C++ bindings #10

@lexming

Description

@lexming

There are 3 points in input.C where MPI is handled through its C++ bindings. These can be found at lines 1932, 2304 and 2694 and they all perform a very similar broadcast. The snippet of the first one follows:

StackBlock/input.C

Lines 1932 to 1944 in f95317b

#ifndef SERIAL
MPI::COMM_WORLD.Barrier();
long intdim = oneIntegralMem+twoIntegralMem;
long maxint = 26843540; //mpi cannot transfer more than these number of doubles
long maxIter = intdim/maxint;
for (int i=0; i<maxIter; i++) {
MPI::COMM_WORLD.Bcast(v1.set_data()+i*maxint, maxint, MPI_DOUBLE, 0);
MPI::COMM_WORLD.Barrier();
}
MPI::COMM_WORLD.Bcast(v1.set_data()+(maxIter)*maxint, oneIntegralMem+twoIntegralMem - maxIter*maxint, MPI_DOUBLE, 0);
MPI::COMM_WORLD.Barrier();
#endif

The issue is that the C++ bindings were deprecated in MPI 2.2 (almost 10 years ago) and removed in MPI 3.0, which makes StackBlock very difficult to compile in a modern MPI stack. Since StackBlock already uses Boost:MPI to leverage most of its MPI communications, the solution would be to move these 3 broadcast to Boost:MPI as well and delete the include on mpi.h altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions