Changeset 15843


Ignore:
Timestamp:
08/19/13 17:55:00 (12 years ago)
Author:
Eric.Larour
Message:

CHG: fixed a bunch of asserts that were not dealing with booleans. Also made sure kriging and adolc
cannot be compiled together.

Location:
issm/trunk-jpl
Files:
8 edited

Legend:

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

    r15771 r15843  
    610610        if test "x$HAVE_AMPI" == "xyes"; then
    611611                AMPIINCL="-I$AMPI_ROOT/include"
     612                echo "adolc_root: |$ADOLC_ROOT|"
     613                if test "x$ADOLC_ROOT" == "xno"; then
     614                        AC_MSG_ERROR([cannot run adjoinable mpi without adolc]);
     615                fi
    612616                AMPILIB="-dy -L$AMPI_ROOT/lib -lampiCommon -L$ADOLC_ROOT/lib -ladolc -L$AMPI_ROOT/lib -lampiCommon -lampiBookkeeping -lampiTape"
    613617                AC_DEFINE([_HAVE_AMPI_],[1],[with adjoinable mpi in ISSM src])
     
    18651869                        AC_MSG_ERROR([need mpi if using the metis partitioner!]);
    18661870                fi
     1871               
     1872                dnl check that if we run adolc, we don't compile krigging.exe
     1873                  if test "$HAVE_ADOLC" = "yes"  && test "$HAVE_KRIGING" = "yes" ; then
     1874                        AC_MSG_ERROR([cannot compile kriging.exe under adolc conditions!]);
     1875                fi
     1876
    18671877
    18681878                  AC_MSG_RESULT(done)
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15814 r15843  
    97469746        /*Viscosity*/
    97479747        viscosity = 1./(2.*A*(tau_par*tau_par + tau_perp*tau_perp));
    9748         _assert_(!isnan(viscosity));
     9748        //_assert_(!isnan(viscosity)); this is not defined for adoubles
    97499749        _assert_(viscosity > 0.);
    97509750
  • issm/trunk-jpl/src/c/kml/KMLFileReadUtils.cpp

    r15104 r15843  
    556556        if (!*pdval)
    557557                if (maxlen)
    558                         *pdval=xNew<IssmDouble>(maxlen            );
    559                 else
    560                         *pdval=xNew<IssmDouble>((strlen(kstr)+1)/2);
     558                        *pdval=xNew<IssmPDouble>(maxlen            );
     559                else
     560                        *pdval=xNew<IssmPDouble>((strlen(kstr)+1)/2);
    561561
    562562/*  loop through string to get all values  */
     
    622622        if (!*pdval)
    623623                if (maxlen)
    624                         *pdval=xNew<IssmDouble>(maxlen*n          );
    625                 else
    626                         *pdval=xNew<IssmDouble>((strlen(kstr)+1)/2);
     624                        *pdval=xNew<IssmPDouble>(maxlen*n          );
     625                else
     626                        *pdval=xNew<IssmPDouble>((strlen(kstr)+1)/2);
    627627
    628628/*  loop through string to get all values  */
  • issm/trunk-jpl/src/c/kml/KML_LineString.cpp

    r15104 r15843  
    181181/*  extract latitude and longitude into vectors  */
    182182
    183         lat=xNew<IssmDouble>(ncoord);
    184         lon=xNew<IssmDouble>(ncoord);
     183        lat=xNew<IssmPDouble>(ncoord);
     184        lon=xNew<IssmPDouble>(ncoord);
    185185        for (i=0; i<ncoord; i++) {
    186186                lon[i]=coords[3*i+0];
     
    190190/*  convert latitude and longitude to x and y  */
    191191
    192         x  =xNew<IssmDouble>(ncoord);
    193         y  =xNew<IssmDouble>(ncoord);
     192        x  =xNew<IssmPDouble>(ncoord);
     193        y  =xNew<IssmPDouble>(ncoord);
    194194        if (sgn) {
    195195                Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
     
    222222        fprintf(fid,"\n");
    223223
    224         xDelete<IssmDouble>(y);
    225         xDelete<IssmDouble>(x);
    226         xDelete<IssmDouble>(lon);
    227         xDelete<IssmDouble>(lat);
    228 
    229         return;
    230 }
    231 /*}}}*/
     224        xDelete<IssmPDouble>(y);
     225        xDelete<IssmPDouble>(x);
     226        xDelete<IssmPDouble>(lon);
     227        xDelete<IssmPDouble>(lat);
     228
     229        return;
     230}
     231/*}}}*/
  • issm/trunk-jpl/src/c/kml/KML_LinearRing.cpp

    r15104 r15843  
    169169/*  extract latitude and longitude into vectors  */
    170170
    171         lat=xNew<IssmDouble>(ncoord);
    172         lon=xNew<IssmDouble>(ncoord);
     171        lat=xNew<IssmPDouble>(ncoord);
     172        lon=xNew<IssmPDouble>(ncoord);
    173173        for (i=0; i<ncoord; i++) {
    174174                lon[i]=coords[3*i+0];
     
    178178/*  convert latitude and longitude to x and y  */
    179179
    180         x  =xNew<IssmDouble>(ncoord);
    181         y  =xNew<IssmDouble>(ncoord);
     180        x  =xNew<IssmPDouble>(ncoord);
     181        y  =xNew<IssmPDouble>(ncoord);
    182182        if (sgn) {
    183183                Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Stressbalance/CreateLoadsStressbalance.cpp

    r15771 r15843  
    11/*! \file CreateLoadsStressbalance.c:
    22 */
    3 
     3#include <string.h>
    44#include "../../../toolkits/toolkits.h"
    55#include "../../../classes/classes.h"
     
    2929        IssmDouble *vertices_type  = NULL;
    3030        IssmDouble *penalties      = NULL;
     31        int         assert_int;
    3132
    3233        /*Fetch parameters: */
     
    5455
    5556                        /*In debugging mode, check that the second node is in the same cpu*/
    56                         _assert_(iomodel->my_vertices[(int)penalties[2*i+1]-1]);
     57                        assert_int=iomodel->my_vertices[reCast<int,IssmDouble>(penalties[2*i+1]-1)]; _assert_(assert_int);
    5758
    5859                        /*Get node ids*/
  • issm/trunk-jpl/src/c/shared/Elements/Arrhenius.cpp

    r15741 r15843  
    3333
    3434        /*convert temperature to absolute temperature*/
    35         _assert_(depth);
     35        _assert_(depth>0);
    3636        Tstar=temperature-beta*depth;
    37         _assert_(Tstar);
     37        _assert_(Tstar>0);
    3838
    3939        /*Get A*/
  • issm/trunk-jpl/src/c/shared/Elements/LliboutryDuval.cpp

    r15808 r15843  
    4747  IssmDouble A,B,Tstar,Tpmp,H_sp,waterfraction;
    4848       
    49   _assert_(pressure);
    50   _assert_(enthalpy);
     49  _assert_(pressure>0);
     50  _assert_(enthalpy>0);
    5151  Tpmp=273.15-beta*pressure;
    5252  H_sp=heatcapacity*(Tpmp - Tref);
     
    7070
    7171  /*Convert to B*/
    72   _assert_(n);
     72  _assert_(n>0);
    7373  B=pow(A,-1./n);
    7474
     
    8989  IssmDouble latentheat=3.34*pow(10,5.); // from Aschwanden 2012
    9090  IssmDouble Tstar, enthalpy, pressure, B;
    91   _assert_(temperature);
    92   _assert_(waterfraction);
    93   _assert_(depth);
     91  _assert_(temperature>0);
     92  _assert_(waterfraction>0);
     93  _assert_(depth>0);
    9494
    9595  /*get pressure*/
Note: See TracChangeset for help on using the changeset viewer.