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
A segmentation fault occurs in the Fortran file comm.F90 when using include 'mpi.h' with GNU Fortran (GCC) 12.3.0 at optimization level -O2. Additionally, the program does not compile when using the flag -fno-allow-argument-mismatch, indicating a type mismatch in MPI calls involving complex data types. Switching from include 'mpi.h' to use mpi resolves both the segmentation fault and the type mismatch issue.
Description:
When compiling comm.F90 under GNU Fortran (GCC) 12.3.0, the program fails to compile when the flag -fno-allow-argument-mismatch is used, indicating a type mismatch.
When compiling with '-fallow-argument-mismatch' and optimization level -O2, the wannier90.x program encounters a segmentation fault during execution. The issue is resolved by replacing include 'mpi.h' with use mpi, which aligns the MPI interfaces correctly with Fortran types.
Steps to Reproduce
Attempt to compiling with -fno-allow-argument-mismatch
FFLAGS="-O2 -fno-allow-argument-mismatch"
make all FCOPTS="$FFLAGS" LDOPTS="$FFLAGS"
Expected outcome: type mismatch error
2. Compile with -fallow-argument-mismatch
FFLAGS="-O2 -fallow-argument-mismatch"
make all FCOPTS="$FFLAGS" LDOPTS="$FFLAGS"
The program should compile successfully.
3. Run the program
cd examples/example01
mpirun -np 4 ../../wannier90.x gaas.win
Expected outcome: segmentation fault
Expected behaviour
The program should compile and run correctly at all optimization levels (-O0, -O2, etc.) without segmentation faults or type mismatch issues
Actual behaviour
When compiling with -fno-allow-argument-mismatch and include 'mpi.h', the program fails to compile due to a type mismatch error.
When compiled with -O2 and -fallow-argument-mismatch, the program runs but crashes with a segmentation fault.
Workaround / possible solution
Replace include "mpi.h" with `use mpi'
The text was updated successfully, but these errors were encountered:
Summary:
A segmentation fault occurs in the Fortran file comm.F90 when using
include 'mpi.h'
with GNU Fortran (GCC) 12.3.0 at optimization level-O2
. Additionally, the program does not compile when using the flag-fno-allow-argument-mismatch
, indicating a type mismatch in MPI calls involving complex data types. Switching frominclude 'mpi.h'
touse mpi
resolves both the segmentation fault and the type mismatch issue.Description:
When compiling
comm.F90
under GNU Fortran (GCC) 12.3.0, the program fails to compile when the flag-fno-allow-argument-mismatch
is used, indicating a type mismatch.When compiling with '-fallow-argument-mismatch' and optimization level
-O2
, thewannier90.x
program encounters a segmentation fault during execution. The issue is resolved by replacinginclude 'mpi.h'
withuse mpi
, which aligns the MPI interfaces correctly with Fortran types.Steps to Reproduce
-fno-allow-argument-mismatch
Expected outcome: type mismatch error
2. Compile with
-fallow-argument-mismatch
The program should compile successfully.
3. Run the program
Expected outcome: segmentation fault
Expected behaviour
The program should compile and run correctly at all optimization levels (-O0, -O2, etc.) without segmentation faults or type mismatch issues
Actual behaviour
Workaround / possible solution
Replace
include "mpi.h"
with `use mpi'The text was updated successfully, but these errors were encountered: