[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is it possible to build one Petsc that works for both C and C++?
- To: PETSc <petsc-users@xxxxxxxxxxx>
- Subject: Is it possible to build one Petsc that works for both C and C++?
- From: Shi Jin <jinzishuai@xxxxxxxxx>
- Date: Sat, 16 Jun 2007 22:11:55 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=NQQE5JbNoxZxFeS+79QImOqVRXfy7XY0kGQqTpj2Jl6x0t8E45ja3/Ft4ANivcs4Eqnqg4xAYaiT2LI/sEKfYFeb8ISH79cvk+6ykSD4dBjodGxB/+6pZ/WUVmFgr1u/XDpeWhGjMparu94hpgGNvy1AAv79+cxnJwMn6V666is=;
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
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