[petsc-users] ld: cannot find -lpetsc error

Diana Valencia valencia at astro.utoronto.ca
Tue Oct 13 21:21:13 CDT 2015


Here is the error message:

[valencia at euler01 petsc-3.2-p7]$ make test
Running test examples to verify correct installation
Using PETSC_DIR=/cluster/home/valencia/PETSC/petsc-3.2-p7 and PETSC_ARCH=arch-linux2-c-opt
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI processes
--------------Error detected during compile or link!-----------------------
See http://www.mcs.anl.gov/petsc/petsc-2/documentation/faq.html
mpif90 -c  -O3   -I/cluster/home/valencia/PETSC/petsc-3.2-p7/include -I/cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/include    -o ex5f.o ex5f.F
./ex5f.h(60): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>
      DM      da
----------------^
ex5f.F(56): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>
      SNES                   snes
---------------------------------^
ex5f.F(57): error #5082: Syntax error, found ',' when expecting one of: ( % [ : . = =>
      Vec                    x,r
------------------------------^
ex5f.F(58): error #5082: Syntax error, found ',' when expecting one of: ( % [ : . = =>
      Mat                    J,A
------------------------------^
./ex5f.h(60): error #6218: This statement is positioned incorrectly and/or has syntax errors.
      DM      da
----------------^
ex5f.F(59): error #6236: A specification statement cannot appear in the executable section.
      integer(kind=selected_int_kind(5))                its,i1,i4
------^
ex5f.F(60): error #6236: A specification statement cannot appear in the executable section.
      integer(kind=selected_int_kind(5)) ierr
------^
ex5f.F(61): error #6236: A specification statement cannot appear in the executable section.
      real(kind=selected_real_kind(10))       lambda_max,lambda_min
------^
ex5f.F(62): error #6236: A specification statement cannot appear in the executable section.
      logical(kind=4)              flg
------^
ex5f.F(71): error #6236: A specification statement cannot appear in the executable section.
      external FormInitialGuess
------^
ex5f.F(72): error #6236: A specification statement cannot appear in the executable section.
      external FormFunctionLocal,FormJacobianLocal
------^
ex5f.F(57): error #6404: This name does not have a type, and must have an explicit type.   [VECX]
      Vec                    x,r
------^
ex5f.F(57): error #6404: This name does not have a type, and must have an explicit type.   [R]
      Vec                    x,r
-------------------------------^
ex5f.F(58): error #6404: This name does not have a type, and must have an explicit type.   [MATJ]
      Mat                    J,A
------^
ex5f.F(58): error #6404: This name does not have a type, and must have an explicit type.   [A]
      Mat                    J,A
-------------------------------^
ex5f.F(81): error #6404: This name does not have a type, and must have an explicit type.   [IERR]
      call PetscInitialize(PETSC_NULL_CHARACTER,ierr)
------------------------------------------------^
ex5f.F(87): error #6404: This name does not have a type, and must have an explicit type.   [I1]
      i1 = 1
------^
ex5f.F(88): error #6404: This name does not have a type, and must have an explicit type.   [I4]
      i4 = -4
------^
ex5f.F(89): error #6404: This name does not have a type, and must have an explicit type.   [LAMBDA_MAX]
      lambda_max = 6.81
------^
ex5f.F(90): error #6404: This name does not have a type, and must have an explicit type.   [LAMBDA_MIN]
      lambda_min = 0.0
------^
ex5f.F(93): error #6404: This name does not have a type, and must have an explicit type.   [FLG]
     &                           flg,ierr)
---------------------------------^
ex5f.F(103): error #6404: This name does not have a type, and must have an explicit type.   [SNES]
      call SNESCreate(PETSC_COMM_WORLD,snes,ierr)
---------------------------------------^
ex5f.F(116): error #6404: This name does not have a type, and must have an explicit type.   [DA]
     &     PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da,ierr)
-------------------------------------------------^
ex5f.F(121): error #6404: This name does not have a type, and must have an explicit type.   [X]
      call DMCreateGlobalVector(da,x,ierr)
-----------------------------------^
ex5f.F(152): error #6404: This name does not have a type, and must have an explicit type.   [FORMFUNCTIONLOCAL]
      call DMDASetLocalFunction(da,FormFunctionLocal,ierr)
-----------------------------------^
ex5f.F(153): error #6404: This name does not have a type, and must have an explicit type.   [FORMJACOBIANLOCAL]
      call DMDASetLocalJacobian(da,FormJacobianLocal,ierr)
-----------------------------------^
ex5f.F(173): error #6404: This name does not have a type, and must have an explicit type.   [J]
      call DMGetMatrix(da,'aij',J,ierr)
--------------------------------^
ex5f.F(226): error #6404: This name does not have a type, and must have an explicit type.   [ITS]
      call SNESGetIterationNumber(snes,its,ierr)
---------------------------------------^
./ex5f.h(60): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>
      DM      da
----------------^
ex5f.F(271): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ : . = =>
      Vec      X
----------------^
/tmp/ifortGXVttY.i(6051): catastrophic error: Too many errors, exiting
compilation aborted for ex5f.F (code 1)
make[3]: [ex5f.o] Error 1 (ignored)
mpif90 -O3   -o ex5f ex5f.o -L/cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/lib  -lpetsc -lX11 -lpthread -Wl,-rpath,/cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lparmetis -lmetis -lscalapack -lblacs -lsuperlu_4.2 -lml -lmpi_cxx -lumfpack -lamd -lflapack -lfblas -ldl -L/cluster/apps/openmpi/1.6.5/x86_64/intel_15.0.0/lib -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/compiler/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/ipp/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/mkl/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/tbb/lib/intel64 -L/cluster/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cluster/apps/gcc/4.8.2/lib64 -L/cluster/apps/gcc/4.8.2/lib -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -lmpi_f90 -lmpi_f77 -lm -lm -lifport -lifcore -lm -lm -lm -lmpi_cxx -ldl -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -ldl 
ifort: error #10236: File not found:  'ex5f.o'
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
ifort: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
make[3]: [ex5f] Error 1 (ignored)
/bin/rm -f ex5f.o
Completed test examples

_______________________
Diana Valencia
Assistant Professor,  Physics & Astrophysics
Department of Physical and Environmental Sciences 
University of Toronto, Scarborough
1265 Military Trail, Toronto, ON, Canada, M1C 1A4
Voice 416 208-2986

> On Oct 13, 2015, at 10:17 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> thats wierd..
> 
> perhaps there were warnings in 'make test'? [warnings can be ignored]
> 
> alternatively - configure pickedup the wrong mpiexec but you are using
> the correct one with your app?
> 
> Satish
> 
> On Tue, 13 Oct 2015, Diana Valencia wrote:
> 
>> I meant to say that the code is working with PETSC despite the fact that when I tested, petsc did not pass the ex5 test.
>> cheers
>> Diana
>> _______________________
>> Diana Valencia
>> Assistant Professor,  Physics & Astrophysics
>> Department of Physical and Environmental Sciences 
>> University of Toronto, Scarborough
>> 1265 Military Trail, Toronto, ON, Canada, M1C 1A4
>> Voice 416 208-2986
>> 
>>> On Oct 13, 2015, at 9:57 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>>> 
>>> "however ex5 in the test examples failed"
>>> 
>>> Sorry - this message is a bit confusing. Is petsc working fine for
>>> your - or are you still having issues?
>>> 
>>> Satish
>>> 
>>> On Tue, 13 Oct 2015, Diana Valencia wrote:
>>> 
>>>> Dear Satish and all petsc users
>>>> Thank you for your email. Antoine Rozel also from the petsc community was able to help me (he also uses the same third party code I was trying to compile)
>>>> The version we use is old, because apparently is the one that works the best for the third party code.
>>>> I had to reinstall petsc, and somehow this fixed it.  The code compiled and is now running fine, however ex5 in the test examples failed.
>>>> Thanks for the input.
>>>> Diana
>>>> 
>>>> _______________________
>>>> Diana Valencia
>>>> Assistant Professor,  Physics & Astrophysics
>>>> Department of Physical and Environmental Sciences 
>>>> University of Toronto, Scarborough
>>>> 1265 Military Trail, Toronto, ON, Canada, M1C 1A4
>>>> Voice 416 208-2986
>>>> 
>>>>> On Oct 8, 2015, at 4:31 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>>>>> 
>>>>> 1. Are you able to compile [using petsc makefile] and run PETSc examples?
>>>>> 
>>>>> 2. You are missing the link option -L/cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/lib
>>>>> 
>>>>> [you should verify the output from the example compile/link commands -
>>>>> and the compile/link command for this application.]
>>>>> 
>>>>> BTW: This is an old version of petsc.
>>>>> 
>>>>> Satish
>>>>> 
>>>>> On Thu, 8 Oct 2015, Diana Valencia wrote:
>>>>> 
>>>>>> Dear PETSc users,
>>>>>> 
>>>>>> In hopes that one of you can help me solve a compiling problem.
>>>>>> 
>>>>>> I am compiling a third party code (stagyy and stagyympi) on a cluster. I load the intel and open_mpi libraries to the cluster before compiling with petsc.
>>>>>> After compiling all the subroutines, I get an error building the code. Here is the stout:
>>>>>> 
>>>>>> I have set the PETSC_DIR and PETSC_ARCH in the .bashrc file, so I don’t think this is the problem.
>>>>>> 
>>>>>> Thank you in advance for all your help.
>>>>>> Diana
>>>>>> 
>>>>>> 
>>>>>> .
>>>>>> .
>>>>>> .
>>>>>> mpif90  -w -O2 -assume byterecl -r8 -I /cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/include -c main.f90
>>>>>> mpif90  -w -O2 -assume byterecl -r8 -I /cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/include -c advdif.f90
>>>>>> mpif90  -w -O2 -assume byterecl -r8 -I /cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/include -o stagyy main.o advdif.o communication.o continents.o evocore.o geometry.o init.o io.o iter.o melting.o miscellaneous.o MPDATA.o multi.o refstate.o phase_change.o poisson.o prolongate_restrict.o relax_all.o relax_cell.o relax_point.o residues.o tracers.o v_advection.o vee_cycle.o viscosity.o  crw.o geoid.o implicit_diffusion.o linpack.o plot.o wrtpng.o blas123.o lapack.o nxs_dummy.o  PETScimple_mod.o xdmf_hdf5_io_dummy.o bcs_mod.o composition_mod.o control_mod.o continents_mod.o vgrid_mod.o init_mod.o io_mod.o iter_mod.o melting_mod.o meltingfns_mod.o multi_mod.o phase_change_mod.o plot_mod.o precision_mod.o refstat_mod.o stencil_mod.o timestep_mod.o timing_mod.o tracers_mod.o viscosity_mod.o thermochem_mod.o platesLea_mod.o -lpng     -L/lib  -lpetsc -lX11 -lpthread -Wl,-rpath,/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lparmetis -lmetis -lscalapack -lblacs -lsuperlu_4.2 -lml -lmpi_cxx -lumfpack -lamd -lflapack -lfblas -ldl -L/cluster/apps/openmpi/1.6.5/x86_64/intel_15.0.0/lib -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/compiler/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/ipp/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/mkl/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/tbb/lib/intel64 -L/cluster/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cluster/apps/gcc/4.8.2/lib64 -L/cluster/apps/gcc/4.8.2/lib -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -lmpi_f90 -lmpi_f77 -lm -lm -lifport -lifcore -lm -lm -lm -lmpi_cxx -ldl -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -ldl 
>>>>>> ld: cannot find -lpetsc
>>>>>> make: *** [stagyy] Error 1
>>>>>> mpif90  -w -O2 -assume byterecl -r8 -I /cluster/home/valencia/PETSC/petsc-3.2-p7/arch-linux2-c-opt/include -o stagyympi main.o advdif.o communication.o continents.o evocore.o geometry.o init.o io.o iter.o melting.o miscellaneous.o MPDATA.o multi.o refstate.o phase_change.o poisson.o prolongate_restrict.o relax_all.o relax_cell.o relax_point.o residues.o tracers.o v_advection.o vee_cycle.o viscosity.o  crw.o geoid.o implicit_diffusion.o linpack.o plot.o wrtpng.o blas123.o lapack.o nxs_to_mpi.o PETScimple_mod.o xdmf_hdf5_io_dummy.o bcs_mod.o composition_mod.o control_mod.o continents_mod.o vgrid_mod.o init_mod.o io_mod.o iter_mod.o melting_mod.o meltingfns_mod.o multi_mod.o phase_change_mod.o plot_mod.o precision_mod.o refstat_mod.o stencil_mod.o timestep_mod.o timing_mod.o tracers_mod.o viscosity_mod.o thermochem_mod.o platesLea_mod.o -lpng     -L/lib  -lpetsc -lX11 -lpthread -Wl,-rpath,/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lparmetis -lmetis -lscalapack -lblacs -lsuperlu_4.2 -lml -lmpi_cxx -lumfpack -lamd -lflapack -lfblas -ldl -L/cluster/apps/openmpi/1.6.5/x86_64/intel_15.0.0/lib -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/compiler/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/ipp/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/mkl/lib/intel64 -L/cluster/apps/intel/composer_xe_2015.0.090/composer_xe_2015.0.090/tbb/lib/intel64 -L/cluster/apps/gcc/4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2 -L/cluster/apps/gcc/4.8.2/lib64 -L/cluster/apps/gcc/4.8.2/lib -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -lmpi_f90 -lmpi_f77 -lm -lm -lifport -lifcore -lm -lm -lm -lmpi_cxx -ldl -lmpi -lopen-rte -lopen-pal -lnuma -lrt -lnsl -lutil -limf -lsvml -lirng -lipgo -ldecimal -lcilkrts -lstdc++ -lgcc_s -lirc -lpthread -lirc_s -ldl 
>>>>>> ld: cannot find -lpetsc
>>>>>> make: *** [stagyympi] Error 1
>>>>>> make: Target `both' not remade because of errors.
>>>>>> 
>>>>>> _______________________
>>>>>> Diana Valencia
>>>>>> Assistant Professor,  Physics & Astrophysics
>>>>>> Department of Physical and Environmental Sciences 
>>>>>> University of Toronto, Scarborough
>>>>>> 1265 Military Trail, Toronto, ON, Canada, M1C 1A4
>>>>>> Voice 416 208-2986
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151013/80ed2c4c/attachment-0001.html>


More information about the petsc-users mailing list