<div dir="ltr">Satish,<div><br></div><div>If you replace PETSC_COMM_WORLD with MPI_COMM_WORLD and compile ex8f.F90 using 3.14 then it will work but if you compile it using 3.15 or 3.16 then it fails, e.g.,</div><div><br></div><div><font face="monospace">stali@i5:~$ cd /tmp/petsc-3.14.6/src/vec/vec/tutorials/</font></div><div><font face="monospace"><br>stali@i5:/tmp/petsc-3.14.6/src/vec/vec/tutorials$ grep MPI_COMM_WORLD ex8f.F90<br> call MPI_Comm_rank(MPI_COMM_WORLD,rank,ierr)<br> call VecCreate(MPI_COMM_WORLD,x,ierr);CHKERRA(ierr)</font></div><div><font face="monospace"><br>stali@i5:/tmp/petsc-3.14.6/src/vec/vec/tutorials$ <span style="background-color:rgb(255,255,0)">make ex8f PETSC_DIR=/tmp/petsc-3.14.6</span><br>gfortran -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g -I/tmp/petsc-3.14.6/include -I/tmp/petsc-3.14.6/arch-linux2-c-debug/include ex8f.F90 -Wl,-rpath,/tmp/petsc-3.14.6/arch-linux2-c-debug/lib -L/tmp/petsc-3.14.6/arch-linux2-c-debug/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lpetsc -llapack -lblas -lpthread -lm -lstdc++ -ldl -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -ldl -o ex8f</font></div><div><font face="monospace"><br>stali@i5:/tmp/petsc-3.14.6/src/vec/vec/tutorials$ rm ex8f</font></div><div><font face="monospace"><br>stali@i5:/tmp/petsc-3.14.6/src/vec/vec/tutorials$ <span style="background-color:rgb(255,255,0)">make ex8f PETSC_DIR=/tmp/petsc-3.16.1</span><br>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/tmp/petsc-3.16.1/include -I/tmp/petsc-3.16.1/arch-linux2-c-debug/include ex8f.F90 -Wl,-rpath,/tmp/petsc-3.16.1/arch-linux2-c-debug/lib -L/tmp/petsc-3.16.1/arch-linux2-c-debug/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6 -lpetsc -llapack -lblas -lpthread -lm -lstdc++ -ldl -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -ldl -o ex8f<br>ex8f.F90:29:41:<br><br> call MPI_Comm_rank(MPI_COMM_WORLD,rank,ierr)<br> 1<br>Error: Symbol ‘mpi_comm_world’ at (1) has no IMPLICIT type<br>/tmp/petsc-3.16.1/lib/petsc/conf/test:24: recipe for target 'ex8f' failed</font><br></div><div><br></div><div>Regards,</div><div><br></div><div>Tabrez</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 18, 2021 at 10:42 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Do you get this error with a petsc example that calls MPI_Comm_rank()?<br>
<br>
Say src/vec/vec/tutorials/ex8f.F90<br>
<br>
Satish<br>
<br>
[balay@pj01 tutorials]$ make ex8f<br>
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<br>
[balay@pj01 tutorials]$ ./ex8f<br>
Vec Object: 1 MPI processes<br>
type: seq<br>
4.<br>
[balay@pj01 tutorials]$ nm -Ao ex8f |grep mpi_comm_rank<br>
ex8f: U petsc_mpi_comm_rank_<br>
[balay@pj01 tutorials]$ <br>
<br>
<br>
<br>
On Fri, 17 Dec 2021, Tabrez Ali wrote:<br>
<br>
> Hi,<br>
> <br>
> I am trying to compile Fortran code with PETSc 3.16 built without MPI,<br>
> i.e., --with-mpi=0, and am getting the following error:<br>
> <br>
> call MPI_Comm_rank(MPI_COMM_WORLD,rank,ierr)<br>
> 1<br>
> Error: Symbol ‘mpi_comm_world’ at (1) has no IMPLICIT type<br>
> <br>
> There are no issues with PETSc 3.14 or prior versions. Any ideas as to what<br>
> could be wrong?<br>
> <br>
> I do see the following note (below) in<br>
> <a href="https://petsc.org/main/docs/changes/315/" rel="noreferrer" target="_blank">https://petsc.org/main/docs/changes/315/</a> but I am not sure if it's related:<br>
> <br>
> *Add configure option --with-mpi-f90module-visibility [default=``1``].<br>
> With 0, mpi.mod will not be visible in use code (via petscsys.mod) -<br>
> so mpi_f08 can now be used*<br>
> <br>
> Regards,<br>
> <br>
> Tabrez<br>
> <br>
</blockquote></div>