Changeset 23342


Ignore:
Timestamp:
09/26/18 11:13:04 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added a check on numthreads, make sure it is an int

File:
1 edited

Legend:

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

    r23239 r23342  
    592592        if test "x$HAVE_PYTHON" = "xyes"; then
    593593                AC_MSG_CHECKING([for python version])
    594                 dnl Query Python for its version number.  Getting [:3] seems to be the
     594                dnl Query Python for its version number. Getting [:3] seems to be the
    595595                dnl best way to do this; it's what "site.py" does in the standard library.
    596596                PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]")
     
    644644          AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]),
    645645          [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT="no"])
     646
     647        dnl you can find numpy by typing
     648        dnl >>> import numpy
     649        dnl >>> numpy.__file__
     650        dnl '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc'
    646651
    647652        dnl Check whether numpy is enabled
     
    21662171                AC_DEFINE([_MULTITHREADING_],[1],[with numthreads enabled])
    21672172        fi
     2173        dnl check that it is an integer
     2174        if [[ "$NUMTHREADS_VALUE" -eq   "$NUMTHREADS_VALUE" 2> /dev/null ]] ; then
     2175         dnl cool we have an integer
     2176         :
     2177        else
     2178         AC_MSG_ERROR([Number of threads provided ($NUMTHREADS_VALUE) is not an integer]);
     2179        fi
    21682180        AC_DEFINE_UNQUOTED([_NUMTHREADS_],[$NUMTHREADS_VALUE],[number of threads])
    21692181        AC_SUBST([MULTITHREADINGLIB])
Note: See TracChangeset for help on using the changeset viewer.