Created attachment 893796 [details] emerge --info The "configure" phase does not get past the the check for Fortran mpi_init() because the fortran compiler cannot open the includes from /usr/include/mpif.h. The relevant part from "configure.log" (complete log added as attachment): Executing: gfortran -c -o /var/tmp/portage/sci-mathematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.libraries/conftest.o -I/var/tmp/portage/sci-mathematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.setCompile rs -I/var/tmp/portage/sci-mathematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.compilersFortran -I/var/tmp/portage/sci-mathematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.compilers -I/var/tmp/portage/sci-ma thematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.libraries -O2 -pipe -fPIC /var/tmp/portage/sci-mathematics/petsc-3.20.5-r1/temp/petsc-00urcfrt/config.libraries/conftest.F90 stdout: /usr/include/mpif.h:56:0: 56 | include 'mpif-config.h' Fatal Error: Cannot open included file ‘mpif-config.h’ compilation terminated.
Created attachment 893797 [details] build.log
Created attachment 893798 [details] configure.log
opened an issue upstream: https://gitlab.com/petsc/petsc/-/issues/1657
What we wanna do with USE=fortran is to enable/disable support for fortran bindings. The config option to do this is --with-fortran-bindings which is undocumented. petsc should have access to fortran compiler to add support to external packages such as mumps or scalapack. To compile with MPI we should add the --with-fc option (on my system I had USE=-fortran which masks that flag). Is then RDEPEND=" ... mpi? ( virtual/mpi[fortran?] ) ... " correct?