By the way I forgot to say that , I build mpich with C++ and fortran and both works. So I assumed that petsc would work too.
Tahar Le 16 mai 09 ? 00:21, Satish Balay a ?crit : > If using PETSc from fortran - why use --with-clanguage=cxx ? > > Also - verify if PETSc examples work - before attempting your code. > And then use PETSc makefiles. > > [i.e copy the makefile from PETSc example dir - and modify the target > to build your code] > > Satish > > On Sat, 16 May 2009, Tahar Amari wrote: > >> Just to let you know is that I built petsc with c++ anyway since I >> did >> >> configure -with-cc=gcc --download-mpich=1 --download-parmetis=1 >> --with-#shared=0 --download-f-blas-lapack --with-clanguage=cxx -- >> with-cxx=g++ >> --with-fc=ifort --with-dynamic=0 >> >> >> Tahar >> >> >> Le 15 mai 09 ? 23:49, Matthew Knepley a ?crit : >> >>> On Fri, May 15, 2009 at 4:35 PM, Tahar Amari <amari at >>> cpht.polytechnique.fr >>> > >>> wrote: >>> Thanks , >>> >>> Now this a different kind of errors (just a piece of those below :) >>> >>> If you want to use C++, you should configure using --with- >>> clanguage=cxx. >>> Then you will get the C++ linker. >>> >>> Matt >>> >>> >>> gcc -o mh4d mh4d.o petsc.o comm.o setbc.o local.o gridutil.o >>> mympi.o >>> terminator.o operator.o shellsort.o edge.o side.o vertex.o >>> tetrahedron.o >>> rotation.o tetrahedralgrid.o field.o -I/usr/local/hdf/HDF4.2r1/ >>> include >>> -L/usr/local/hdf/HDF4.2r1/lib -lmfhdf -ldf -lsz -ljpeg -lz >>> -L/usr/local/petsc/macx/lib -lpetscsnes -lpetscvec -lpetscmat - >>> lpetsccontrib >>> -lpetscts -lpetscdm -lpetscksp -lpetsc -lmpich -lmpichcxx -lpmpich >>> -lfmpich >>> -lmpichf90 -lparmetis -lmetis -lfblas -lflapack -L/usr/X11R6/lib - >>> lX11 -lXt >>> -lXext -lX11 -L/usr/local/petsc/macx/lib -lpetscsnes -lpetscvec - >>> lpetscmat >>> -lpetsccontrib -lpetscts -lpetscdm -lpetscksp -lpetsc -lmpich - >>> lmpichcxx >>> -lpmpich -lfmpich -lmpichf90 -lparmetis -lmetis -lfblas -lflapack >>> Undefined symbols: >>> "std::basic_ostringstream<char, std::char_traits<char>, >>> std::allocator<char> >>>> ::basic_ostringstream(std::_Ios_Openmode)", referenced from: >>> PetscErrorCxx(int, char const*, char const*, char const*, int, >>> int)in >>> libpetsc.a(err.o) >>> PETSc::Exception::Exception(std::basic_string<char, >>> std::char_traits<char>, std::allocator<char> > const&)in >>> libpetsc.a(err.o) >>> "_for_stop_core", referenced from: >>> _advmom_cv_ in mh4d.o >>> _advmom_cv_ in mh4d.o >>> _advmom_cv_ in mh4d.o >>> _terminators_mp_terminator_ in terminator.o >>> _terminators_mp_terminator_all_ in terminator.o >>> _tetrahedralgrid_mod_mp_zero_bndr_tvv_ in tetrahedralgrid.o >>> >>> >>> >>> >>> Le 15 mai 09 ? 23:29, Matthew Knepley a ?crit : >>> >>> CLINKER >>> >>> >>> >>> >>> -- >>> What most experimenters take for granted before they begin their >>> experiments >>> is infinitely more interesting than any results to which their >>> experiments >>> lead. >>> -- Norbert Wiener >>
