Changeset 15678


Ignore:
Timestamp:
08/01/13 16:47:22 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added checks on petsc mkl lapack mumps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/issm_options.m4

    r15677 r15678  
    854854        AC_ARG_WITH([slepc-dir],
    855855          AS_HELP_STRING([--with-slepc-dir=DIR],[slepc root directory]),
    856           [SLEPC_ROOT=$withval],[SLEPC_ROOT=""])
     856          [SLEPC_ROOT=$withval],[SLEPC_ROOT="no"])
    857857                         
    858         AC_MSG_CHECKING(for slepc headers and libraries in $SLEPC_ROOT)
    859         if test -d "$SLEPC_ROOT"; then
     858        dnl Check whether slepc is enabled
     859        AC_MSG_CHECKING([for slepc])
     860        if test "x$SLEPC_ROOT" = "xno" ; then
     861                HAVE_SLEPC=no
     862        else
    860863                HAVE_SLEPC=yes
     864                if ! test -d "$SLEPC_ROOT"; then
     865                        AC_MSG_ERROR([slepc directory provided ($SLEPC_ROOT) does not exist]);
     866                fi
     867        fi
     868        AC_MSG_RESULT($HAVE_SLEPC)
     869       
     870        dnl slepc headers and libraries
     871        if test "x$HAVE_SLEPC" == "xyes"; then
    861872                SLEPCINCL=-I"$SLEPC_ROOT/include"
    862873                SLEPCLIB=-L"$SLEPC_ROOT/lib/ -lslepc"
     
    864875                AC_SUBST([SLEPCINCL])
    865876                AC_SUBST([SLEPCLIB])
    866         else
    867                 HAVE_SLEPC=no
    868         fi
    869         AC_MSG_RESULT($HAVE_SLEPC)
     877        fi
    870878        dnl }}}
    871879        dnl shapelib{{{
    872880        AC_ARG_WITH([shapelib-dir],
    873881          AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]),
    874           [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT=""])
     882          [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT="no"])
    875883                         
    876         AC_MSG_CHECKING(for shapelib headers and libraries in $SHAPELIB_ROOT)
    877         if test -d "$SHAPELIB_ROOT"; then
    878 
    879                 dnl defaults
     884        dnl Check whether shapelib is enabled
     885        AC_MSG_CHECKING([for shapelib])
     886        if test "x$SHAPELIB_ROOT" = "xno" ; then
     887                HAVE_SHAPELIB=no
     888        else
    880889                HAVE_SHAPELIB=yes
     890                if ! test -d "$SHAPELIB_ROOT"; then
     891                        AC_MSG_ERROR([shapelib directory provided ($SHAPELIB_ROOT) does not exist]);
     892                fi
     893        fi
     894        AC_MSG_RESULT($HAVE_SHAPELIB)
     895       
     896        dnl shapelib headers and libraries
     897        if test "x$HAVE_SHAPELIB" == "xyes"; then
    881898                SHAPELIBINCL=-I"$SHAPELIB_ROOT/include"
    882899                SHAPELIBLIB=-L"$SHAPELIB_ROOT/lib/ -lshape"
    883 
    884900                AC_DEFINE([_HAVE_SHAPELIB_],[1],[with Shapelib in ISSM src])
    885901                AC_SUBST([SHAPELIBINCL])
    886902                AC_SUBST([SHAPELIBLIB])
    887         else
    888                 HAVE_SHAPELIB=no
    889         fi
    890         AC_MSG_RESULT($HAVE_SHAPELIB)
     903        fi
    891904        dnl }}}
    892905        dnl scalapack{{{
    893906        AC_ARG_WITH([scalapack-dir],
    894907          AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]),
    895           [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT=""])
     908          [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT="no"])
    896909                         
    897         AC_MSG_CHECKING(for scalapack headers and libraries in $SCALAPACK_ROOT)
    898         if test -d "$SCALAPACK_ROOT"; then
    899 
    900                 dnl defaults
     910        dnl Check whether scalapack is enabled
     911        AC_MSG_CHECKING([for scalapack])
     912        if test "x$SCALAPACK_ROOT" = "xno" ; then
     913                HAVE_SCALAPACK=no
     914        else
    901915                HAVE_SCALAPACK=yes
     916                if ! test -d "$SCALAPACK_ROOT"; then
     917                        AC_MSG_ERROR([scalapack directory provided ($SCALAPACK_ROOT) does not exist]);
     918                fi
     919        fi
     920        AC_MSG_RESULT($HAVE_SCALAPACK)
     921       
     922        dnl scalapack headers and libraries
     923        if test "x$HAVE_SCALAPACK" == "xyes"; then
    902924                if test x$VENDOR = xintel-discover; then
    903925                 SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lmkl_scalapack_lp64"
     
    905927                 SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
    906928                fi
    907 
    908929                AC_DEFINE([_HAVE_SCALAPACK_],[1],[with Scalapack in ISSM src])
    909930                AC_SUBST([SCALAPACKLIB])
    910         else
    911                 HAVE_SCALAPACK=no
    912         fi
    913         AC_MSG_RESULT($HAVE_SCALAPACK)
     931        fi
    914932        dnl }}}
    915933        dnl blas-lapack{{{
    916934        AC_ARG_WITH([blas-lapack-dir],
    917935          AS_HELP_STRING([--with-blas-lapack-dir=DIR],[blas-lapack root directory]),
    918           [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT=""])
     936          [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT="no"])
    919937                         
    920         AC_MSG_CHECKING(for blas and lapack headers and libraries in $BLASLAPACK_ROOT)
    921         if test -d "$BLASLAPACK_ROOT"; then
    922 
    923                 dnl defaults
     938        dnl Check whether blas-lapack is enabled
     939        AC_MSG_CHECKING([for blas-lapack])
     940        if test "x$BLASLAPACK_ROOT" = "xno" ; then
     941                HAVE_BLASLAPACK=no
     942        else
    924943                HAVE_BLASLAPACK=yes
     944                if ! test -d "$BLASLAPACK_ROOT"; then
     945                        AC_MSG_ERROR([blas-lapack directory provided ($BLASLAPACK_ROOT) does not exist]);
     946                fi
     947        fi
     948        AC_MSG_RESULT($HAVE_BLASLAPACK)
     949       
     950        dnl blas-lapack headers and libraries
     951        if test "x$HAVE_BLASLAPACK" == "xyes"; then
    925952                BLASLAPACKINCL=""
    926        
    927953                if test x$VENDOR = xintel-discover; then
    928                  BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lmkl_lapack -lmkl -lguide -lpthread"
     954                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lmkl_lapack -lmkl -lguide -lpthread"
    929955                else
    930                 dnl: branch on whether we are running on windows or linux.
    931                 case "${host_os}" in
    932                         *cygwin*)
    933                         BLASLAPACKLIB="-L`cygpath -m $BLASLAPACK_ROOT` -Wl,libf2cblas.lib  -Wl,libf2clapack.lib"
    934                         ;;
    935                         *linux*)
    936                         BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
    937                         ;;
    938                         *darwin*)
    939                         BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
    940                         ;;
    941                 esac
    942                 fi
    943 
     956                        dnl: branch on whether we are running on windows or linux.
     957                        case "${host_os}" in
     958                                *cygwin*)
     959                                BLASLAPACKLIB="-L`cygpath -m $BLASLAPACK_ROOT` -Wl,libf2cblas.lib  -Wl,libf2clapack.lib"
     960                                ;;
     961                                *linux*)
     962                                BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
     963                                ;;
     964                                *darwin*)
     965                                BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
     966                                ;;
     967                        esac
     968                fi
    944969                AC_DEFINE([_HAVE_BLASLAPACK_],[1],[with blas lapack in ISSM src])
    945970                AC_SUBST([BLASLAPACKLIB])
    946971                AC_SUBST([BLASLAPACKINCL])
    947         else
    948                 HAVE_BLASLAPACK=no
    949         fi
    950         AC_MSG_RESULT($HAVE_BLASLAPACK)
     972        fi
    951973        dnl }}}
    952974        dnl mkl{{{
    953975        AC_ARG_WITH([mkl-dir],
    954976          AS_HELP_STRING([--with-mkl-dir=DIR],[mkl root directory]),
    955           [MKL_ROOT=$withval],[MKL_ROOT=""])
     977          [MKL_ROOT=$withval],[MKL_ROOT="no"])
    956978                         
    957         AC_MSG_CHECKING(for mkl headers and libraries in $MKL_ROOT)
    958         if test -d "$MKL_ROOT"; then
    959 
    960                 dnl defaults
     979        dnl Check whether mkl is enabled
     980        AC_MSG_CHECKING([for mkl])
     981        if test "x$MKL_ROOT" = "xno" ; then
     982                HAVE_MKL=no
     983        else
    961984                HAVE_MKL=yes
     985                if ! test -d "$MKL_ROOT"; then
     986                        AC_MSG_ERROR([mkl directory provided ($MKL_ROOT) does not exist]);
     987                fi
     988        fi
     989        AC_MSG_RESULT($HAVE_MKL)
     990       
     991        dnl mkl headers and libraries
     992        if test "x$HAVE_MKL" == "xyes"; then
    962993                MKLINCL=""
    963994                if test x$VENDOR = xintel-pleiades; then
    964                  MKLLIB=-L"$MKL_ROOT -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
     995                        MKLLIB=-L"$MKL_ROOT -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
    965996                else
    966                  MKLLIB=-L"$MKL_ROOT -lmkl -lmkl_lapack -lmkl_scalapack_ilp64 -lmkl_blacs_sgimpt_ilp64 -lguide -lpthread"
     997                        MKLLIB=-L"$MKL_ROOT -lmkl -lmkl_lapack -lmkl_scalapack_ilp64 -lmkl_blacs_sgimpt_ilp64 -lguide -lpthread"
    967998                fi
    968999                AC_DEFINE([_HAVE_MKL_],[1],[with mkl in ISSM src])
    9691000                AC_SUBST([MKLLIB])
    9701001                AC_SUBST([MKLINCL])
    971         else
    972                 HAVE_MKL=no
    973         fi
    974         AC_MSG_RESULT($HAVE_MKL)
     1002        fi
    9751003        dnl }}}
    9761004        dnl plapack{{{
     
    9891017                if test -n "$PLAPACK_INCLUDE"; then
    9901018               
    991                         dnl defaults
    9921019                        HAVE_PLAPACK=yes
    9931020                        PLAPACKINCL="$PLAPACK_INCLUDE"
    9941021                        PLAPACKLIB="$PLAPACK_LIB"
    995 
    9961022                        AC_DEFINE([_HAVE_PLAPACK_],[1],[with Plapack in ISSM src])
    9971023                        AC_SUBST([PLAPACKINCL])
     
    10081034        AC_ARG_WITH([mumps-dir],
    10091035          AS_HELP_STRING([--with-mumps-dir=DIR],[mumps root directory]),
    1010           [MUMPS_ROOT=$withval],[MUMPS_ROOT=""])
     1036          [MUMPS_ROOT=$withval],[MUMPS_ROOT="no"])
    10111037                         
    1012         AC_MSG_CHECKING(for mumps headers and libraries in $MUMPS_ROOT)
    1013         if test -d "$MUMPS_ROOT"; then
    1014 
    1015                 dnl defaults
     1038        dnl Check whether mumps is enabled
     1039        AC_MSG_CHECKING([for mumps])
     1040        if test "x$MUMPS_ROOT" = "xno" ; then
     1041                HAVE_MUMPS=no
     1042        else
    10161043                HAVE_MUMPS=yes
     1044                if ! test -d "$MUMPS_ROOT"; then
     1045                        AC_MSG_ERROR([mumps directory provided ($MUMPS_ROOT) does not exist]);
     1046                fi
     1047        fi
     1048        AC_MSG_RESULT($HAVE_MUMPS)
     1049       
     1050        dnl mumps headers and libraries
     1051        if test "x$HAVE_MUMPS" == "xyes"; then
    10171052                MUMPSINCL=-I"$MUMPS_ROOT/include"
    10181053                if test "$PETSC_MAJOR" = "2" ; then
    1019                 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lpord "
     1054                        MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lpord "
    10201055                else
    1021                 dnl MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis -lzmumps"
    1022                 MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis"
    1023                 fi
    1024 
     1056                        dnl MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis -lzmumps"
     1057                        MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis"
     1058                fi
    10251059                AC_DEFINE([_HAVE_MUMPS_],[1],[with Mumps in ISSM src])
    10261060                AC_SUBST([MUMPSINCL])
    10271061                AC_SUBST([MUMPSLIB])
    1028         else
    1029                 HAVE_MUMPS=no
    10301062        fi
    10311063        AM_CONDITIONAL([MUMPS], [test x$HAVE_MUMPS = xyes])
    1032         AC_MSG_RESULT($HAVE_MUMPS)
    10331064        dnl }}}
    10341065        dnl blacs{{{
Note: See TracChangeset for help on using the changeset viewer.