<div dir="ltr">Dear Satish and Barry,<div><br></div><div>thanks for answering.</div><div><br></div><div>This command: /usr/local/openmpi-4.1.5/bin/mpif90 -show</div><div>outputs: </div><div><br></div><div>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</div><div><br></div><div>While this command: make PETSC_DIR=/home/bchandra/Program/petsc PETSC_ARCH=arch-linux-c-opt check FFLAGS=-Wno-maybe-uninitialized</div><div>seems to hide the errors:</div><div><br></div><div>Running PETSc check examples to verify correct installation<br>Using PETSC_DIR=/home/bchandra/Program/petsc and PETSC_ARCH=arch-linux-c-opt<br>C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process<br>C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes<br>C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE<br>Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process<br>Completed PETSc check examples<br></div><div><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">Kind regards,</div></div><div class="gmail_signature" data-smartmail="gmail_signature">Nanda</div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2024 at 7:57 PM Satish Balay <<a href="mailto:balay.anl@fastmail.org" target="_blank">balay.anl@fastmail.org</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">what do you have for:<br>
<br>
/usr/local/openmpi-4.1.5/bin/mpif90 -show<br>
<br>
Also, can you try:<br>
<br>
make check FFLAGS=-Wno-maybe-uninitialized<br>
<br>
Satish<br>
<br>
On Tue, 3 Sep 2024, Barry Smith wrote:<br>
<br>
> <br>
>    This is fine. Just an over-enthusiastic compiler <br>
> <br>
>    Barry<br>
> <br>
> <br>
> > On Sep 3, 2024, at 9:43 PM, Bodhinanda Chandra <<a href="mailto:bodhinandach@gmail.com" target="_blank">bodhinandach@gmail.com</a>> wrote:<br>
> > <br>
> > Dear PETSc community,<br>
> > <br>
> > 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:<br>
> > <br>
> > ----------------------------------------------------------------------------------------------------<br>
> > <br>
> > Running PETSc check examples to verify correct installation<br>
> > Using PETSC_DIR=/home/bchandra/Program/petsc and PETSC_ARCH=arch-linux-c-opt<br>
> > C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process<br>
> > C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes<br>
> > C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE<br>
> > *******************Error detected during compile or link!*******************<br>
> > See <a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!aWfx77pFkinEWnfZuOJV9iSUGz1PtCHOLEjTdL_APZHj6LB9f3z5sn2XDepCVrIL3IqhVVJH51ih6RUxgdeFsJ0$" rel="noreferrer" target="_blank">https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!aWfx77pFkinEWnfZuOJV9iSUGz1PtCHOLEjTdL_APZHj6LB9f3z5sn2XDepCVrIL3IqhVVJH51ih6RUxgdeFsJ0$</a>  <<a href="https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!bNBtvML4qAKu9WGzBH2kRjtiP8AwN3ijY4qZngu7nvl_TUwz8pQ6WGyCJh0AtIEOqLHU5NHUJRL1oWg2FeTR0Oz6868$" rel="noreferrer" target="_blank">https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!bNBtvML4qAKu9WGzBH2kRjtiP8AwN3ijY4qZngu7nvl_TUwz8pQ6WGyCJh0AtIEOqLHU5NHUJRL1oWg2FeTR0Oz6868$</a>><br>
> > /home/bchandra/Program/petsc/src/snes/tutorials ex5f<br>
> > *********************************************************<br>
> > /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<br>
> > ex5f.F90:439:52:<br>
> > <br>
> >   439 |       PetscInt  row,col(5),i,j,i1,i5<br>
> >       |                                                    ^<br>
> > Warning: ‘col[1]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:439:52: Warning: ‘col[2]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:439:52: Warning: ‘col[3]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:476:83:<br>
> > <br>
> >   476 |                call MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr)<br>
> >       |                                                                                   ^<br>
> > Warning: ‘col[4]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:439:52:<br>
> > <br>
> >   439 |       PetscInt  row,col(5),i,j,i1,i5<br>
> >       |                                                    ^<br>
> > note: ‘col[4]’ was declared here<br>
> > ex5f.F90:476:83:<br>
> > <br>
> >   476 |                call MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr)<br>
> >       |                                                                                   ^<br>
> > Warning: ‘v[1]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:440:58:<br>
> > <br>
> >   440 |       PetscScalar two,one,hx,hy,v(5)<br>
> >       |                                                          ^<br>
> > note: ‘v[1]’ was declared here<br>
> > ex5f.F90:476:83:<br>
> > <br>
> >   476 |                call MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr)<br>
> >       |                                                                                   ^<br>
> > Warning: ‘v[2]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:440:58:<br>
> > <br>
> >   440 |       PetscScalar two,one,hx,hy,v(5)<br>
> >       |                                                          ^<br>
> > note: ‘v[2]’ was declared here<br>
> > ex5f.F90:476:83:<br>
> > <br>
> >   476 |                call MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr)<br>
> >       |                                                                                   ^<br>
> > Warning: ‘v[3]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:440:58:<br>
> > <br>
> >   440 |       PetscScalar two,one,hx,hy,v(5)<br>
> >       |                                                          ^<br>
> > note: ‘v[3]’ was declared here<br>
> > ex5f.F90:476:83:<br>
> > <br>
> >   476 |                call MatSetValuesLocal(jac,i1,[row],i1,[col],[v],INSERT_VALUES,ierr)<br>
> >       |                                                                                   ^<br>
> > Warning: ‘v[4]’ may be used uninitialized [-Wmaybe-uninitialized]<br>
> > ex5f.F90:440:58:<br>
> > <br>
> >   440 |       PetscScalar two,one,hx,hy,v(5)<br>
> >       |                                                          ^<br>
> > note: ‘v[4]’ was declared here<br>
> > Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process<br>
> > Completed PETSc check examples<br>
> > <br>
> > ----------------------------------------------------------------------------------------------------<br>
> > <br>
> > Any ideas what happened and how to fix it? Many thanks in advance.<br>
> > <br>
> > Kind regards,<br>
> > Nanda<br>
> <br>
> </blockquote></div>