mpi%k_list is not allocated (and mpi%ev_list)-> now DEADLOCK in MPI_WIN_LOCK
For the attached input Christoph obtains a segmentation fault when just calling fleur_MPI (without mpirun). We already got a stacktrace:
forrtl: severe (408): fort: (8): Attempt to fetch from allocatable variable K_LIST when it is not allocated Image PC Routine Line Source fleur_MPI 0000000003220096 Unknown Unknown Unknown fleur_MPI 00000000018DAC69 m_setupmpi_mp_set 45 setupMPI.F90 fleur_MPI 000000000075FDE3 m_fleur_init_mp_f 506 fleur_init.F90 fleur_MPI 0000000000414C47 m_fleur_mp_fleur_ 117 fleur.F90 fleur_MPI 00000000007645FE m_fleur_jobs_mp_f 187 fleur_job.F90 fleur_MPI 00000000007669BE MAIN__ 256 fleur_job.F90 fleur_MPI 0000000000413EEE Unknown Unknown Unknown libc.so.6 00002AEDF19D23D5 Unknown Unknown Unknown fleur_MPI 0000000000413DE9 Unknown Unknown Unknown
At first I thought that this issue related to a special code path, but grepping for "%k_list" in the code does not reveal a single place where this array is allocated.
How did this ever work?!
Similarly, the array mpi%ev_list is only allocated in one location and it looks like this location comes after the first assignment to this array in line 46 in setupMPI.F90.
I will perform quick fixes for these missing allocations but the issue looks like something is really wrong in that code part. So I write the issue such that people with more knowledge about that code part may take another look at it and also find out whether something else is missing.test.tgz