Attaching a minimal sample makefile. The additional info it would
need is PETSC_DIR, PETSC_ARCH values for your install of PETSc.
All example/tests,tutorial dirs have makefiles in petsc format..
Satish
On Fri, 12 Nov 2010, Tahar Amari wrote:Great thanks, it seems that -lpetsc alone works .I will follow this advice regarding the makefile, for the reason you gave.Where should I get a typical makefile to modify please ?TaharLe 12 nov. 2010 à 18:34, Satish Balay a écrit :Make sure your compiles have all the flags listed here..Its best to use petsc makefile formats so that this info isautomatically picked up from the petsc config files. [and not tweakuser makefiles for every install of petsc..]SatishOn Fri, 12 Nov 2010, Tahar Amari wrote:You are right.Here is what I gottimac> make getincludedirs getlinklibs-I/Data/Poub1/petsc-3.1-p5/macx/include -I/Data/Poub1/petsc-3.1-p5/include -I/Data/Poub1/petsc-3.1-p5/macx/include-L/Data/Poub1/petsc-3.1-p5/macx/lib -L/Data/Poub1/petsc-3.1-p5/macx/lib -L/Data/Poub1/petsc-3.1-p5/macx/lib -lpetsc -L/usr/X11R6/lib -lX11 -L/Data/Poub1/petsc-3.1-p5/macx/lib -lparmetis -lmetis -lflapack -lfblas -L/Data/Poub1/petsc-3.1-p5/macx/lib -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/opt/intel/Compiler/11.1/088/lib -L/opt/intel/Compiler/11.1/088/Frameworks/mkl/lib/em64t -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -ldl -lpmpich -lmpich -lSystem -lmpichf90 -lifport -lifcore -limf -lsvml -lipgo -lgcc_s.10.5 -lSystemStubs -lmx -lirc -lpthread -ldl -lpmpich -lmpich -lSystem -ldlWhat does it mean please for me to change in my makefiles ?Do you mean that I should remove any link other than -lpetsc ?Great thanksTaharLe 12 nov. 2010 à 18:26, Satish Balay a écrit :Looks like you are not using PETSc makefiles - and upgrading fromolder release to petsc-3.1Currently there is only one library for petsc [-lpetsc]Check:cd $PETSC_DIRmake getincludedirs getlinklibsSatishOn Fri, 12 Nov 2010, Tahar Amari wrote:Many thanks. This is solved.Now at link I have the library not found. Any idea ?-L/usr/local/petsc/macx/lib -lpetscsnes -lpetscvec -lpetscmat -lpetsccontrib -lpetscts -lpetscdm -lpetscksp -lpetsc -lmpich -lpmpich -lfmpich -lmpichf90 -lparmetis -lmetis -lfblas -lflapackld: library not found for -lpetscsnesTaharLe 12 nov. 2010 à 18:17, Satish Balay a écrit :Looks like this is related to the following:http://www.mcs.anl.gov/petsc/petsc-as/documentation/changes/31.html# petsc.h and petscdef.h are replaced with petscsys.h and petscsysdef.h; while petsc.h now includes ALL PETSc include files.Try removing all includes other than 'petsc.h' from your code.SatishOn Fri, 12 Nov 2010, Tahar Amari wrote:Hello,While compiling one of my code with ifort , I have the following error pointingtowards petscvec.h .Any idea about this posssible kind of error please ? Any option of ifort to use ?Many thanksTaharifort -assume byterecl -I/usr/local/petsc/ -I/usr/local/petsc//include -I/usr/local/petsc//include/finclude -I/usr/local/petsc//macx/include -I/usr/X11R6/include/X11 -DPETSC_HAVE_PARMETIS -DPETSC_USE_DEBUG -DPETSC_USE_LOG -DPETSC_USE_BOPT_g -DPETSC_USE_STACK -DPETSC_AVOID_MPIF_H -c petsc.fpp/usr/local/petsc//include/finclude/petscvec.h(10): error #6418: This name has already been assigned a data type. [NORM_1]integer(kind=selected_int_kind(5)) NORM_1--------------------------------------------T. AmariCentre de Physique TheoriqueEcole Polytechnique91128 Palaiseau Cedex Francetel : 33 1 69 33 42 52fax: 33 1 69 33 49 49email: <mailto:amari@cpht.polytechnique.fr>URL : http://www.cpht.polytechnique.fr/cpht/amari--------------------------------------------T. AmariCentre de Physique TheoriqueEcole Polytechnique91128 Palaiseau Cedex Francetel : 33 1 69 33 42 52fax: 33 1 69 33 49 49email: <mailto:amari@cpht.polytechnique.fr>URL : http://www.cpht.polytechnique.fr/cpht/amari--------------------------------------------T. AmariCentre de Physique TheoriqueEcole Polytechnique91128 Palaiseau Cedex Francetel : 33 1 69 33 42 52fax: 33 1 69 33 49 49email: <mailto:amari@cpht.polytechnique.fr>URL : http://www.cpht.polytechnique.fr/cpht/amari--------------------------------------------T. AmariCentre de Physique TheoriqueEcole Polytechnique91128 Palaiseau Cedex Francetel : 33 1 69 33 42 52fax: 33 1 69 33 49 49email: <mailto:amari@cpht.polytechnique.fr>URL : http://www.cpht.polytechnique.fr/cpht/amari<makefile.txt>