ExternalLibraries/MPI should check that MPI_DIR points to a valid directory

Create issue
Issue #1010 new
Ian Hinder created an issue

The MPI thorn currently does not check that MPI_DIR points to a valid directory. The attached patch fixes this and also prints a message containing the (possibly inferred) location of the MPI installation.

OK to apply?

Keyword:

Comments (2)

  1. Erik Schnetter
    • removed comment

    The message "Found MPI in ..." is the same as when thorn MPI actually looks for MPI; this is confusing, because people won't know which path printed the message.

    On some machine there is no specific MPI directory, e.g. on Crays. (This is similar to Intel's MKL library that is used by passing the "-mkl" flag to the compiler instead of specifying a particular directory.) Currently I specify "NO_BUILD" for MPI_DIR there. This or something equivalent should also be supported.

    I'm not sure how much checking we want to do on user configuration input. For example, we could also check whether the include and library directories exist, or whether there is a file mpi.h in the include path, or whether the specified libraries exist. Of course, these may also exist in standard system locations (so will be found automatically), etc., so things are complicated.

    On Mac OS X with MacPorts, OpenMPI is installed in a strange way, and we specify the include and library paths directly. Thus the actual content of MPI_DIR will be ignored, so checking that it exists doesn't add value.

    What we probably should do instead is to build (and run?) a small MPI program to see whether things work correctly. Since we already know how to build a library this shouldn't be difficult to do.

    Maybe we should also have a configuration option specifying which MPIRUN to use instead of leaving this to Simfactory.

  2. Log in to comment