Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-08 Thread Jianbo Long
Here are the ldd outputs: >> ldd petsc_3.18_gnu/arch-linux-c-debug/lib/libpetsc.so linux-vdso.so.1 => (0x7f23e5ff2000) libflexiblas.so.3 => /cluster/software/FlexiBLAS/3.0.4-GCC-11.2.0/lib/libflexiblas.so.3 (0x7f23e1b6) libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x7f23e1944000)

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-08 Thread Satish Balay via petsc-users
On Tue, 8 Nov 2022, Satish Balay via petsc-users wrote: > You don't see 'libstdc++' in the output from 'ldd libptsc.so' below - so > there is no reference > to libstdc++ from petsc > > Try a clean build of PETSc and see if you still have these issues. > > ./configure --with-cc=gcc --with-cxx=0

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-08 Thread Matthew Knepley
On Tue, Nov 8, 2022 at 10:28 AM Jianbo Long wrote: > I am suspecting something else as well ... > > Could you elaborate more about "mixing c++ codes compiled with > /usr/bin/g++ and compilers in /cluster/software/GCCcore/11.2.0" ? My own > Fortran code does not have any c++ codes, and for some re

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-08 Thread Satish Balay via petsc-users
You don't see 'libstdc++' in the output from 'ldd libptsc.so' below - so there is no reference to libstdc++ from petsc Try a clean build of PETSc and see if you still have these issues. ./configure --with-cc=gcc --with-cxx=0 --with-fc=gfortran --download-fblaslapack --download-mpich Another wa

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-08 Thread Jianbo Long
I am suspecting something else as well ... Could you elaborate more about "mixing c++ codes compiled with /usr/bin/g++ and compilers in /cluster/software/GCCcore/11.2.0" ? My own Fortran code does not have any c++ codes, and for some reason, the compiled petsc library is dependent on this libstdc+

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-07 Thread Satish Balay via petsc-users
Likely due to mixing c++ codes compiled with /usr/bin/g++ and compilers in /cluster/software/GCCcore/11.2.0 if you still get this with --with-cxx=0 - then the issue with some other [non-petsc library] Satish On Mon, 7 Nov 2022, Jianbo Long wrote: > Hi Satish, > > I wonder if you know anythin

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-07 Thread Satish Balay via petsc-users
Glad you have it working. Thanks for the update. Satish On Mon, 7 Nov 2022, Jianbo Long wrote: > Hi Satish and Barry, > > Thanks very much for the feedback ! > > It looks like my include file path was not correct ! > > Bests, > Jianbo > > > On Fri, Nov 4, 2022 at 6:08 AM Satish Balay wrote

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-07 Thread Jianbo Long
Hi Satish and Barry, Thanks very much for the feedback ! It looks like my include file path was not correct ! Bests, Jianbo On Fri, Nov 4, 2022 at 6:08 AM Satish Balay wrote: > For ex83f.F90: > > > > balay@p1 /home/balay/test > $ ls > ex83f.F90 > balay@p1 /home/balay/test > $ ls > ex83f.

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-03 Thread Satish Balay via petsc-users
For ex83f.F90: > balay@p1 /home/balay/test $ ls ex83f.F90 balay@p1 /home/balay/test $ ls ex83f.F90 balay@p1 /home/balay/test $ export PETSC_DIR=$HOME/petsc balay@p1 /home/balay/test $ cp $PETSC_DIR/src/ksp/ksp/tests/makefile . balay@p1 /home/balay/test $ make ex83f mpif90 -fPIC -Wall -ffree-li

Re: [petsc-users] [petsc-maint] Issues linking petsc header files and lib from FORTRAN codes

2022-11-03 Thread Barry Smith
Please send your attempted makefile and we'll see if we can get it working. I am not sure if we can organize the include files as Fortran compiler include files easily. We've always used the preprocessor approach. The Intel compiler docs indicate the procedure for finding the Fortran compile