I am trying to make use of Minuit2 parallelization. I’ve managed to rebuild ROOT with
Then I have created my FCN function to minimize and called the line
Then I have compiled the code and set the environment variable
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?
_ROOT Version: 6.10.08
_Platform: Red Hat
_Compiler: g++ 7.3.1
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
sorry for my confusing lines. Indeed, I use Open MPI (not OpenMP), so what I did was indeed the following for the building:
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
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.