Open shaunhaskey opened 3 years ago
For the development version OpenMP is recommended because of the mixed species changes made the MPI version slower. I still haven't figured out a way to make merging neutral particle reservoirs more efficient using MPI. The v2.0 release should still use MPI.
The submit_fidasim
script automatically determines whether the executable is OpenMP or MPI and submits the job accordingly. This is done by looking for MPI/OpenMP libraries inside the executable. (see below)
check_output = lambda args: subprocess.Popen(args, stdout = subprocess.PIPE).communicate()[0]
def is_mpi_executable(executable):
ldd_out = check_output(['ldd',executable])
libraries = {}
for line in ldd_out.splitlines():
match = re.match(r'\t(.*) => (.*) \(0x', line.decode('utf-8'))
if match:
libraries[match.group(1)] = match.group(2)
return any('libmpi' in s for s in libraries.keys())
@lstagner Hmmm fun way of figuring out if it is MPI or OpenMP :). I am running it from OMFIT land, so I'm generating my own job scripts and not using the submit_fidasim. For now will just hard code what to do for each version - maybe think about doing what you are in that method at some point. You don't like the idea of having both an omp and mpi executable in the public installs?
Is OpenMP supposed to be the more 'default'/most reliable multiprocessing option for FIDASIM at the moment? I noticed the official install of fidasim/v2.0 on iris seemed to be running slowly, turns out it was built for MPI and I was running it like it was built for OpenMP: ./fidasim def_inputs nprocessors (because I thought that was the more standard option):
fidasim/dev however is built for OpenMP.
Which 'version' is preferred, and is it worth building both and having fidasim_mpi and fidasim_omp executables in the 'official' install locations with a symlink for fidasim to the more standard option?