[petsc-users] When building PETSc with --prefix, reference to temporary build directory remains

Bastian Löhrer bastian.loehrer at tu-dresden.de
Thu Aug 1 06:07:12 CDT 2019


Dear all,


I'm struggling to compile PETSc 3.3-p6 on a cluster where it is to be 
provided in a read-only folder.


My scenario is the following:

PETSc shall end up in a folder into which I can write from a login node 
but which is read-only on compute nodes: I'll call it /readonly/ below.
So, using a compute node, I need to compile PETSc in a different 
location, which I'll call /temporary/

I have read numerous instructions on the web and here are the steps that 
I came up with:


1. on a compute node: unpack the PETSc source to /temporary/ and 
navigate there.

2. configure:

./configure \
                  --prefix=/readonly/ \
--with-gnu-compilers=0 \
--with-vendor-compilers=intel \
--with-large-file-io=1 \
                  --CFLAGS="-fPIC -L${I_MPI_ROOT}/intel64/lib 
-I${I_MPI_ROOT}/intel64/include -lmpi"           \
                --CXXFLAGS="-fPIC -L${I_MPI_ROOT}/intel64/lib 
-I${I_MPI_ROOT}/intel64/include -lmpi -lmpicxx"  \
                  --FFLAGS="-fPIC -L${I_MPI_ROOT}/intel64/lib 
-I${I_MPI_ROOT}/intel64/include -lmpi"           \
                 --LDFLAGS="-L${I_MPI_ROOT}/intel64/lib 
-I${I_MPI_ROOT}/intel64/include -lmpi"                 \
                 COPTFLAGS="-O3 -axCORE-AVX2 -xSSE4.2 -fp-model 
consistent -fp-model source -fp-speculation=safe -ftz"  \
               CXXOPTFLAGS="-O3 -axCORE-AVX2 -xSSE4.2 -fp-model 
consistent -fp-model source -fp-speculation=safe -ftz"  \
                 FOPTFLAGS="-O3 -axCORE-AVX2 -xSSE4.2 -fp-model 
consistent -fp-model source -fp-speculation=safe -ftz"  \
--with-blas-lapack-dir="${MKLROOT}/lib/intel64" \
--download-hypre \
          --with-debugging=no

3. make all

4. on a login node: make install

5. From now on set PETSC_DIR=/readonly PETSC_ARCH=''

step 4 moves the compiled PETSc to /readonly/ and it works, but when I 
compile a program with it the following line pops up in the linking command:

-Wl,-rpath,/temporary/-Xlinker

This is a problem when the drive on which /temporary/ is placed is not 
reachable which is the case right now due to technical issues. This 
causes the linking process to get stuck.
The folder /temporary/ is to be deleted anyway so I do not see why it 
should be referenced here.


Am I missing something?


- Bastian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190801/9e8e3a72/attachment.html>


More information about the petsc-users mailing list