F90 issues on CRAY
On Cray machines, we (cc @dalcinl) used to configure using --with-clib-autodetect=0 --with-cxxlib-autodetect=0 --with-fortranlib-autodetect=0
and let the compiler wrappers add the needed at final link stage. This is not working anymore, as we now get failures at executable linking (see below). Configure log is attachedconfigure.log
Possibly blaming these two commits
commit 9c8ab5bcef6a4a8b6eb76b800d0c16949014575a
Author: Satish Balay <balay@mcs.anl.gov>
Date: Wed Mar 24 09:27:45 2021 -0500
mpif.mod: revert requirement - as MS-MPI does not have it.
Do not add back the complex code for corner cases
commit 8c8af28eefa46e3bea82adfa51baf2c790322ff8
Author: Pedro Ricardo C. Souza <pricardo@aimirimsti.com.br>
Date: Fri Mar 19 14:21:05 2021 -0500
F90: Encapsulate the usage of MPI in petsc.mod and import only needed definitions into other petsc modules.
This requires an explicit use of petsc.mod [or mpi.mod or mpi_f18.mod] from user code
Running check examples to verify correct installation
Using PETSC_DIR=/lustre/project/k1011/petsc and PETSC_ARCH=arch-test-noad
gmake[3]: [/lustre/project/k1011/petsc/lib/petsc/conf/rules:301: ex19.PETSc] Error 2 (ignored)
*******************Error detected during compile or link!*******************
See http://www.mcs.anl.gov/petsc/documentation/faq.html
/lustre/project/k1011/petsc/src/snes/tutorials ex19
*********************************************************************************
cc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -Qunused-arguments -fvisibility=hidden -g3 -O0 -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -Qunused-arguments -fvisibility=hidden -g3 -O0 -I/lustre/project/k1011/petsc/include -I/lustre/project/k1011/petsc/arch-test-noad/include ex19.c -Wl,-rpath,/lustre/project/k1011/petsc/arch-test-noad/lib -L/lustre/project/k1011/petsc/arch-test-noad/lib -lpetsc -lX11 -lquadmath -ldl -o ex19
ld.lld: error: /lustre/project/k1011/petsc/arch-test-noad/lib/libpetsc.so: undefined reference to mpi_ [--no-allow-shlib-undefined]
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [<builtin>: ex19] Error 1