Changeset 12007


Ignore:
Timestamp:
04/16/12 16:47:05 (13 years ago)
Author:
Eric.Larour
Message:

New architecture where serial and parallel are replaced by module or not module

File:
1 edited

Legend:

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

    r11994 r12007  
    1313        fi
    1414        dnl }}}
    15         dnl Serial build {{{
    16         AC_ARG_WITH([serial],
    17                 AS_HELP_STRING([--with-serial = value],[serial compilation. ]),
    18                 [SERIAL_VALUE=$withval],[SERIAL_VALUE="yes"])
    19         AC_MSG_CHECKING(for serial compilation)
    20         AM_CONDITIONAL([NOSERIAL], [test $SERIAL_VALUE = no])
    21         AM_CONDITIONAL([SERIAL], [test $SERIAL_VALUE = yes])
    22         AC_MSG_RESULT($SERIAL_VALUE)
    23         dnl }}}
    24         dnl Parallel build {{{
    25         AC_ARG_WITH([parallel],
    26                 AS_HELP_STRING([--with-parallel = value], [parallel compilation. ]),
    27                 [PARALLEL_VALUE=$withval],[PARALLEL_VALUE="yes"])
    28         AC_MSG_CHECKING(for parallel compilation)
    29         AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no])
    30         AM_CONDITIONAL([PARALLEL], [test $PARALLEL_VALUE = yes])
    31         AC_MSG_RESULT($PARALLEL_VALUE)
    32         ISSMEXT=".exe"
     15        dnl Modules build {{{
     16        AC_ARG_WITH([modules],
     17                AS_HELP_STRING([--with-modules = value],[modules compilation. ]),
     18                [MODULES_VALUE=$withval],[MODULES_VALUE="yes"])
     19        AC_MSG_CHECKING(for modules compilation)
     20        AM_CONDITIONAL([NOMODULES], [test $MODULES_VALUE = no])
     21        AM_CONDITIONAL([MODULES], [test $MODULES_VALUE = yes])
     22        AC_MSG_RESULT($MODULES_VALUE)
     23        dnl }}}
     24        dnl Extensions{{{
    3325        AC_SUBST([ISSMEXT])
    34         dnl }}}
    35         dnl Serial or Parallel check {{{
    36         dnl Check that at least serial or parallel builds have been requested!
    37         if test "$SERIAL_VALUE" != "yes" ; then
    38                 if test "$PARALLEL_VALUE" != "yes"; then
    39                         AC_MSG_ERROR([cannot request --with-serial=no and --with-parallel=no at the same time!])
    40                 fi
    41         fi
    4226        dnl }}}
    4327
     
    689673        AC_MSG_RESULT($HAVE_TAO)
    690674        dnl }}}
    691         dnl mpiuni{{{
    692         dnl when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:
    693         if test "$PARALLEL_VALUE" = "no" ; then
    694                 HAVE_MPI=yes
    695                 MPIINCL=-I"$PETSC_ROOT/include/mpiuni"
    696 
    697                 case "${host_os}" in
    698                         *cygwin*)
    699                         dnl MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
    700                         ;;
    701                         *linux*)
    702                         MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
    703                         ;;
    704                         *darwin*)
    705                         MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
    706                         ;;
    707                 esac
    708                                                                  
    709                 AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
    710                 AC_SUBST([MPIINCL])
    711                 AC_SUBST([MPILIB])
    712         fi
    713         dnl }}}
    714675        dnl slepc{{{
    715676        AC_ARG_WITH([slepc-dir],
     
    12291190        AC_MSG_CHECKING(consistency between all libraries)
    12301191       
    1231         dnl check that if petsc is requested in parallel, mpi should be specified
     1192        dnl check that if petsc is requested , mpi should be specified
    12321193        if test "$HAVE_PETSC" = "yes" ; then
    12331194                if test "$HAVE_MPI" = "NO";  then
     
    12361197        fi
    12371198
    1238         dnl check that we have either python or matlab support if we only compile serially
    1239         if test "$PARALLEL_VALUE" = "no"  && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then
     1199        dnl check that we have either python or matlab support if we compile the modules
     1200        if test "$MODULES_VALUE" = "yes"  && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then
    12401201                AC_MSG_ERROR([need at least python or matlab support to compile only in serial mode!]);
    1241         fi
    1242 
    1243         dnl check that we don't have with-matlab and with-python at the same time
    1244         if test "$HAVE_PYTHON" = "yes" ; then
    1245                 if test "$HAVE_MATLAB" = "yes";  then
    1246                         AC_MSG_ERROR([cannot create matlab and python wrappers simultaneously! Please choose one or the other.]);
    1247                 fi
    12481202        fi
    12491203
Note: See TracChangeset for help on using the changeset viewer.