Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #86 from FrancescoCasalegno/master
Browse files Browse the repository at this point in the history
Merge "readi" miniapp for reaction-diffusion ssa in steps
  • Loading branch information
Tristan Carel authored Jul 25, 2018
2 parents 70d6d24 + 8390bda commit faa00c6
Show file tree
Hide file tree
Showing 24 changed files with 14,949 additions and 14 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.10)
cmake_minimum_required (VERSION 3.1)
project (neuromapp)


Expand Down Expand Up @@ -38,6 +38,10 @@ if (BLUEGENE)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_DIALECT_OPT_C99EXT}")

# Check if c++11 is available: if not, we don't compile what requires it
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)


include(BlueGenePortability)

Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ of coreneuron, 3 miniapps are available: kernel and solver
* cstep: It combines the kernel and the solver to mimic a step time of neuron simulator

* queue: This miniapp simulates the queueing system of CoreNeuron.


##hello
## neuromapp/hello

This directory provides an example of how could be design a miniapp (C++)

Expand Down Expand Up @@ -55,6 +56,20 @@ For more information, run the mini-app with the --help argument.
You can disable the compilation of this mini-app by using the following variable in cmake
command: '-DNEUROMAPP_DISABLE_KEYVALUE=TRUE'

## neuromapp/readi

This directory contains a miniapp implementing a reaction-diffusion simulator
based on operator splitting, as in TetOpSplit solver of STEPS software package.
To run the simulation on a simple model with 10 species and 8 reactions, go to
the `build` directory and execute the mini-app with the following arguments:

`./neuromapp/app/app readi --filename_mesh ../neuromapp/readi/dataset/data_mesh --filename_model ../neuromapp/readi/dataset/data_model`

For more information, run the mini-app with the `--help` argument.

You can disable the compilation of this mini-app by setting
`-DNEUROMAPP_DISABLE_READI=TRUE` when running cmake.

## neuromapp/replib

This directory contains a miniapp that mimics the behavior of Neuron's ReportingLib.
Expand Down
3 changes: 3 additions & 0 deletions neuromapp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ add_subdirectory (keyvalue)
add_subdirectory (coreneuron_1.0)
add_subdirectory (replib)
add_subdirectory (iobench)
if(COMPILER_SUPPORTS_CXX11)
add_subdirectory(readi)
endif()
add_subdirectory (app)
25 changes: 18 additions & 7 deletions neuromapp/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ else()
endif()

# CoreNeuron mini-apps
#if(NEUROMAPP_CORENEURON_MAPP)
if(NEUROMAPP_CORENEURON_MAPP)
target_link_libraries (app
coreneuron10_kernel
coreneuron10_solver
coreneuron10_cstep
coreneuron10_event
coreneuron10_queue
storage)
# add_definitions(-DNEUROMAPP_CORENEURON_MAPP=1)
message(STATUS "Adding CoreNeuron mini-apps")
#else()
# add_definitions(-DNEUROMAPP_CORENEURON_MAPP=0)
# message(STATUS "Ignoring CoreNeuron mini-apps")
#endif()
add_definitions(-DNEUROMAPP_CORENEURON_MAPP=1)
message(STATUS "Adding CoreNeuron mini-apps")
else()
add_definitions(-DNEUROMAPP_CORENEURON_MAPP=0)
message(STATUS "Ignoring CoreNeuron mini-apps")
endif()

# Keyvalue mini-app
if(NEUROMAPP_KEYVALUE_MAPP)
Expand Down Expand Up @@ -86,6 +86,17 @@ else()
message(STATUS "Ignoring iobench mini-app")
endif()

# Readi mini-app
if(NEUROMAPP_READI_MAPP)
target_link_libraries (app
readi)
add_definitions(-DNEUROMAPP_READI_MAPP=1)
message(STATUS "Adding readi mini-app")
else()
add_definitions(-DNEUROMAPP_READI_MAPP=0)
message(STATUS "Ignoring readi mini-app")
endif()

# compression mini-app
if(NEUROMAPP_COMPRESSION_MAPP)
target_link_libraries (app
Expand Down
16 changes: 11 additions & 5 deletions neuromapp/app/miniapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
#include "hdf5/drivers/h5read.h"
#endif

//#if NEUROMAPP_CORENEURON_MAPP
#if NEUROMAPP_CORENEURON_MAPP
#include "coreneuron_1.0/event_passing/drivers/drivers.h"
#include "coreneuron_1.0/kernel/kernel.h"
#include "coreneuron_1.0/solver/solver.h"
#include "coreneuron_1.0/cstep/cstep.h"
#include "coreneuron_1.0/queue/queue.h"
//#endif
#endif

#if NEUROMAPP_KEYVALUE_MAPP
#include "keyvalue/keyvalue.h"
Expand All @@ -62,7 +62,10 @@
#include "iobench/iobench.h"
#endif

//should I include all of the headers?
#if NEUROMAPP_READI_MAPP
#include "readi/readi.h"
#endif

#if NEUROMAPP_COMPRESSION_MAPP
#include "compression/compression.h"
#endif
Expand All @@ -84,13 +87,13 @@ void register_miniapps(mapp::driver &d) {
#if NEUROMAPP_HDF5_MAPP
d.insert("h5read", hdf5::h5read::execute);
#endif
//#if NEUROMAPP_CORENEURON_MAPP
#if NEUROMAPP_CORENEURON_MAPP
d.insert("event",event_execute);
d.insert("kernel",coreneuron10_kernel_execute);
d.insert("solver",coreneuron10_solver_execute);
d.insert("cstep",coreneuron10_cstep_execute);
d.insert("queue",coreneuron10_queue_execute);
//#endif
#endif
#if NEUROMAPP_KEYVALUE_MAPP
d.insert("keyvalue",keyvalue_execute);
#endif
Expand All @@ -100,6 +103,9 @@ void register_miniapps(mapp::driver &d) {
#if NEUROMAPP_IOBENCH_MAPP
d.insert("iobench",iobench_execute);
#endif
#if NEUROMAPP_READI_MAPP
d.insert("readi",readi_execute);
#endif
//note should change suffix to execute when time comes
#if NEUROMAPP_COMPRESSION_MAPP
d.insert("compression",comp_execute);
Expand Down
10 changes: 10 additions & 0 deletions neuromapp/readi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Use -DNEUROMAPP_DISABLE_READI=TRUE to disable compilation/installation of this mini-app
if(NOT NEUROMAPP_DISABLE_READI)
add_library (readi main.cpp)
install (TARGETS readi DESTINATION lib)
install (FILES readi.h DESTINATION include)

set(NEUROMAPP_READI_MAPP ON CACHE BOOL "True if readi mini-app will be installed")
else()
set(NEUROMAPP_READI_MAPP OFF CACHE BOOL "True if readi mini-app will be installed")
endif()
Loading

0 comments on commit faa00c6

Please sign in to comment.