Hello,
I am trying to make use of Minuit2 parallelization. I’ve managed to rebuild ROOT with
export USE_OPENMP=1
export USE_PARALLEL_MINUIT2=1
Then I have created my FCN function to minimize and called the line
ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit2");
Then I have compiled the code and set the environment variable
export OMP_NUM_THREADS=8
However, when running my application it always runs on 1 core:
Minuit2Minimizer: Minimize with max-calls 400000 convergence for edm < 0.01 strategy 1
MnSeedGenerator: for initial parameters FCN = 66510892
Info --> MPIProcess::StartMPI: Start MPI on #0 processor
MnSeedGenerator: Initial state: - FCN = 66510892 Edm = 9.22656e+07 NCalls = 2619
VariableMetric: start iterating until Edm is < 2e-05
....
Maybe I have to set some additional env. variables?
Thanks,
Balint
_ROOT Version: 6.10.08
_Platform: Red Hat
_Compiler: g++ 7.3.1
moneta
February 18, 2019, 10:14am
2
Hi,
I presume you are still building ROOT with configure; make and not cmake.
And I also guess you want to use Open MPI and not OpenMP. OpenMPI will run many processes, while OpenMP will run in multi-threads.
For OpenMPI you need to set the env variable USE_MPI
and you should be control the number of processors with mpirun
Lorenzo
Hi Lorenzo,
sorry for my confusing lines. Indeed, I use Open MPI (not OpenMP), so what I did was indeed the following for the building:
export USE_PARALLEL_MINUIT2=1
export USE_MPI=1
but I used cmake
, so then I’ll have to probably remake it with configure;make
. During the build process
I had to manually go into the minuit folder and give the mpi include path -I/usr/include/openmpi-1.10-x86_64 -pthread -m64
for the g++
build command.
So, indeed previously I did not run it via mpirun
. Now after your e-mail running with mpirun -np 8 myprog
it does run in multiple processes
and much faster - so I think it works.
Thanks!
Cheers,
Balint
system
Closed
March 4, 2019, 12:48pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.