Skip to content

Commit

Permalink
41 matlab threads (toastpp#57)
Browse files Browse the repository at this point in the history
* configure: thread support is now default (must be disabled with --disable-threads). toastpp#41: matlab build now recognises thread flag

* adjusted travis.yml to new configure options
  • Loading branch information
mschweiger authored Feb 16, 2017
1 parent e2779ab commit 1de6dc9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ matrix:
- csh
- python-numpy
env:
- CONFIGOPTS=
- CONFIGOPTS="--disable-threads"
- os: linux
addons:
apt:
packages:
- gfortran
- csh
- python-numpy
env: CONFIGOPTS="--enable-threads --enable-fdot"
env: CONFIGOPTS="--enable-fdot"
- os: osx
osx_image: xcode7.3

Expand Down
3 changes: 3 additions & 0 deletions Makefile.incl.in
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,8 @@ MEXFLAGS =
ifeq ($(BUILD_FDOT),1)
MEXFLAGS += -DMESA_SUPPORT
endif
ifeq ($(ENABLE_PTHREAD),yes)
MEXFLAGS += -DTOAST_THREAD
endif
MEXINC = $(INCLUDE)
MEXLIB = $(STOASTLIB) -llbfgs
10 changes: 5 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ Optional Features:
--enable-debug build debug version
--enable-prof build profiling version
--enable-zoltan build with Zoltan load-balancing support
--enable-threads build pthreads parallel version
--disable-threads do not build multithreaded version
--enable-mpi build MPI distributed version
--enable-cuda enable CUDA GPU support
--disable-shared do not build shared TOAST libraries
Expand Down Expand Up @@ -7124,8 +7124,8 @@ if test -f /usr/lib/NextStep/software_version; then
else
system=`uname -s`-`uname -r`
if test "$?" -ne 0 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown (can't find uname command)" >&5
$as_echo "unknown (can't find uname command)" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown (cannot find uname command)" >&5
$as_echo "unknown (cannot find uname command)" >&6; }
system=unknown
else
# Special check for weird MP-RAS system (uname returns weird
Expand Down Expand Up @@ -7420,12 +7420,12 @@ fi

# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then :
enableval=$enable_threads; isok=$enableval
enableval=$enable_threads; isok=yes
else
isok=no
fi

if test "$isok" = "yes" ; then
if test "$isok" = "no" ; then
CXXFLAGS="${CXXFLAGS} -DTOAST_THREAD"
MATLAB_TOASTFLAGS="-DTOAST_THREAD"
NEED_PTHREAD=yes
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ if test -f /usr/lib/NextStep/software_version; then
else
system=`uname -s`-`uname -r`
if test "$?" -ne 0 ; then
AC_MSG_RESULT([unknown (can't find uname command)])
AC_MSG_RESULT([unknown (cannot find uname command)])
system=unknown
else
# Special check for weird MP-RAS system (uname returns weird
Expand Down Expand Up @@ -522,9 +522,9 @@ AC_SUBST(ZOLTANLIBDIR)
# Check whether user wants to build a threaded version

AC_ARG_ENABLE(threads,
[ --enable-threads build pthreads parallel version],
[isok=$enableval], [isok=no])
if test "$isok" = "yes" ; then
[ --disable-threads do not build multithreaded version],
[isok=yes], [isok=no])
if test "$isok" = "no" ; then
CXXFLAGS="${CXXFLAGS} -DTOAST_THREAD"
MATLAB_TOASTFLAGS="-DTOAST_THREAD"
NEED_PTHREAD=yes
Expand Down

0 comments on commit 1de6dc9

Please sign in to comment.