Skip to content

Commit

Permalink
Merge pull request #1068 from sys-bio/develop
Browse files Browse the repository at this point in the history
Merge for new release
  • Loading branch information
luciansmith authored Jan 23, 2023
2 parents 59c6f39 + 1d1e166 commit 8fa22f4
Show file tree
Hide file tree
Showing 203 changed files with 4,323 additions and 2,904 deletions.
23 changes: 18 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ cmake_minimum_required(VERSION 3.16)
# Version information and include modules

set(ROADRUNNER_VERSION_MAJOR 2)
set(ROADRUNNER_VERSION_MINOR 2)
set(ROADRUNNER_VERSION_PATCH 2)
set(ROADRUNNER_VERSION_MINOR 3)
set(ROADRUNNER_VERSION_PATCH 1)

set(ROADRUNNER_VERSION "${ROADRUNNER_VERSION_MAJOR}.${ROADRUNNER_VERSION_MINOR}.${ROADRUNNER_VERSION_PATCH}")

if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
# Some CMake features like object libraries get confused if you don't
# explicitly specify an architecture setting with the Xcode generator.
# set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE INTERNAL "Compile for intel and M1 chips on apple" FORCE)
message(STATUS "building on mac with universal binaries")
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "Compile for intel chips on apple" FORCE)
message(STATUS "building on mac for intel chips only.")
endif()

project(
Expand Down Expand Up @@ -104,7 +104,7 @@ set(RR_DEPENDENCIES_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dependencies"
set(LLVM_INSTALL_PREFIX ${RR_DEPENDENCIES_INSTALL_PREFIX} CACHE PATH "Location of LLVM Root directory, which contains bin, lib, include and share directories")
set(LLVM_ROOT_DIR "${LLVM_ROOT_DIR}")

set(USE_UNIVERSAL_BINARIES "ON" CACHE BOOL "Build llvm with universal binaries on MacOS")
#set(USE_UNIVERSAL_BINARIES "ON" CACHE BOOL "Build with universal binaries on MacOS")

# todo difference between build tests and build test tools option? (cw)
option(BUILD_TEST_TOOLS "Build and install test tools" OFF)
Expand Down Expand Up @@ -444,6 +444,19 @@ set(ZLIB_INCLUDE_DIR "${RR_DEPENDENCIES_INSTALL_PREFIX}/include/")
message(STATUS "ZLIB_LIBRARY: ${ZLIB_LIBRARY}")
message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")

#For some reason, something in the bowels of the dependencies needs ZLIB::ZLIB, and won't accept zlib::zlib.
# I stole this from libsbml's CMakeLists.txt file, since they apparently also suffer the same problem
# (and are the probable cause, at that.) I've only seen this needed on Ubuntu, and even there, it's
# not needed for the azure ubuntu build, just when actually running Ubuntu.
if(NOT TARGET ZLIB::ZLIB)
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
set_target_properties(ZLIB::ZLIB PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${ZLIB_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIR}")
endif()


find_package(${SBML_TARGET_NAME} CONFIG REQUIRED)
find_package(rr-libstruct CONFIG REQUIRED)
find_package(clapack CONFIG REQUIRED)
Expand Down
77 changes: 44 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,62 @@

# Summary

libroadrunner is a C/C++ library that supports simulation of SBML based models. It uses LLVM to generate extremely high performace code and is the fastest SBML based simulator currently avaialable. Its main purpose is for use as a resuable library that can be hosted by other applications, particularly on large compute clusters for doing parameter optimization where performance is critical.
libRoadRunner is a C/C++ library that supports simulation of SBML based models. It uses LLVM) to generate extremely high performance code and is the fastest SBML-based simulator currently available (ref). Its main purpose is for use as a reusable library that can be hosted by other applications, particularly on large compute clusters for doing parameter optimization where performance is critical. It also has a set of python bindings that allow it to be easily used from python.

We provide C/C++, Python and Julia bindings.

Sometimes the link to the C API docs goes bad in the readthedocs. If this happens, here is a permanent link that should remain whatever happens:
# Documentation

[Full Documentation](https://libroadrunner.readthedocs.io)

[Local Documentation](http://sys-bio.github.io/roadrunner/) (May be used if above link is failing.)

[C API Documention](https://sys-bio.github.io/roadrunner/OriginalDoxygenStyleDocs/html/index.html)

# Installation
Python front end (stable):

[Binaries](https://github.com/sys-bio/roadrunner/releases) for Windows, MacOS (including universal binaries for the M1 processor), and Linux

Python wheels are available at the above binaries link, and can also be installed via pip:

`pip install libroadrunner`

Binaries:
# Example Python usage

Head over to the [Releases](https://github.com/sys-bio/roadrunner/releases) page to download binaries.
Once installed in Python (using pip or using the wheels directly), the following simple example script should demonstrate the basics of a roadrunner simulation:

Experimental front end:
```python
import roadrunner
rr = roadrunner.RoadRunner("https://www.ebi.ac.uk/biomodels/model/download/BIOMD0000000010.2?filename=BIOMD0000000010_url.xml")
results = rr.simulate(0, 2000, 200)
rr.plot()
print(results)
```

`pip install libroadrunner-experimental`
This simple script downloads [BioModels 10](https://www.ebi.ac.uk/biomodels/BIOMD0000000010) (the Kholodenko model of MAPK oscillation) and runs a simulation for 2000 seconds, storing the results in `results`. If your system is set up to display figures, it will display a plot of the simulation, then print the numerical values obtained.

# Documentation
# Dependencies

[Python API Documentation](http://sys-bio.github.io/roadrunner/)
All libRoadRunner binaries are self-contained, and should include all libraries it depends on. When building libRoadRunner from source, its dependencies may either be downloaded *en masse* from the [libroadrunner-deps](https://github.com/sys-bio/libroadrunner-deps) repository, may be obtained directly from their [respective sources](https://github.com/sys-bio/libroadrunner-deps/tree/release/third_party), or the libraries may be installed directly on your operating system. Compilation requires a C++17 compiler.

The one exception to the above is that the libRoadRunner binaries depend on the 'ncurses' library on linux.

[C API Documention](https://sys-bio.github.io/roadrunner/OriginalDoxygenStyleDocs/html/index.html)

# Copyright

Copyright 2013-2021
Copyright 2013-2022

E. T. Somogyi <sup>1</sup>, J. K. Medley <sup>3</sup>, M. T. Karlsson <sup>2</sup>, M. Swat <sup>1</sup>, M. Galdzicki <sup>3</sup>, K. Choi <sup>3</sup>, W. Copeland <sup>3</sup>, L. Smith <sup>3</sup>, C. Welsh <sup>3</sup> and H. M. Sauro <sup>3</sup>

1. Biocomplexity Institute, Indiana University, Simon Hall MSB1, Bloomington, IN 47405
2. Dune Scientific, 10522 Lake City Way NE, #302 Seattle WA
3. Department of Bioengineering, University of Washington, Seattle, WA, 98195

The current (2021) developers are Lucian Smith and Ciaran Welsh.

## Introduction

libRoadRunner is a high-performance and portable simulation engine for systems and synthetic biology.
The current (2021-present) developer is Lucian Smith.

## Contributing

**IMPORTANT!** Contributors **must** follow the [contribution guidelines](https://github.com/sys-bio/roadrunner/wiki). Contibuters are responsible for complying with the guidelines, including (but not limited to) making commits to the correct branch. Maintainers are not responsible for changes made to the wrong branch. Contributors take full responsibility for ensuring that their changes get merged into the develop branch.
Contributors may submit pull requests at any time, and are asked to follow some general [contribution guidelines](https://github.com/sys-bio/roadrunner/wiki). Bug requests and feature suggestions are also welcomed on the [issues page](https://github.com/sys-bio/roadrunner/issues).

## libRoadRunner supports the following features:

Expand All @@ -87,45 +99,44 @@ libRoadRunner is a high-performance and portable simulation engine for systems a
RoadRunner is licensed for free as an open source programmatic library for use in other
applications and as a standalone command line driven application. Its C++ API, C API, and
Python APIs have comprehensive documentation. On Windows, OS X, and Linux binary files can be
downloaded from the [Releases](https://github.com/sys-bio/roadrunner/releases) page, and the
Python bindings can additionally be downloaded via pip.

downloaded from http://sourceforge.net/projects/libroadrunner/files and can be installed
ready for use.

## Docker images
Currently we have a manylinux2014 [build](https://hub.docker.com/repository/docker/ciaranwelsh/roadrunner-manylinux2014-base) docker image. The
base provides the environment you need to be able to build roadrunner
yourself on manylinux2014 (centos 8).

There are two docker tags associated with roadrunner depending on which
version of llvm you want to build with. The options are llvm-13.x for newer
roadrunner versions (> v2.2.0) and llvm-6.x for older.
Currently we have a manylinux2014 [build](https://hub.docker.com/repository/docker/sysbiouw/roadrunner-manylinux2014-base) docker image. The
base provides the environment you need to be able to build roadrunner yourself on manylinux2014 (centos 8).

To get the base image:

`docker pull ciaranwelsh/roadrunner-manylinux2014-base:llvm-13.x`

and the build image:

`docker pull ciaranwelsh/roadrunner-manylinux2014-build:llvm-13.x`
`docker pull sysbiouw/roadrunner-manylinux2014-base:llvm-13.x`

Docker build scripts can be found under the `docker` directory from the roadrunner
root directory.

We can also build roadrunner in alternative docker environments (ubuntu etc.) on request.

## Citing

If you use RoadRunner in your research, we would appreciate following citations in any works you publish:

Ciaran Welsh, Jin Xu, Lucian Smith, Matthias König, Kiri Choi, Herbert M Sauro, libRoadRunner 2.0: a high performance SBML simulation and analysis library, *Bioinformatics*, Volume 39, Issue 1, January 2023, btac770, https://doi.org/10.1093/bioinformatics/btac770

Endre T. Somogyi, Jean-Marie Bouteiller, James A. Glazier, Matthias König, J. Kyle Medley, Maciej H. Swat, Herbert M. Sauro, libRoadRunner: a high performance SBML simulation and analysis library, *Bioinformatics*, Volume 31, Issue 20, 15 October 2015, Pages 3315–3321, https://doi.org/10.1093/bioinformatics/btv363

## Acknowledgements

This work is funded by NIGMS grant: GM081070

Licence
## Licence

Licensed under the Apache License, Version 2.0 (the License); you may not use this
file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an ÎAS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS
under the License is distributed on an AS-IS BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.

Expand Down
48 changes: 29 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ stages:
displayName: MacBuildRoadrunnerCpp
continueOnError: "false"
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
matrix:
64-bit Mac Release:
Expand Down Expand Up @@ -114,7 +114,7 @@ stages:
cd $(MinicondaRoot)
echo "ls"
ls
$(CondaExecutable) create --quiet --yes --name $(PythonName) python=$(PythonVersion)
$(CondaExecutable) create --quiet --yes --name $(PythonName) python=$(PythonVersion) -c conda-forge
displayName: InstallCondaEnv
- script: |
Expand Down Expand Up @@ -182,7 +182,7 @@ stages:
targetFolder: $(Build.ArtifactStagingDirectory)
displayName: Copy to Staging Area
- publish: $(Build.ArtifactStagingDirectory)
artifact: roadrunner-MacOS10.15-$(BuildType)
artifact: roadrunner-MacOS11-$(BuildType)
displayName: Publish

- stage: MacBuildRoadrunnerPython
Expand All @@ -193,7 +193,7 @@ stages:
displayName: MacBuildRoadrunnerPython
continueOnError: "false"
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
matrix:
py38:
Expand All @@ -205,6 +205,9 @@ stages:
py310:
PythonVersion: 3.10
PythonName: py310
py311:
PythonVersion: 3.11
PythonName: py311
variables:
MinicondaRoot : '/usr/local/miniconda'
PythonRoot: '$(MinicondaRoot)/envs/$(PythonName)'
Expand Down Expand Up @@ -237,7 +240,7 @@ stages:
cd $(MinicondaRoot)
echo "ls"
ls
$(CondaExecutable) create --quiet --yes --name $(PythonName) python=$(PythonVersion)
$(CondaExecutable) create --quiet --yes --name $(PythonName) python=$(PythonVersion) -c conda-forge
echo "running: $(PipExecutable) install -r $(SOURCE_DIR)/test-requirements.txt"
$(PipExecutable) install -r $(SOURCE_DIR)/test-requirements.txt
displayName: InstallCondaEnv
Expand Down Expand Up @@ -285,15 +288,15 @@ stages:
rm -r $(DEPS_INSTALL_PREFIX)/install-azure
ls
displayName: Move Dependencies
- task: Cache@2
inputs:
key: "Swig | $(Agent.OS)"
path: $(SWIG_INSTALL_PREFIX)
cacheHitVar: SWIG_CACHE
displayName: Cache Swig-4.0.2
# - task: Cache@2
# inputs:
# key: "Swig | $(Agent.OS)"
# path: $(SWIG_INSTALL_PREFIX)
# cacheHitVar: SWIG_CACHE
# displayName: Cache Swig-4.0.2
- script: |
echo "installing pcre"
sudo apt install -y libpcre3 libpcre3-dev
brew install pcre pcre2
mkdir -p $(SWIG_SOURCE_DIR)
echo "cd to swig source dir: $(SWIG_SOURCE_DIR)"
cd $(SWIG_SOURCE_DIR)
Expand Down Expand Up @@ -376,15 +379,15 @@ stages:
- task: CopyFiles@2
inputs:
contents: '$(INSTALL_DIR)/**'
targetFolder: $(Build.ArtifactStagingDirectory)/roadrunner-MacOS10.15-$(PythonName)
targetFolder: $(Build.ArtifactStagingDirectory)/roadrunner-MacOS11-$(PythonName)
displayName: Copy Install Tree to Staging Area
- task: CopyFiles@2
inputs:
contents: '$(INSTALL_DIR)/dist/**'
targetFolder: $(Build.ArtifactStagingDirectory)/pip-wheels
displayName: Copy Pip Wheels to Staging Area
- publish: $(Build.ArtifactStagingDirectory)
artifact: roadrunner-MacOS10.15-$(PythonName)
artifact: roadrunner-MacOS11-$(PythonName)
displayName: Publish Pip Wheels Artifacts

########################################################################
Expand Down Expand Up @@ -566,6 +569,9 @@ stages:
py310:
PythonVersion: 3.10
PythonName: py310
py311:
PythonVersion: 3.11
PythonName: py311
variables:
MinicondaRoot : 'C:\Miniconda'
PythonRoot: '$(MinicondaRoot)\envs\$(PythonName)'
Expand All @@ -588,8 +594,9 @@ stages:
- powershell: |
where.exe conda
where.exe python
conda update conda -y
conda update conda -y -c conda-forge
conda install numpy
conda install python=3.11 -c conda-forge
conda --version
echo "PythonVersion $(PythonVersion)"
echo "PythonName $(PythonName)"
Expand All @@ -611,7 +618,7 @@ stages:
cacheHitVar: LLVM_CACHE
- script: |
echo "Creating new conda environment"
conda create --quiet --yes --name $(PythonName) python=$(PythonVersion)
conda create --quiet --yes --name $(PythonName) python=$(PythonVersion) -c conda-forge
echo "pip help:"
$(PipExecutable) install --help
Expand Down Expand Up @@ -696,7 +703,7 @@ stages:
echo "ls"
ls
echo "Creating new conda environment"
conda create --quiet --yes --name $(PythonName) python=$(PythonVersion)
conda create --quiet --yes --name $(PythonName) python=$(PythonVersion) -c conda-forge
echo "pip help:"
$(PipExecutable) install --help
echo "$(PipExecutable) install -q -r $(SOURCE_DIR)/test-requirements.txt and requirements.txt"
Expand Down Expand Up @@ -758,7 +765,7 @@ stages:
displayName: UbuntuBuildRoadrunnerCpp
continueOnError: "false"
pool:
vmImage: 'Ubuntu-18.04'
vmImage: 'Ubuntu-20.04'
strategy:
matrix:
64-bit Linux Release:
Expand Down Expand Up @@ -961,8 +968,11 @@ stages:
py310:
PythonVersion: 3.10
PythonName: py310
py311:
PythonVersion: 3.11
PythonName: py311
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
container: sysbiouw/roadrunner-manylinux2014-base:latest
variables:
CCACHE_DIR: '$(Pipeline.Workspace)/ccache'
Expand Down
2 changes: 1 addition & 1 deletion docs/docs-build/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6fe8ded2a92374737db879ef72778739
config: 4fdea462f19561a75feef109d8a885cd
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading

0 comments on commit 8fa22f4

Please sign in to comment.