Changeset 23350


Ignore:
Timestamp:
09/28/18 10:17:19 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: integrating MeDiPack

Location:
issm/trunk-jpl
Files:
4 edited

Legend:

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

    r23342 r23350  
    989989        AM_CONDITIONAL([ADJOINTMPI], [test x$HAVE_ADJOINTMPI = xyes])
    990990        dnl }}}
     991        dnl medipack (CoDiPack, ADOLC dev){{{
     992        AC_ARG_WITH([medipack-dir],
     993          AS_HELP_STRING([--with-medipack-dir=DIR], [MeDiPack root directory.]),
     994          [MEDIPACK_ROOT=$withval],[MEDIPACK_ROOT="no"])
     995
     996        dnl Check whether medipack is enabled
     997        AC_MSG_CHECKING([for medipack])
     998        if test "x$MEDIPACK_ROOT" = "xno" ; then
     999                HAVE_MEDIPACK=no
     1000        else
     1001                HAVE_MEDIPACK=yes
     1002                if ! test -d "$MEDIPACK_ROOT"; then
     1003                        AC_MSG_ERROR([medipack directory provided ($MEDIPACK_ROOT) does not exist]);
     1004                fi
     1005        fi
     1006        AC_MSG_RESULT($HAVE_MEDIPACK)
     1007
     1008        dnl medipack headers and libraries
     1009        if test "x$HAVE_MEDIPACK" == "xyes"; then
     1010                if test "x$CODIPACK_ROOT" == "xno"; then
     1011                        AC_MSG_ERROR([cannot run MeDiPack without CoDiPack]);
     1012                fi
     1013                MEDIPACKINCL="-I$MEDIPACK_ROOT/include -I$MEDIPACK_ROOT/src"
     1014                dnl Also set _HAVE_AMPI_, because the interface is (almost) the
     1015                dnl same as for adjoinable mpi...
     1016                AC_DEFINE([_HAVE_AMPI_],[1],[with adjoint mpi in ISSM src])
     1017                AC_DEFINE([_HAVE_MEDIPACK_],[1],[with MeDiPack in ISSM src])
     1018                AC_SUBST([MEDIPACKINCL])
     1019        fi
     1020        AM_CONDITIONAL([MEDIPACK], [test x$HAVE_MEDIPACK = xyes])
     1021
     1022        dnl }}}
    9911023        dnl rose{{{
    9921024        AC_ARG_WITH([rose-dir],
     
    22352267                        AC_MSG_ERROR([cannot compile ISSM with both PETSc and adolc]);
    22362268                fi
     2269                if test "$HAVE_ADOLC" = "yes"  && test "$HAVE_CODIPACK" = "yes" ; then
     2270                        AC_MSG_ERROR([cannot compile ISSM with both ADOLC and CoDiPack]);
     2271                fi
    22372272                dnl check that if we run meteoio, we have snowpack also
    22382273                if test "$HAVE_METEOIO" = "yes"  && test "$HAVE_SNOWPACK" = "no" ; then
  • issm/trunk-jpl/src/c/Makefile.am

    r23317 r23350  
    324324                                        ./classes/Inputs/TetraInput.cpp
    325325#}}}
    326 # ADJOINTMPI sources {{{
     326#ADJOINTMPI/MeDiPack sources {{{
    327327if ADJOINTMPI
     328issm_sources += ./toolkits/codipack/ampi_interface.cpp
     329endif
     330if MEDIPACK
    328331issm_sources += ./toolkits/codipack/ampi_interface.cpp
    329332endif
  • issm/trunk-jpl/src/c/cores/controlm1qn3_core.cpp

    r23311 r23350  
    124124                                &reverse,&indic,izs,rzs,(void*)&mystruct);
    125125
     126        /*Print exit flag*/
    126127        switch(int(omode)){
    127128                case 0:  _printf0_("   Stop requested (indic = 0)\n"); break;
  • issm/trunk-jpl/src/c/toolkits/codipack/ampi_interface.cpp

    r23241 r23350  
     1#ifdef HAVE_CONFIG_H
     2#include <config.h>
     3#else
     4#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     5#endif
     6
     7#if defined(_HAVE_ADJOINTMPI_)
    18#include "externals/ampi_interface_realreverse.cpp"
     9#elif defined(_HAVE_MEDIPACK_)
     10#include "medi/medi.cpp"
     11#else
     12#error "Cannot compile without MeDiPack and AdjointMpi"
     13#endif
     14
Note: See TracChangeset for help on using the changeset viewer.