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
