[CMake] oversubscribing OpenMPI in tests

Thompson, KT kgt at lanl.gov
Thu Jun 16 16:45:33 EDT 2016


Zaak,

I use ‘execute_process (${MPIEXEC} --version)’ and match the output to a string (Open MPI, ALPS, MPICH).  This isn’t the most elegant solution, but it seems fairly robust.

-kt

From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Zaak Beekman
Sent: Thursday, June 16, 2016 9:14 AM
To: cmake at cmake.org
Subject: [CMake] oversubscribing OpenMPI in tests

Does anyone know a good way to determine if `find_package(MPI REQUIRED)` is returning OpenMPI? I need to know, because OpenMPI does not handle oversubscribed (more ranks than cores) tests well without explicitly telling OpenMPI that you are oversubscribing. This can be done by creating a hosts file, and passing some flags to `mpirun` to tell it to use the hosts file, or can be accomplished by passing the `--oversubscribe` flag. The problem is that MPICH has different flags/host-file syntax.

(I am oversubscribing some of the project's tests because this will often find correctness problems due to race conditions or other parallel programming errors that are not always exposed otherwise.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160616/cc1cb6a4/attachment-0001.html>


More information about the CMake mailing list