I am introducing OpenMP target pragmas to a Fortran-based project called ASAD, which I have open-sourced here:
I configure the project using cmake as follows in a ‘build’ subdirectory:
cmake -DCMAKE_Fortran_COMPILER=nvfortran -DCMAKE_Fortran_FLAGS="-mp=gpu -gpu=cuda11.4" ..
I use nvhpc 21.7. I am compiling on a node with A100 GPU.
Compilation aborts as follows:
make [ 2%] Building Fortran object CMakeFiles/prog.dir/UKCA/asad_mod.o double free or corruption (!prev)
I should add that the module asad_mod.F90 contains over 250 allocatable arrays, all of which I try to “declare target”. Not sure if this is too much for the compiler to swallow.
I have tested the OpenMP compilation and offloading on Intel DevCloud with the Intel compilers, and all builds and runs okay with OpenMP target offloading enabled.
Any idea what the issue might be?