[petsc-dev] PETSC_WITH_EXTERNAL_LIB is not including the correct gcc directories
Hector E Barrios Molano
hectorb at utexas.edu
Thu Oct 18 16:48:34 CDT 2018
Hi PETSc Experts!
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++
Here is the command used to build PETSc:
./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
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
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
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
KLROOT}/lib/intel64/libmkl_core.a
${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -liomp5
-ldl -lpthread -lm"
Here is LD_LIBRARY_PATH:
echo $LD_LIBRARY_PATH
/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
Attached you will find the resulting petscvariables file. There in the
definition of PETSC_WITH_EXTERNAL_LIB it is not included the gcc-6.1
directory and instead gcc4.1 directory is included.
What could be the problem? Thank you for your help.
Best regards,
Hector
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181018/0bd7b240/attachment.html>
-------------- next part --------------
MPICXX_SHOW = g++6 -I/home/hector/installed/libraries_intel/openmpi/include -pthread -Wl,-rpath -Wl,/home/hector/installed/libraries_intel/openmpi/lib -Wl,--enable-new-dtags -L/home/hector/installed/libraries_intel/openmpi/lib -lmpi
C_DEPFLAGS = -MMD -MP
FC_DEFINE_FLAG = -D
MPICC_SHOW = gcc6 -I/home/hector/installed/libraries_intel/openmpi/include -pthread -Wl,-rpath -Wl,/home/hector/installed/libraries_intel/openmpi/lib -Wl,--enable-new-dtags -L/home/hector/installed/libraries_intel/openmpi/lib -lmpi
AR_FLAGS = cr
CXX_DEPFLAGS = -MMD -MP
MPIFC_SHOW = ifort -I/home/hector/installed/libraries_intel/openmpi/include -I/home/hector/installed/libraries_intel/openmpi/lib -Wl,-rpath -Wl,/home/hector/installed/libraries_intel/openmpi/lib -Wl,--enable-new-dtags -L/home/hector/installed/libraries_intel/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
FAST_AR_FLAGS = Scq
FC_MODULE_OUTPUT_FLAG = -module
PETSC_LANGUAGE = CONLY
FC_LINKER_FLAGS = -qopenmp -qopenmp-link static -qopenmp -qopenmp-link static -g -fopenmp
LIBNAME = ${INSTALL_LIB_DIR}/libpetsc.${AR_LIB_SUFFIX}
SL_LINKER = mpicc
PETSC_BUILD_USING_CMAKE = 1
CC_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3 -fopenmp
SOWING_LIB =
MKL_SPARSE_INCLUDE =
PETSC_LIB = ${PETSC_WITH_EXTERNAL_LIB}
PETSC_PRECISION = double
PETSC_LIB_BASIC = -lpetsc
OPENMP_LIB =
MKL_SPARSE_OPTIMIZE_LIB =
FC_FLAGS = -qopenmp -qopenmp-link static -g -fopenmp
BLASLAPACK_LIB = -Wl,-rpath,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread
PETSC_MAT_LIB = ${PETSC_WITH_EXTERNAL_LIB}
PCC = mpicc
SL_LINKER_LIBS = ${PETSC_EXTERNAL_LIB_BASIC}
ZOLTAN_INCLUDE = -I/home/hector/installed/libraries_intel/zoltan/include
VALGRIND_INCLUDE = -I/home/hector/installed/include
MATHLIB_INCLUDE =
MPI_LIB =
MKL_SPARSE_LIB =
PETSC_EXTERNAL_LIB_BASIC = -Wl,-rpath,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -Wl,-rpath,/home/hector/installed/libraries_intel/hypre/lib -L/home/hector/installed/libraries_intel/hypre/lib -Wl,-rpath,/home/hector/installed/libraries_intel/zoltan/lib -L/home/hector/installed/libraries_intel/zoltan/lib -Wl,-rpath,/home/hector/installed/libraries_intel/parmetis/lib -L/home/hector/installed/libraries_intel/parmetis/lib -Wl,-rpath,/home/hector/installed/libraries_intel/petsc_git-debug/lib -L/home/hector/installed/libraries_intel/petsc_git-debug/lib -L/home/hector/installed/libraries_intel/openmpi/lib -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/ipp/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/tbb/lib/intel64/gcc4.1 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/daal/lib/intel64_lin -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/tbb/lib/intel64_lin/gcc4.4 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Wl,-rpath,/home/hector/installed/libraries_intel/openmpi/lib -Wl,--start-group -Wl,--end-group -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lHYPRE -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lzoltan -lparmetis -lmetis -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lX11 -lstdc++ -ldl -liomp5 -lpthread -lm -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -limf -lifport -lifcoremt -lsvml -lipgo -lirc -lgcc_s -lirc_s -lrt -lm -lpthread -lz -lstdc++ -ldl -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -ldl -lpthread -lm
PETSC_TS_LIB = ${PETSC_WITH_EXTERNAL_LIB}
SL_LINKER_FLAGS = ${PCC_LINKER_FLAGS}
X_LIB = -lX11
PARMETIS_LIB = -Wl,-rpath,/home/hector/installed/libraries_intel/parmetis/lib -L/home/hector/installed/libraries_intel/parmetis/lib -lparmetis
CC_SUFFIX = o
OPENMP_INCLUDE =
SCALAPACK_INCLUDE =
PETSC_FC_INCLUDES = -I/home/hector/installed/libraries_intel/petsc_git-debug/include -I/home/hector/installed/libraries_intel/hypre/include -I/home/hector/installed/libraries_intel/zoltan/include -I/home/hector/installed/libraries_intel/parmetis/include -I/home/hector/installed/include
METIS_INCLUDE = -I/home/hector/installed/libraries_intel/parmetis/include
PETSC_CHARACTERISTIC_LIB = ${PETSC_WITH_EXTERNAL_LIB}
MKL_SPARSE_OPTIMIZE_INCLUDE =
PETSC_SCALAR = real
CPP_FLAGS =
PETSC_WITH_EXTERNAL_LIB = -L/home/hector/installed/libraries_intel/petsc_git-debug/lib -Wl,-rpath,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -Wl,-rpath,/home/hector/installed/libraries_intel/hypre/lib -L/home/hector/installed/libraries_intel/hypre/lib -Wl,-rpath,/home/hector/installed/libraries_intel/zoltan/lib -L/home/hector/installed/libraries_intel/zoltan/lib -Wl,-rpath,/home/hector/installed/libraries_intel/parmetis/lib -L/home/hector/installed/libraries_intel/parmetis/lib -Wl,-rpath,/home/hector/installed/libraries_intel/petsc_git-debug/lib -L/home/hector/installed/libraries_intel/petsc_git-debug/lib -L/home/hector/installed/libraries_intel/openmpi/lib -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/ipp/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/tbb/lib/intel64/gcc4.1 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/daal/lib/intel64_lin -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/tbb/lib/intel64_lin/gcc4.4 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Wl,-rpath,/home/hector/installed/libraries_intel/openmpi/lib -Wl,--start-group -Wl,--end-group -lpetsc -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lHYPRE -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lzoltan -lparmetis -lmetis -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lX11 -lstdc++ -ldl -liomp5 -lpthread -lm -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -limf -lifport -lifcoremt -lsvml -lipgo -lirc -lgcc_s -lirc_s -lrt -lm -lpthread -lz -lstdc++ -ldl -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -ldl -lpthread -lm
PETSC_KSP_LIB = ${PETSC_WITH_EXTERNAL_LIB}
PETSC_KSP_LIB_BASIC = -lpetsc
FPP_FLAGS =
HYPRE_INCLUDE = -I/home/hector/installed/libraries_intel/hypre/include
PETSC_CC_INCLUDES = -I/home/hector/installed/libraries_intel/petsc_git-debug/include -I/home/hector/installed/libraries_intel/hypre/include -I/home/hector/installed/libraries_intel/zoltan/include -I/home/hector/installed/libraries_intel/parmetis/include -I/home/hector/installed/include
FC_LINKER = mpifort
HYPRE_LIB = -Wl,-rpath,/home/hector/installed/libraries_intel/hypre/lib -L/home/hector/installed/libraries_intel/hypre/lib -lHYPRE
PTHREAD_LIB =
CXX_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -fopenmp
PTSCOTCH_INCLUDE = -I/home/hector/installed/libraries_intel/petsc_git-debug/include
PCC_LINKER_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3 -fopenmp
SHLIBS = libpetsc
PETSC_CONTRIB = ${PETSC_WITH_EXTERNAL_LIB}
CXX_LINKER_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -fopenmp
PCC_LINKER = mpicc
PETSC_SYS_LIB = ${PETSC_WITH_EXTERNAL_LIB}
PCC_FLAGS = -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3 -fopenmp
VALGRIND_LIB =
PTHREAD_INCLUDE =
METIS_LIB = -Wl,-rpath,/home/hector/installed/libraries_intel/parmetis/lib -L/home/hector/installed/libraries_intel/parmetis/lib -lmetis
MATHLIB_LIB =
CXX_LINKER = mpicxx
PETSC_TAO_LIB_BASIC = -lpetsc
BLASLAPACK_INCLUDE =
PETSC_TS_LIB_BASIC = -lpetsc
PETSC_VEC_LIB = ${PETSC_WITH_EXTERNAL_LIB}
CC_LINKER_SUFFIX =
SL_LINKER_SUFFIX =
PARMETIS_INCLUDE = -I/home/hector/installed/libraries_intel/parmetis/include
PETSC_DM_LIB = ${PETSC_WITH_EXTERNAL_LIB}
FC_MODULE_FLAG = -I
SCALAPACK_LIB = -Wl,-rpath,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -L/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
wPETSC_DIR = /home/hector/installed/libraries_intel/petsc_git-debug
X_INCLUDE =
PTSCOTCH_LIB = -Wl,-rpath,/home/hector/installed/libraries_intel/petsc_git-debug/lib -L/home/hector/installed/libraries_intel/petsc_git-debug/lib -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr
ZOLTAN_LIB = -Wl,-rpath,/home/hector/installed/libraries_intel/zoltan/lib -L/home/hector/installed/libraries_intel/zoltan/lib -lzoltan
CONFIGURE_OPTIONS = --prefix=/home/hector/installed/libraries_intel/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-valgrind-dir=/home/hector/installed --with-parmetis-dir=/home/hector/installed/libraries_intel/parmetis/ --with-metis-dir=/home/hector/installed/libraries_intel/parmetis/ --with-zoltan-dir=/home/hector/installed/libraries_intel/zoltan/ --with-hypre-dir=/home/hector/installed/libraries_intel/hypre --download-ptscotch --with-blaslapack-lib=\"[/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_intel_lp64.a,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_core.a,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_intel_thread.a]\" --with-scalapack-include=/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/include --with-scalapack-lib=\"[/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_scalapack_lp64.a,/share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/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 /share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_intel_lp64.a /share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_core.a /share/apps/intel3/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -liomp5 -ldl -lpthread -lm\"
SOWING_INCLUDE =
PETSC_TAO_LIB = ${PETSC_WITH_EXTERNAL_LIB}
MPI_INCLUDE =
FC_SUFFIX = o
PETSC_SNES_LIB = ${PETSC_WITH_EXTERNAL_LIB}
FLEX = /home/hector/installed/bin/flex
SHELL = /bin/sh
GREP = /home/hector/installed/bin/grep
MV = /home/hector/installed/bin/mv
PYTHON = /home/hector/installed/bin/python
MKDIR = /home/hector/installed/bin/mkdir -p
SEDINPLACE = /bin/sed -i
M4 = /home/hector/installed/bin/m4
SED = /bin/sed
BISON = /home/hector/installed/bin/bison
DIFF = /home/hector/installed/bin/diff -w
GZIP = /bin/gzip
RM = /home/hector/installed/bin/rm -f
CP = /home/hector/installed/bin/cp
CC_LINKER_SLFLAG = -Wl,-rpath,
CC = mpicc
RANLIB = /home/hector/installed/bin/ranlib
DYNAMICLINKER = mpicc
CXX = mpicxx
FC = mpifort
CXXCPP = mpicxx -E
FC_LINKER_SLFLAG = -Wl,-rpath,
CPP = mpicc -E
AR_LIB_SUFFIX = a
LD_SHARED = /home/hector/installed/bin/ar
AR = /home/hector/installed/bin/ar
PREFIXDIR = /home/hector/installed/libraries_intel/petsc_git-debug
PETSC_SCALAR_SIZE = 64
PETSC_INDEX_SIZE = 32
MAKE_IS_GNUMAKE = 1
MAKE_NP = 4
NPMAX = 4
OMAKE_PRINTDIR = /usr/bin/gmake --print-directory
MAKE = /usr/bin/gmake
MAKE_PAR_OUT_FLG =
OMAKE = /usr/bin/gmake --no-print-directory
MAKE_LOAD = 6.0
MAKE_TEST_NP = 2
GIT = git
HG = hg
BUILDSHAREDLIB = no
GDB = /home/hector/installed/bin/gdb
DSYMUTIL = true
MPIEXEC = mpiexec
CMAKE = /home/hector/installed/bin/cmake
CTEST = /home/hector/installed/bin/ctest
DOCTEXT = /home/hector/dwnld_prog/petsc/linux-intel-debug/bin/doctext
BIB2HTML = /home/hector/dwnld_prog/petsc/linux-intel-debug/bin/bib2html
PDFLATEX = /usr/bin/pdflatex
BFORT = /home/hector/dwnld_prog/petsc/linux-intel-debug/bin/bfort
MAPNAMES = /home/hector/dwnld_prog/petsc/linux-intel-debug/bin/mapnames
More information about the petsc-dev
mailing list