Project

General

Profile

Bug #729

With GMX_THREADS on, cmake blindly sets GMX_MPI=1

Added by Mark Abraham over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build system
Target version:
Affected version - extra info:
release-4-5-patches, 4.5.3, 4.5.4
Affected version:
Difficulty:
uncategorized
Close

Description

If GMX_THREADS is on, then GMX_MPI is set to 1 without testing whether or not an MPI or thread_mpi library exists. This can lead to build problems when one doesn't exist. In particular, g_pme_error can be compiled with GMX_MPI=1 and shared libraries on, but the resulting executable breaks for lack of those MPI libraries at run time.

Some more complex CMake mechanism is required, but I don't know what the needs of threads+MPI actually are.

Associated revisions

Revision 162c2295 (diff)
Added by Sander Pronk over 8 years ago

Fixed g_pme_error to use MPI, but not threads.

This fixes issue #729.

History

#1 Updated by Sander Pronk over 8 years ago

Mark Abraham wrote:

If GMX_THREADS is on, then GMX_MPI is set to 1 without testing whether or not an MPI or thread_mpi library exists. This can lead to build problems when one doesn't exist. In particular, g_pme_error can be compiled with GMX_MPI=1 and shared libraries on, but the resulting executable breaks for lack of those MPI libraries at run time.

Some more complex CMake mechanism is required, but I don't know what the needs of threads+MPI actually are.

Hi Mark,

Because thread_mpi is included in the gromacs distribution, it always exists and in principle all of the MPI API is always available. IMO it's up to the individual tools to use that API correctly in the presence of either library: that way they could be used with multiple MPI processes and with multiple threads.

The place where there are differences between the MPI library and thread_mpi is when spawning threads with init_par(): that specifically checks for thread_mpi and postpones spawning multiple threads. With MPI, multiple processes obviously always exist.

I'll fix the g_pme_error issue later today.

#2 Updated by Sander Pronk over 8 years ago

  • Status changed from New to Closed

Also available in: Atom PDF