Multiple versions of PetSc
Satish Balay
balay at mcs.anl.gov
Tue Apr 22 09:41:38 CDT 2008
On Tue, 22 Apr 2008, Amit.Itagi at seagate.com wrote:
>
> Hi,
>
> I have a naive question. I have a program that uses a C++, complex version
> of PetSc. I need to run a second program that uses a C, real version of
> PetSc. For the first program, I have defined the PETSC_ARCH and PETSC_DIR
> variables in my .tcshrc . In order to get the second program working, do I
> need to install a second version of PetSc ? How do I separate the
> environment variables ?
You would just install with a different PETSC_ARCH value.
Now at compile time - you can use the correct PETSC_ARCH value with make.
for eg:
./config/configure.py PETSC_ARCH=linux-complex --with-clanguage=cxx --with-scalar-type=complex
make PETSC_ARCH=linux-complex all test
make PETSC_ARCH=linux-complex mycode
./config/configure.py PETSC_ARCH=linux-real
make PETSC_ARCH=linux-real all test
make PETSC_ARCH=linux-real mycode
You can set a default PETSC_ARCH in your .cshrc - but to use the other
build - you change it at command-line to make [as indicated above]
Note: both version can coexist in the same PETSC_DIR.
Satish
More information about the petsc-users
mailing list