nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Question about parallelization

Open AmirShahbazi90 opened this issue 1 year ago • 4 comments

Is it possible to use NOMAD in parallelization both for python and matlab?

AmirShahbazi90 avatar May 16 '23 15:05 AmirShahbazi90

Current release of PyNOMAD is compiled without OpenMP support. The same goes for MATLAB interface.

You can bring your own parallelism by setting BB_MAX_BLOCK_SIZE and evaluating blocks in parallel with, for example, mpi4py.futures.MPIPoolExecutor or concurrent.futures.ProcessPoolExecutor and a pool of (remote) processes.

jan-provaznik avatar May 16 '23 16:05 jan-provaznik

Is it possible to run PSD-MADS in NOMAD4 just like in NOMAD3? For example, if I set BB_EXE "$python3 my_func.py" and PSD_MADS_OPTIMIZATION TRUE in "param.txt", will it call PSD-MADS if I simply run $NOMAD_HOME/bin/nomad param.txt ? Or do I have to use mpirun to call $NOMAD_HOME/bin/nomad?

TianningGao avatar Jun 21 '23 02:06 TianningGao

PSD-Mads in Nomad 4 is based upon OpenMP. In Nomad 3 it uses mpi. The algo is essentially the same in the two Nomad versions. In Nomad 4, the activation of PSD-Mads algorithm requires building Nomad with OpenMP (if it is available it is enabled by default, and you will see a "-- Test OpenMP for parallel functionalities -- found" during cmake setup) and the PSD_MADS_OPTIMIZATION parameter set to True.

ctribes avatar Jun 21 '23 12:06 ctribes

@ctribes Got it, thanks.

TianningGao avatar Jun 22 '23 02:06 TianningGao