Dear Satish and Barry, thanks for answering.
This command: /usr/local/openmpi-4.1.5/bin/mpif90 -show outputs: gfortran -I/usr/local/openmpi-4.1.5/include -I/usr/local/openmpi-4.1.5/lib -L/usr/local/openmpi-4.1.5/lib -Wl,-rpath -Wl,/usr/local/openmpi-4.1.5/lib -Wl,--enable-new-dtags -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi While this command: make PETSC_DIR=/home/bchandra/Program/petsc PETSC_ARCH=arch-linux-c-opt check FFLAGS=-Wno-maybe-uninitialized seems to hide the errors: Running PETSc check examples to verify correct installation Using PETSC_DIR=/home/bchandra/Program/petsc and PETSC_ARCH=arch-linux-c-opt C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process Completed PETSc check examples Kind regards, Nanda On Tue, Sep 3, 2024 at 7:57 PM Satish Balay <balay....@fastmail.org> wrote: > what do you have for: > > /usr/local/openmpi-4.1.5/bin/mpif90 -show > > Also, can you try: > > make check FFLAGS=-Wno-maybe-uninitialized > > Satish > > On Tue, 3 Sep 2024, Barry Smith wrote: > > > > > This is fine. Just an over-enthusiastic compiler > > > > Barry > > > > > > > On Sep 3, 2024, at 9:43 PM, Bodhinanda Chandra <bodhinand...@gmail.com> > wrote: > > > > > > Dear PETSc community, > > > > > > I recently tried to install PETSc in Ubuntu 24.04. All seems to work > fine, but one of the check tests ex5f thow the following errors: > > > > > > > ---------------------------------------------------------------------------------------------------- > > > > > > Running PETSc check examples to verify correct installation > > > Using PETSC_DIR=/home/bchandra/Program/petsc and > PETSC_ARCH=arch-linux-c-opt > > > C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI > process > > > C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI > processes > > > C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE > > > *******************Error detected during compile or > link!******************* > > > See > https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!aWfx77pFkinEWnfZuOJV9iSUGz1PtCHOLEjTdL_APZHj6LB9f3z5sn2XDepCVrIL3IqhVVJH51ih6RUxgdeFsJ0$ > < > https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!bNBtvML4qAKu9WGzBH2kRjtiP8AwN3ijY4qZngu7nvl_TUwz8pQ6WGyCJh0AtIEOqLHU5NHUJRL1oWg2FeTR0Oz6868$ > > > > > /home/bchandra/Program/petsc/src/snes/tutorials ex5f > > > ********************************************************* > > > /usr/local/openmpi-4.1.5/bin/mpif90 -fPIC -Wall > -ffree-line-length-none -ffree-line-length-0 -Wno-lto-type-mismatch > -Wno-unused-dummy-argument -Wall -ffree-line-length-none > -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -O3 > -march=native -mtune=native -I/home/bchandra/Program/petsc/include > -I/home/bchandra/Program/petsc/arch-linux-c-opt/include > -I/usr/local/openmpi-4.1.5/include ex5f.F90 > -Wl,-rpath,/home/bchandra/Program/petsc/arch-linux-c-opt/lib > -L/home/bchandra/Program/petsc/arch-linux-c-opt/lib > -Wl,-rpath,/usr/local/openmpi-4.1.5/lib -L/usr/local/openmpi-4.1.5/lib > -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/13 > -L/usr/lib/gcc/x86_64-linux-gnu/13 -lpetsc -lHYPRE -lflapack -lfblas -lm > -lX11 -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran > -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -lquadmath -o ex5f > > > ex5f.F90:439:52: > > > > > > 439 | PetscInt row,col(5),i,j,i1,i5 > > > | ^ > > > Warning: ‘col[1]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:439:52: Warning: ‘col[2]’ may be used uninitialized > [-Wmaybe-uninitialized] > > > ex5f.F90:439:52: Warning: ‘col[3]’ may be used uninitialized > [-Wmaybe-uninitialized] > > > ex5f.F90:476:83: > > > > > > 476 | call > MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr) > > > | > ^ > > > Warning: ‘col[4]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:439:52: > > > > > > 439 | PetscInt row,col(5),i,j,i1,i5 > > > | ^ > > > note: ‘col[4]’ was declared here > > > ex5f.F90:476:83: > > > > > > 476 | call > MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr) > > > | > ^ > > > Warning: ‘v[1]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:440:58: > > > > > > 440 | PetscScalar two,one,hx,hy,v(5) > > > | ^ > > > note: ‘v[1]’ was declared here > > > ex5f.F90:476:83: > > > > > > 476 | call > MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr) > > > | > ^ > > > Warning: ‘v[2]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:440:58: > > > > > > 440 | PetscScalar two,one,hx,hy,v(5) > > > | ^ > > > note: ‘v[2]’ was declared here > > > ex5f.F90:476:83: > > > > > > 476 | call > MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr) > > > | > ^ > > > Warning: ‘v[3]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:440:58: > > > > > > 440 | PetscScalar two,one,hx,hy,v(5) > > > | ^ > > > note: ‘v[3]’ was declared here > > > ex5f.F90:476:83: > > > > > > 476 | call > MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr) > > > | > ^ > > > Warning: ‘v[4]’ may be used uninitialized [-Wmaybe-uninitialized] > > > ex5f.F90:440:58: > > > > > > 440 | PetscScalar two,one,hx,hy,v(5) > > > | ^ > > > note: ‘v[4]’ was declared here > > > Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI > process > > > Completed PETSc check examples > > > > > > > ---------------------------------------------------------------------------------------------------- > > > > > > Any ideas what happened and how to fix it? Many thanks in advance. > > > > > > Kind regards, > > > Nanda > > > >