Ahmad,

The first thing is that you should not try to set the flags yourself. You 
should let CMake take care of that. You should just set the paths (BLAS_DIR 
and LAPACK_DIR) and let CMake do the rest. The second thing is that I am 
not sure sure that you are using the right MKL libraries. You can go here 
<https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor> to 
check what you need.

Best,

Bruno

On Tuesday, July 2, 2019 at 7:18:40 PM UTC-4, Ahmad Shahba wrote:
>
> I am trying to compile deal.ii (version 9.1.1) on my Ubuntu laptop with 
> gcc compilers. I have tried two methods to configure deal.ii with 
> LAPACK/BLAS and both failed in a similar manner.
>
> *method 1: Using LAPACK/BLAS in my PETSc (version 3.9) installation*
> Motivated by the instructions given here 
> <https://dealii.org/developer/users/cmake.html#advanced>, I use the 
> following CMake command 
>
>
> export PREFIX_PETSC_ARCH=$PETSC_DIR/$PETSC_ARCH
>
> cmake \
>    -DDEAL_II_COMPONENT_DOCUMENTATION=OFF \
>    -DGSL_DIR=$HOME/workspace/gsl \
>    -DHDF5_DIR=$PREFIX_PETSC_ARCH \
>    -DMETIS_DIR=$PREFIX_PETSC_ARCH \
>    -DP4EST_DIR=$HOME/workspace/p4est-2.2/FAST \
>    -DDEAL_II_WITH_P4EST=ON \
>    -DPETSC_DIR=$PETSC_DIR \
>    -DPETSC_ARCH=$PETSC_ARCH \
>    -DSLEPC_DIR=$SLEPC_DIR \
>    -DZLIB_DIR=$PREFIX_PETSC_ARCH \
>    -DDEAL_II_WITH_LAPACK=ON \
>    -DLAPACK_FOUND=true \
>   
>  
> -DLAPACK_LIBRARIES="$PREFIX_PETSC_ARCH/lib/libflapack.a;$PREFIX_PETSC_ARCH/lib/libfblas.a"
>  
> \
>    -DLAPACK_LINKER_FLAGS="-lgfortran -lm" \
>    -DDEAL_II_WITH_MPI=ON \
>    -DCMAKE_INSTALL_PREFIX=path/to/some/installation/directory \
>    ../
>
> The configuration fails with prints an error message like
>
> BLAS/LAPACK symbol check failed! This usually means that your BLAS/LAPACK
>   installation is incomplete or the link line is broken.
>
> I am attaching some CMake log and error files.
>
> *method 2:Linking to the LAPACK/BLAS whick comes with MKL*
> For another project, I had use gfortran to compile LAPACK/BLAS which comes 
> with Intel MKL. Linking to these libraries also failed in the same manner. 
> Here is the CMake command
>
> export PREFIX_PETSC_ARCH=$PETSC_DIR/$PETSC_ARCH
>
> cmake \
>    -DDEAL_II_COMPONENT_DOCUMENTATION=OFF \
>    -DGSL_DIR=$HOME/workspace/gsl \
>    -DHDF5_DIR=$PREFIX_PETSC_ARCH \
>    -DMETIS_DIR=$PREFIX_PETSC_ARCH \
>    -DP4EST_DIR=$HOME/workspace/p4est-2.2/FAST \
>    -DDEAL_II_WITH_P4EST=ON \
>    -DPETSC_DIR=$PETSC_DIR \
>    -DPETSC_ARCH=$PETSC_ARCH \
>    -DSLEPC_DIR=$SLEPC_DIR \
>    -DZLIB_DIR=$PREFIX_PETSC_ARCH \
>    -DDEAL_II_WITH_LAPACK=ON \
>    -DLAPACK_FOUND=true \
>   
>  
> -DLAPACK_LIBRARIES="${myInstallations}/lib/intel64/libmkl_blas95_lp64.a;${myInstallations}/lib/intel64/libmkl_lapack95_lp64.a;${MKLROOT}/lib/intel64/libmkl_gf_lp64.a;${MKLROOT}/lib/intel64/libmkl_sequential.a;${MKLROOT}/lib/intel64/libmkl_core.a"
>  
> \
>    -DLAPACK_LINKER_FLAGS="-lgfortran -lpthread -lm -ldl" \
>    -DDEAL_II_WITH_BLAS=ON \
>    -DBLAS_FOUND=true \
>   
>  
> -DBLAS_LIBRARIES="${myInstallations}/lib/intel64/libmkl_blas95_lp64.a;${myInstallations}/lib/intel64/libmkl_lapack95_lp64.a;${MKLROOT}/lib/intel64/libmkl_gf_lp64.a;${MKLROOT}/lib/intel64/libmkl_sequential.a;${MKLROOT}/lib/intel64/libmkl_core.a"
>  
> \
>    -DBLAS_LINKER_FLAGS="-lgfortran -lpthread -lm -ldl" \
>    -DSCALAPACK_DIR==$PREFIX_PETSC_ARCH \
>    -DDEAL_II_WITH_MPI=ON \
>    -DCMAKE_INSTALL_PREFIX=path/to/some/installation/directory \
>    ../
>
>
> Any thoughts how I can get this done? 
> Thanks in advance,
> Ahmad
>  
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/de32ab59-ef58-4fe9-9a66-3e71ce426493%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to