FAUniv / sl2cfoam-next-FAUniv

Looking for the official release of sl2cfoam-next? Use: https://github.com/qg-cpt-marseille/sl2cfoam-next
GNU Lesser General Public License v3.0
0 stars 0 forks source link

When running a Julia script using sl2cfoam-next built with MPI enabled the Julia script crashes with error #1

Open FAUniv opened 4 months ago

FAUniv commented 4 months ago

When running a Julia script sl2cfoam-next-FAUniv/exampleScripts/listing1.jl using sl2cfoam-next built with MPI enabled the Julia script crashes with error:

MPI must be initialized before using the library. The MPI_Abort() function was called before MPI_IIT was invoked. This is disallowed by the MPI standard. *** Your MPI job will now abort.

Calling sl2cfoam-next from C avoids this problem if MPI is initalized outside the library. When calling from Julia it relies on the library to do the initalization but this happens after Immirzi parameter is set, which is too late.

In sl2cfoam-next/src/setup.c

    int mpi_initialized;
    MPI_Initialized(&mpi_initialized);
    if (!mpi_initialized) {
        MPI_Init(NULL, NULL);
        __mpi_managed_outside = false;
    } else {
        __mpi_managed_outside = true;
    }

should come after  sl2cfoam_set_Immirzi(Immirzi);

This problem was not observed when building machine using Hongguang Liu's script /home/todd/Desktop/sl2cfoam-next-FAUniv/installScripts/install_sl2cfoam.sh

It was verified with htop that all 32 cores were near 100% using install_sl2cfoam.sh

FAUniv commented 4 months ago

Build steps to reproduce issue:

sudo apt-get install build-essential linux-generic libmpich-dev libopenmpi-dev

In Makefile file:

MPI = 0 gives single core utilization

MPI = 1 gives full core utilization

sudo apt-get install libmpfr-dev libmpfr6cd mpc-dev libmpc-dev libgmp3-dev libquadmath0 libomp-dev libopenblas-dev

sl2cfoam-next/ext/wigxjpf make

sl2cfoam-next/ext/fastwigxj make

make BLAS=system

FAUniv commented 4 months ago

Message Passing Interface (MPI) , is for communications between computers and should be disabled for single machines. Wonder if people have run vertex calculations on super-computer using Julia. Perhaps this is normally done with a shell script.