Skip to content

Commit e5ac4a0

Browse files
author
Dilawar Singh
committed
Merge commit '96580978fd046d82b2545fdac8b72ea52bd4956c'
2 parents bcbc1c1 + 9658097 commit e5ac4a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6925
-9611
lines changed

moose-core/.travis.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ env:
2020
- CTEST_MODEL=Nightly
2121
cache: apt
2222

23-
matrix:
24-
allow_failures:
23+
#matrix:
24+
# allow_failures:
25+
# - clang
2526

2627
before_script:
2728
- sudo apt-get install -qq libxml2-dev libbz2-dev
@@ -31,29 +32,31 @@ before_script:
3132
- sudo apt-get install -qq python3-numpy python3-matplotlib python3-dev
3233
- sudo apt-get install -qq libboost-all-dev
3334
- sudo apt-get install -qq libgsl0-dev
34-
35-
before_install:
36-
- sbmlurl="http://sourceforge.net/projects/sbml/files/libsbml/5.9.0/stable/Linux/64-bit/libSBML-5.9.0-Linux-x64.deb"
37-
- wget "$sbmlurl" -O libsbml.deb && sudo dpkg -i libsbml.deb
38-
- sudo apt-get install -f
35+
- sudo apt-get install -qq python-pip python3-pip
36+
- sudo apt-get install -qq libgraphviz-dev
37+
- sudo pip install python-libsbml
38+
- sudo pip3 install python-libsbml
39+
- sudo pip3 install pygraphviz
3940

4041
install:
4142
- echo "nothing to do here"
4243

4344
script:
44-
- sudo ldconfig /usr/lib64
4545
- # First test is normal make scripts. (outdated).
4646
- make
47-
- # Now test the cmake with gsl
47+
- ## CMAKE based flow
4848
- mkdir -p _GSL_BUILD && cd _GSL_BUILD && cmake -DDEBUG=ON -DPYTHON_EXECUTABLE=/usr/bin/python ..
4949
- make && ctest --output-on-failure
50-
- cd .. # Build with python3.
51-
- mkdir -p _GSL_BUILD2 && cd _GSL_BUILD2 && cmake -DDEBUG=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
52-
- make && ctest --output-on-failure
5350
- cd .. # Now with boost.
5451
- mkdir -p _BOOST_BUILD && cd _BOOST_BUILD && cmake -DWITH_BOOST=ON -DDEBUG=ON -DPYTHON_EXECUTABLE=/usr/bin/python ..
5552
- make && ctest --output-on-failure
56-
- cd .. # Now with boost and python3.
53+
- cd ..
54+
- echo "Python3 support. Removed python2-networkx and install python3"
55+
- sudo apt-get remove -qq python-networkx
56+
- sudo apt-get install -qq python3-networkx
57+
- mkdir -p _GSL_BUILD2 && cd _GSL_BUILD2 && cmake -DDEBUG=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
58+
- make && ctest --output-on-failure
59+
- cd .. # Now with BOOST and python3
5760
- mkdir -p _BOOST_BUILD2 && cd _BOOST_BUILD2 && cmake -DWITH_BOOST=ON -DDEBUG=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
5861
- make && ctest --output-on-failure
5962
- cd ..

moose-core/CMakeLists.txt

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,11 @@ option(WITH_MPI "Enable Openmpi support" OFF)
8383
option(WITH_BOOST "Use boost library instead of GSL" OFF)
8484
option(WITH_GSL "Use gsl-library. Alternative is WITH_BOOST" ON)
8585

86-
# If SBML is available, it will automaticall enable the support. If ON, then
87-
# libSBML must be present.
88-
option(WITH_SBML "Enable SBML support. Automatically detected." OFF)
89-
9086
# If GSL_STATIC_HOME is set, we use it to search for static gsl libs.
9187
option(GSL_STATIC_HOME
9288
"Path prefix where static gsl library can be found e.g. /opt/sw/gsl116 "
9389
OFF
9490
)
95-
option(SBML_STATIC_HOME
96-
"Path prefix where static sbml library can be found e.g. /opt/sbml/"
97-
OFF
98-
)
9991
option(HDF5_STATIC_HOME
10092
"Path prefix where static hdf5 library can be found e.g /opt/sw/hdf5 "
10193
OFF
@@ -165,57 +157,6 @@ if(WITH_BOOST)
165157
set(WITH_GSL OFF)
166158
endif(WITH_BOOST)
167159

168-
# If this variable is used while packaging; we build this project using another
169-
# cmake script and pass the location of SBML static library using this variable.
170-
# Otherwise, this is useless. FIXME: This is not a clean solution.
171-
if(SBML_STATIC_HOME)
172-
include_directories(${SBML_STATIC_HOME}/include)
173-
find_library(LIBSBML_LIBRARIES
174-
NAMES libsbml-static.a libsbml.a
175-
PATHS "${SBML_STATIC_HOME}/lib" "${SBML_STATIC_HOME}/lib64"
176-
NO_DEFAULT_PATH
177-
)
178-
message(STATUS "- Using static version of LIBSBML_LIBRARIES: ${LIBSBML_LIBRARIES}")
179-
if(LIBSBML_LIBRARIES)
180-
message(STATUS "- Successfully located SBML static library: ${LIBSBML_LIBRARIES}")
181-
ELSE()
182-
message(FATAL_ERROR
183-
"Can't find static libsbml libraries at path ${SBML_STATIC_HOME}"
184-
)
185-
endif()
186-
set(LIBSBML_FOUND ON)
187-
else(SBML_STATIC_HOME)
188-
pkg_check_modules(LIBSBML libsbml)
189-
if(NOT LIBSBML_FOUND)
190-
message(STATUS "pkg-config could not find sbml. Fallback to default")
191-
find_package(LIBSBML)
192-
endif()
193-
endif(SBML_STATIC_HOME)
194-
195-
if(LIBSBML_FOUND)
196-
message(STATUS "LIBSBML found ${LIBSBML_LIBRARIES}")
197-
include_directories(${LIBSBML_INCLUDE_DIRS})
198-
pkg_check_modules(LibXML2 libxml-2.0)
199-
if (!LibXML2_FOUND)
200-
find_package(LibXML2 REQUIRED)
201-
endif()
202-
include_directories(${LibXML2_INCLUDE_DIRS})
203-
else()
204-
message(
205-
"======================================================================\n"
206-
"libsbml NOT found. \n\n"
207-
"If you want to compile with SBML support, download and install \n"
208-
"libsbml-5.9.0 from: \n"
209-
"http://sourceforge.net/projects/sbml/files/libsbml/5.9.0/stable/ and\n"
210-
"rerun cmake.\n\n"
211-
"If you don't want SBML support then continue with `make`.\n\n"
212-
"If you install libsbml to non-standard place, let the cmake know by\n"
213-
"exporting environment variable SBML_DIR to the location.\n"
214-
"=====================================================================\n"
215-
)
216-
SET(WITH_SBML OFF)
217-
endif()
218-
219160
include_directories(msg basecode)
220161

221162
set_target_properties(libmoose PROPERTIES COMPILE_DEFINITIONS "MOOSE_LIB")
@@ -366,7 +307,6 @@ add_subdirectory(biophysics)
366307
add_subdirectory(builtins)
367308
add_subdirectory(utility)
368309
add_subdirectory(mesh)
369-
add_subdirectory(sbml)
370310
add_subdirectory(mpi)
371311
add_subdirectory(signeur)
372312
add_subdirectory(ksolve)
@@ -400,13 +340,6 @@ elseif(HDF5_FOUND)
400340
list(APPEND SYSTEM_SHARED_LIBS ${HDF5_LIBRARIES})
401341
endif()
402342

403-
LIST(APPEND STATIC_LIBRARIES moose_sbml)
404-
if(SBML_STATIC_HOME)
405-
list(APPEND STATIC_LIBRARIES ${LIBSBML_LIBRARIES})
406-
elseif(LIBSBML_FOUND)
407-
list(APPEND SYSTEM_SHARED_LIBS ${LIBSBML_LIBRARIES})
408-
endif()
409-
410343
if(WITH_GSL)
411344
if(GSL_STATIC_HOME)
412345
message(STATUS "Using STATIC gsl libraries: ${GSL_LIBRARIES}")

moose-core/CheckCXXCompiler.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHECK_CXX_COMPILER_FLAG( "-std=c++11" COMPILER_SUPPORTS_CXX11 )
55
CHECK_CXX_COMPILER_FLAG( "-std=c++0x" COMPILER_SUPPORTS_CXX0X )
66
CHECK_CXX_COMPILER_FLAG( "-Wno-strict-aliasing" COMPILER_WARNS_STRICT_ALIASING )
77

8+
89
# Turn warning to error: Not all of the options may be supported on all
910
# versions of compilers. be careful here.
1011
add_definitions(-Wall

moose-core/Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
# Default values for flags. The operator ?= assigns the given value only if the
6262
# variable is not already defined.
63-
USE_SBML?=0
63+
#USE_SBML?=0
6464
USE_HDF5?=1
6565
USE_CUDA?=0
6666
USE_NEUROKIT?=0
@@ -230,16 +230,6 @@ else
230230
LIBS+= -lm
231231
endif
232232

233-
#harsha
234-
# To use SBML, pass USE_SBML=1 in make command line
235-
ifeq ($(USE_SBML),1)
236-
LIBS+= -lsbml
237-
CXXFLAGS+=-DUSE_SBML
238-
LDFLAGS += -L/usr/lib64 -Wl,--rpath='/usr/lib64'
239-
SBML_DIR = sbml
240-
SBML_LIB = sbml/_sbml.o
241-
endif
242-
243233
#Saeed
244234
# To use CUDA, pass USE_CUDA=1 in make command line
245235
ifeq ($(USE_CUDA),1)
@@ -371,7 +361,7 @@ export CXXFLAGS
371361
export LD
372362
export LIBS
373363
export USE_GSL
374-
export USE_SBML
364+
#export USE_SBML
375365

376366
all: moose pymoose
377367

moose-core/MooseTests.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ set_tests_properties(pymoose-ksolve-test
7979
PROPERTIES ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/python"
8080
)
8181

82-
# Test basic SBML support.
83-
ADD_TEST(NAME pymoose-test-basic-sbml-support
84-
COMMAND ${TEST_COMMAND}
85-
${PROJECT_SOURCE_DIR}/tests/python/test_sbml_support.py
86-
)
87-
set_tests_properties(pymoose-test-basic-sbml-support
88-
PROPERTIES ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/python"
89-
)
82+
## Test basic SBML support.
83+
#ADD_TEST(NAME pymoose-test-basic-sbml-support
84+
#COMMAND ${TEST_COMMAND}
85+
#${PROJECT_SOURCE_DIR}/tests/python/test_sbml_support.py
86+
#)
87+
#set_tests_properties(pymoose-test-basic-sbml-support
88+
#PROPERTIES ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/python"
89+
#)
9090

9191
# Test basic SBML support.
9292
ADD_TEST(NAME pymoose-test-rng

moose-core/basecode/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ default: $(TARGET)
7979

8080
$(OBJ) : $(HEADERS) ../shell/Shell.h
8181
Element.o: FuncOrder.h
82-
testAsync.o: SparseMatrix.h SetGet.h ../scheduling/Clock.h ../biophysics/IntFire.h ../synapse/SynHandlerBase.h ../synapse/SimpleSynHandler.h ../synapse/Synapse.h ../randnum/RNG.h
82+
testAsync.o: SparseMatrix.h SetGet.h ../scheduling/Clock.h ../biophysics/IntFire.h ../synapse/SynEvent.h ../synapse/SynHandlerBase.h ../synapse/SimpleSynHandler.h ../synapse/Synapse.h ../randnum/RNG.h
8383
SparseMsg.o: SparseMatrix.h
8484
SetGet.o: SetGet.h ../shell/Neutral.h
8585
HopFunc.o: HopFunc.h ../mpi/PostMaster.h

moose-core/basecode/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ extern void testShell();
5757
extern void testScheduling();
5858
extern void testSchedulingProcess();
5959
extern void testBuiltins();
60+
extern void testSynapse();
6061
extern void testBuiltinsProcess();
6162

6263
extern void testMpiScheduling();
@@ -342,6 +343,7 @@ void nonMpiTests( Shell* s )
342343
MOOSE_TEST("testHsolve", testHSolve());
343344
//MOOSE_TEST("testGeom", testGeom());
344345
MOOSE_TEST("testMesh", testMesh());
346+
MOOSE_TEST("testSynapse", testSynapse());
345347
MOOSE_TEST( "testSigneur", testSigNeur());
346348
#ifdef USE_SMOLDYN
347349
//MOOSE_TEST(testSmoldyn());

moose-core/basecode/testAsync.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <queue>
1919
#include "../biophysics/IntFire.h"
2020
#include "../synapse/Synapse.h"
21+
#include "../synapse/SynEvent.h"
2122
#include "../synapse/SynHandlerBase.h"
2223
#include "../synapse/SimpleSynHandler.h"
2324
#include "SparseMatrix.h"

moose-core/biophysics/Leakage.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,23 @@ Leakage::~Leakage()
8888

8989
void Leakage::vProcess( const Eref & e, ProcPtr p )
9090
{
91+
ChanCommon::vSetGk( e, this->vGetGbar( e ) * this->vGetModulation( e ));
92+
updateIk();
9193
sendProcessMsgs(e, p);
9294
}
9395

9496
void Leakage::vReinit( const Eref & e, ProcPtr p )
9597
{
98+
ChanCommon::vSetGk( e, this->vGetGbar( e ) * this->vGetModulation( e ));
99+
updateIk();
96100
sendReinitMsgs(e, p);
97101
}
98102

103+
void Leakage::vSetGbar( const Eref& e, double gbar )
104+
{
105+
ChanCommon::vSetGk( e, gbar * this->vGetModulation( e ) );
106+
ChanCommon::vSetGbar( e, gbar );
107+
}
99108

100109
//
101110
// Leakage.cpp ends here

moose-core/biophysics/Leakage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Leakage: public ChanCommon
5656
~Leakage();
5757
void vProcess( const Eref & e, ProcPtr p );
5858
void vReinit( const Eref & e, ProcPtr p );
59+
void vSetGbar( const Eref & e, double gbar );
5960

6061
static const Cinfo * initCinfo();
6162
};

0 commit comments

Comments
 (0)