You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask: is MPI C compiler mandatory for Yambo (even when not compiled with MPI)? As I mentioned in my first PR, Ydiago always needs to be compiled with MPI libraries, which means we always need a MPI C compiler or link with ```-libmpi``. I know this is not ideally what we want, but I will address this in the future. Another option is to completely skip compiling Ydiago when not using MPI and guard all Ydiago calls with -D_MPI and use the old solver.
a) compiled without mpi: --disable-mpi at configure time, -D_MPI is not defined. Of course scalapck/blacs cannot be linked. Probably it does not make sense to link elpa neither. We can de-activate the ydiago implementation as well in such case.
b) compiled with mpi but mpi disabled at runtime using yambo -nompi. In such case the code can be compiled with all mpi libraries (including sclapack/blacs/etc .. ), but MPI_Init is not called. Moreover, all calls such as call MPI_COMM_SIZE are protected by something like if(ncpu>1) return.
For case (a), we can leave it as an open issue, and work on this in the future.
For case (b) it might be enough to put some if(ncpu>1) then / else inside K_diagonalize to avoid seg-fault at runtime.
The text was updated successfully, but these errors were encountered:
Honestly, I do not see why -nompi flag is needed? Any specific reason why this is added? According to MPI standard, running mpirun -n 1 yambo must be same as running simply calling yambo and no special care needs to be taken in the code. Here is what is in standard (please note yambo does not call any special functions such as MPI_UNIVERSE_SIZE)
When an application enters MPI_INIT, clearly it must be able to determine if these
special steps were taken. If a process enters MPI_INIT and determines that no
special steps were taken (i.e., it has not been given the information to form an
MPI_COMM_WORLD with other processes) it succeeds and forms a singleton MPI program, that is, one in which MPI_COMM_WORLD has size 1.
I've reproduced the same behavior with nvfortran on a couple of other machines. No idea of why.
I do not know why -nompi was added either. Just it is there, and I use it sometimes.
First time I tested yambo with elpa+gpu I used yambo -nompi and it gave me segmentation fault. :-)
@muralidhar-nalabothula yambo can be
a) compiled without mpi:
--disable-mpi
at configure time,-D_MPI
is not defined. Of course scalapck/blacs cannot be linked. Probably it does not make sense to link elpa neither. We can de-activate the ydiago implementation as well in such case.b) compiled with mpi but mpi disabled at runtime using
yambo -nompi
. In such case the code can be compiled with all mpi libraries (including sclapack/blacs/etc .. ), butMPI_Init
is not called. Moreover, all calls such ascall MPI_COMM_SIZE
are protected by something likeif(ncpu>1) return
.For case (a), we can leave it as an open issue, and work on this in the future.
For case (b) it might be enough to put some
if(ncpu>1) then / else
insideK_diagonalize
to avoid seg-fault at runtime.The text was updated successfully, but these errors were encountered: