[petsc-users] --with-mpi=0

Satish Balay balay at mcs.anl.gov
Sat Dec 18 09:42:09 CST 2021


Do you get this error with a petsc example that calls MPI_Comm_rank()?

Say src/vec/vec/tutorials/ex8f.F90

Satish

[balay at pj01 tutorials]$ make ex8f
gfortran -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O0   -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -O0    -I/home/balay/petsc/include -I/home/balay/petsc/arch-linux-c-debug/include     ex8f.F90  -Wl,-rpath,/home/balay/petsc/arch-linux-c-debug/lib -L/home/balay/petsc/arch-linux-c-debug/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/9 -L/usr/lib/gcc/x86_64-redhat-linux/9 -lpetsc -llapack -lblas -lpthread -lm -lX11 -lstdc++ -ldl -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -ldl -o ex8f
[balay at pj01 tutorials]$ ./ex8f
Vec Object: 1 MPI processes
  type: seq
4.
[balay at pj01 tutorials]$ nm -Ao ex8f |grep mpi_comm_rank
ex8f:                 U petsc_mpi_comm_rank_
[balay at pj01 tutorials]$ 



On Fri, 17 Dec 2021, Tabrez Ali wrote:

> Hi,
> 
> I am trying to compile Fortran code with PETSc 3.16 built without MPI,
> i.e., --with-mpi=0, and am getting the following error:
> 
>    call MPI_Comm_rank(MPI_COMM_WORLD,rank,ierr)
>                                          1
> Error: Symbol ‘mpi_comm_world’ at (1) has no IMPLICIT type
> 
> There are no issues with PETSc 3.14 or prior versions. Any ideas as to what
> could be wrong?
> 
> I do see the following note (below) in
> https://petsc.org/main/docs/changes/315/ but I am not sure if it's related:
> 
> *Add configure option --with-mpi-f90module-visibility [default=``1``].
> With 0, mpi.mod will not be visible in use code (via petscsys.mod) -
> so mpi_f08 can now be used*
> 
> Regards,
> 
> Tabrez
> 


More information about the petsc-users mailing list