[Trilinos-Users] Error while compilation

Harshad Sahasrabudhe hsahasra at purdue.edu
Thu Dec 14 10:12:09 EST 2017


Hello,

I'm trying to compile Trilinos using Intel MKL + IMPI environment. I get
the following error while compiling Teuchos, any help in resolving this is
greatly appreciated:

[  3%] Building CXX object
packages/teuchos/core/src/CMakeFiles/teuchoscore.dir/Teuchos_ScalarTraits.cpp.o
cd
/scratch/conte/h/hsahasra/trilinos/trilinos_src/build/packages/teuchos/core/src
&& /apps/rhel6/intel/impi/5.1.2.150/intel64/bin/mpiicpc
 -DTEUCHOSCORE_LIB_EXPORTS_MODE -O2 -DHAVE_CONFIG_H -fPIC -O3 -DNDEBUG
-I/scratch/conte/h/hsahasra/trilinos/trilinos_src/build
-I/scratch/conte/h/hsahasra/trilinos/trilinos_src/build/packages/teuchos/core/src
-I/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src
  -o CMakeFiles/teuchoscore.dir/Teuchos_ScalarTraits.cpp.o -c
/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src/Teuchos_ScalarTraits.cpp
In file included from
/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src/Teuchos_ScalarTraits.cpp(42):
/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src/Teuchos_ScalarTraits.hpp(646):
error: identifier "errno" is undefined
        errno = 0;
        ^

In file included from
/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src/Teuchos_ScalarTraits.cpp(42):
/scratch/conte/h/hsahasra/trilinos/trilinos_src/packages/teuchos/core/src/Teuchos_ScalarTraits.hpp(758):
error: identifier "errno" is undefined
        errno = 0;
        ^

Here is the cmake script that I use:

cmake \
-D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
-D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_CXX_COMPILER:FILEPATH="/apps/rhel6/intel/impi/
5.1.2.150/intel64/bin/mpiicpc" \
-D CMAKE_C_COMPILER:FILEPATH="/apps/rhel6/intel/impi/
5.1.2.150/intel64/bin/mpiicc" \
-D CMAKE_CXX_FLAGS:FILEPATH="-O2 -DHAVE_CONFIG_H -fPIC" \
-D CMAKE_C_FLAGS:FILEPATH="-O2 -DHAVE_CONFIG_H -fPIC" \
-D Trilinos_ENABLE_CXX11=OFF \
-D Trilinos_ENABLE_EXPLICIT_INSTANTIATION=ON \
-D Trilinos_ENABLE_Fortran=ON \
-D CMAKE_Fortran_COMPILER:FILEPATH="/apps/rhel6/intel/impi/
5.1.2.150/intel64/bin/mpiifort" \
-D CMAKE_Fortran_FLAGS:FILEPATH="-O2 -fPIC" \
-D Trilinos_ENABLE_DEBUG=ON \
-D Trilinos_EXTRA_LINK_FLAGS:STRING="-liomp5 -lpthread -lm -ldl" \
-D TPL_ENABLE_MPI:BOOL=ON \
-D
MPI_BASE_DIR="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl"
\
-D MPI_EXEC_MAX_NUMPROCS=16 \
-D Trilinos_ENABLE_TESTS=ON \
-D Trilinos_ENABLE_Thyra:BOOL=ON \
-D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-D TPL_ENABLE_BLAS:STRING=ON \
-D
BLAS_LIBRARY_DIRS="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64;/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64"
\
-D
BLAS_LIBRARY_NAMES="mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5;pthread;m;dl"
\
-D
TPL_BLAS_INCLUDE_DIRS:PATH="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/include/"
\
-D TPL_ENABLE_LAPACK:STRING=ON \
-D
LAPACK_LIBRARY_DIRS="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64;/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64"
\
-D
LAPACK_LIBRARY_NAMES="mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5;pthread;m;dl"
\
-D
TPL_LAPACK_INCLUDE_DIRS:PATH="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/include/"
\
-D TPL_ENABLE_BLACS:STRING=ON \
-D
BLACS_LIBRARY_DIRS="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64;/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64"
\
-D
BLACS_LIBRARY_NAMES="mkl_blacs_intelmpi_lp64;mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5;pthread;m;dl"
\
-D
TPL_BLACS_INCLUDE_DIRS:PATH="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/include/"
\
-D TPL_ENABLE_SCALAPACK:STRING=ON \
-D
SCALAPACK_LIBRARY_DIRS="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64;/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64"
\
-D
SCALAPACK_LIBRARY_NAMES="mkl_scalapack_lp64;mkl_blacs_intelmpi_lp64;mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5;pthread;m;dl"
\
-D
TPL_SCALAPACK_INCLUDE_DIRS:PATH="/apps/rhel6/intel/compilers_and_libraries_2016.1.150/linux/mkl/include/"
\
$EXTRA-ARGS \
$TRILINOS_HOME

Thanks and Regards,
Harshad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20171214/73be0e6a/attachment.html>


More information about the Trilinos-Users mailing list