Dealii: Setting the environmental variables to configure the software SLEPc

Created on 13 Mar 2017  路  3Comments  路  Source: dealii/dealii

Can anyone help me set the environmental variables for configuring the software SLEPc (a library for the solution of large sparse eigenproblems on parallel computers).
@ http://slepc.upv.es/documentation/instal.htm . I am using in Ubuntu 16.04 LTS.

I have used http://www.mcs.anl.gov/petsc/documentation/installation.html and http://www.mcs.anl.gov/petsc/petsc-3.2/docs/installation.html as a guideline, where it states:

specify enviornment variable for csh/tcsh [can be specified in ~/.cshrc]

setenv PETSC_DIR /home/balay/petsc-3.7.0
setenv PETSC_ARCH linux-gnu-c-debug

specify enviornment variable for bash [can be specified in ~/.bashrc]

export PETSC_DIR=/home/balay/petsc-3.7.0
export PETSC_ARCH=linux-gnu-c-debug

I get error message:

$ ./configure
Checking environment...
ERROR: PETSC_DIR enviroment variable is not set

I have added to the end of ~/.bashrc file the following:

export SLEPC_DIR=/home/brendan/Documents/slepc/slepc
export PETSC_DIR=/home/brendan/Documents/petsc_2/petsc
export PETSC_ARCH=/home/brendan/Documents/petsc_2/petsc/arch-linux2-c-debug

and to the ~/.cshrc file:

setenv SLEPC_DIR=/home/brendan/Documents/slepc/slepc
setenv PETSC_DIR=/home/brendan/Documents/petsc_2/petsc
setenv PETSC_ARCH=/home/brendan/Documents/petsc_2/petsc/arch-linux2-c-debug

Most helpful comment

There are probably more appropriate places to ask for help in installing SLEPc than here. There are in particular the PETSc mailing lists.
We also support candi and spack that can install SLEPc and deal.II together.

Apart from that, maybe you forgot to call source ~/.bashrc or open a new terminal? What does echo $PETSC_DIR report?

All 3 comments

There are probably more appropriate places to ask for help in installing SLEPc than here. There are in particular the PETSc mailing lists.
We also support candi and spack that can install SLEPc and deal.II together.

Apart from that, maybe you forgot to call source ~/.bashrc or open a new terminal? What does echo $PETSC_DIR report?

I have deleted the setenv code in ~/.cshrc and added to the end of ~/.bashrc file the following:

export SLEPC_DIR=/home/brendan/Documents/slepc/slepc
export PETSC_DIR=/home/brendan/Documents/petsc_2/petsc
export PETSC_ARCH=arch-linux2-c-debug

echo $PETSC_DIR gives: /home/brendan/Documents/petsc_2/petsc

I then entered source ~/.bashrc and
$ ./configure PETSC_DIR=/home/brendan/Documents/petsc_2/petsc PETSC_ARCH=/home/brendan/Documents/petsc_2/petsc/arch-linux2-c-debug

gives:

ERROR: Invalid arguments PETSC_DIR=/home/brendan/Documents/petsc_2/petsc PETSC_ARCH=/home/brendan/Documents/petsc_2/petsc/arch-linux2-c-debug
Use -h for help

And then I entered ./configure only. It gives:

$ ./configure
Checking environment... done
Checking PETSc installation... done
Checking LAPACK library... done
Writing various configuration files... done
Generating Fortran stubs... done

===============================================================================
SLEPc Configuration
===============================================================================

SLEPc directory:
 /home/brendan/Documents/slepc/slepc
  It is a git repository on branch: master
PETSc directory:
 /home/brendan/Documents/petsc_2/petsc
  It is a git repository on branch: master
Architecture "arch-linux2-c-debug" with double precision real numbers

xxx=========================================================================xxx
 Configure stage complete. Now build the SLEPc library with (gnumake build):
   make SLEPC_DIR=$PWD PETSC_DIR=/home/brendan/Documents/petsc_2/petsc PETSC_ARCH=arch-linux2-c-debug
xxx=========================================================================xxx

I think the source ~/.bashrc worked with ./configure !

i am closing this issue as it appears you have resolved it.

Was this page helpful?
0 / 5 - 0 ratings