<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Droid Serif">Hi PETSc Experts!<br>
<br>
I am building PETSc from the git repository and it is strange that
once PETSc is installed the petscvariables
(PETSC_WITH_EXTERNAL_LIB) file shows a different gcc library path
that the one from the compiler used and the one defined in
LD_LIBRARY_PATH. This is causing me troubles when using PETSc with
other library that requires libstdc++<br>
<br>
Here is the command used to build PETSc:<br>
<font size="-1" face="Droid Sans Mono">./configure
--prefix=$DEV_lib_dir/petsc_git-debug
--PETSC_DIR=/home/hector/dwnld_prog/petsc
--PETSC_ARCH=linux-intel-debug --CC=mpicc --FC=mpifort
--CXX=mpicxx --with-openmp=1 --with-valgrind=1 --with-valgri<br>
nd-dir=/home/hector/installed
--with-parmetis-dir=$DEV_lib_dir/parmetis/
--with-metis-dir=$DEV_lib_dir/parmetis/
--with-zoltan-dir=$DEV_lib_dir/zoltan/
--with-hypre-dir=$DEV_lib_dir/hypre --download-ptscotch
--with-blas-lapack-lib=\[${MKLR<br>
OOT}/lib/intel64/libmkl_intel_lp64.a,${MKLROOT}/lib/intel64/libmkl_core.a,${MKLROOT}/lib/intel64/libmkl_intel_thread.a\]
--with-scalapack-include=${MKLROOT}/include
--with-scalapack-lib=\[${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a,${MK<br>
LROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a\]
--with-shared-libraries=0 --FC_LINKER_FLAGS="-qopenmp
-qopenmp-link static" --FFLAGS="-qopenmp -qopenmp-link static"
--LIBS="-Wl,--start-group
${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${M<br>
KLROOT}/lib/intel64/libmkl_core.a
${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group
-liomp5 -ldl -lpthread -lm"</font><br>
<br>
Here is LD_LIBRARY_PATH:<br>
<font size="-1" face="Droid Sans Mono">echo $LD_LIBRARY_PATH <br>
/home/hector/installed/gcc-6.1/lib64:/home/hector/installed/gcc-5.1/lib64://home/hector/installed/lib:/home/hector/installed/libraries_intel/openmpi/lib:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mpi/intel64/lib:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mpi/mic/lib:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/ipp/lib/intel64:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/tbb/lib/intel64/gcc4.1:/share/apps/intel3/debugger_2016/libipt/intel64/lib:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/daal/lib/intel64_lin:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/daal/../compiler/lib/intel64_lin:/home/hector/installed/gcc-6.1/lib64:/home/hector/installed/gcc-5.1/lib64://home/hector/installed/lib:/home/hector/installed/gcc-6.1/lib64:/home/hector/installed/gcc-5.1/lib64://home/hector/installed/lib:/opt/gridengine/lib/lx26-amd64:/opt/openmpi/lib</font><br>
<br>
<br>
Attached you will find the resulting petscvariables file. There in
the definition of </font><font face="Droid Serif"><font
face="Droid Serif">PETSC_WITH_EXTERNAL_LIB </font>it is not
included the gcc-6.1 directory and instead gcc4.1 directory is
included.<br>
<br>
<br>
What could be the problem? Thank you for your help.<br>
<br>
Best regards,<br>
<br>
Hector<br>
</font>
</body>
</html>