Is it possible to build one Petsc that works for both C and C++?

Shi Jin jinzishuai at yahoo.com
Sun Jun 17 00:11:55 CDT 2007


Hi,

I am learning the unstructured part of Petsc, which
naturally uses C++(at least the sample I am studying
is C++). On the other hand, my old Petsc codes are all
written in C.
I found that once I build the Petsc with C++, the old
C codes cannot be compiled since it is trying to use
mpicxx to compile the .c source files. However, I do
see after the configuration stage that there is a
list:
C compiler: mpicc
C++ compiler: mpicxx
Fortran compiler: mpif77

Is it possible to instruct Petsc to use the
corresponding  compiler for different source codes?
Thanks a lot.
PS. This is how I configured my Petsc-2.3.3-p3:
./config/configure.py --with-cc=gcc --with-fc=g77
--with-cxx=g++ --download-f-blas-lapack=1
--download-mpich=1 --with-clanguage=cxx --with-sieve=1
--download-boost=1 --download-chaco
--download-parmetis   --download-fiat  --download-generator


       
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php




More information about the petsc-users mailing list