GPU port of the mTASEP simulation (Totally Asymmetric Simple Exclusion Process with Langmuir kinetics on a multichannel microtubule), built on the SciCell++ framework.
678.9x faster than the serial version on a sweep of 14,641 parameter configurations.
| Version | Speedup vs. serial |
|---|---|
| Serial | 1.0x |
| MPI (4 cores) | 3.6x |
| MPI (8 cores) | 6.4x |
| CUDA (64 blocks x 256 threads) | 678.9x |
- CUDA implementation of the mTASEP simulation (
private/rodolfo/mTASEP/demo_mTASEP_LK_CUDA.cu), running one parameter configuration per GPU thread. - Balanced lateral jump: fixes a bias in the original model where particles always checked the upper channel first, which produced an artificial drift (see Quality Fixes).
- Run scripts for both versions (
run_cuda.sh,run_mpi.sh) and a tool to turn simulation snapshots into animated GIFs.
Credits: the SciCell++ framework is by tachidok; the MPI version of mTASEP is by Julio C. The CUDA port, the lateral-jump fix and the tooling are by Rodolfo Gallegos.
SciCell++ is an object-oriented framework for the simulation of biological and physical phenomena modelled as continuous or discrete processes.
- Documentation
- Dependencies
- Featured demos
- Execution Guide
- How to contribute
- Facts and curiosities
- License
The full documentation is here. You will find installation instructions, demos, tutorials and workflows to ease your journey with SciCell++.
For a detailed list of software requirements, refer to the DEPENDENCIES.md file.
- Interpolation
- Linear solvers
- Matrices operations
- Newton's method
- Solution of ODE's
- Lotka-Volterra solved with different time steppers
- N-body problem (only 3-body and 4-body)
- Explicit time steppers
- Implicit time steppers (full implicit and E(PC)^k E implementations)
- Adaptive time steppers
This version includes optimized scripts to compile and run mTASEP simulations on both CPU (MPI) and GPU (CUDA).
To compile and run Rodolfo's GPU version:
# Grant execution permissions if necessary
chmod +x run_cuda.sh
# Run (it will automatically compile if the binary does not exist)
./run_cuda.sh
# Force recompilation and run
./run_cuda.sh --buildTo compile and run Julio's distributed version:
# Grant execution permissions
chmod +x run_mpi.sh
# Run
./run_mpi.shThe simulation uses the following parameters to define the microtubule dynamics:
| Parameter | Description |
|---|---|
| L | Length of the microtubule (number of sites). |
| N | Number of parallel channels (microtubules). |
| Alpha ( |
Entry rate: Probability of a particle entering the first site of a channel. |
| Beta ( |
Exit rate: Probability of a particle leaving the last site of a channel. |
| Rho ( |
Hopping rate: Probability of a particle moving forward to the next site. |
| Omega In ( |
Attachment rate: Probability of a particle attaching to any empty site. |
| Omega Out ( |
Detachment rate: Probability of a particle detaching from any occupied site. |
| Lateral Movement | Enables (1) or disables (0) particles jumping between adjacent channels. |
To achieve maximum performance, you can tune the execution with:
--cudathreads: Threads per block (multiples of 32 recommended, e.g., 256).--cudablocks: Calculated asTotal_Configs / cudathreads. Using powers of 2 (e.g., 64) improves occupancy and scheduling.
Example: For 14,641 configurations (standard sweep), the optimal setting is
--cudablocks 64 --cudathreads 256.
In the original model, when a particle attempted a lateral move, it would always check the adjacent channel "above" first and then "below". This created an artificial upward drift, where particles preferred lower-indexed channels.
The current version implements a Balanced Jump logic:
- A random number is generated for each lateral move attempt.
- 50/50 Chance: There is a 50% probability of checking the "above" channel first and 50% for the "below" channel.
- This ensures that the lateral movement is physically unbiased and the distribution of particles across channels remains uniform in equilibrium.
Below are representative animations of the mTASEP dynamics for extreme configurations (where
Tip
The scripts handle calling autogen.sh with the correct configuration files (CUDA or mpi) and manage the creation of output folders (RESLT_CUDA / RESLT_MPI).
The project includes a Python script to convert the simulation snapshots into animated GIFs.
To generate animations, you must enable the output_microtubule_state flag in the simulation (set to 1) in the file run_mpi.sh or run_cuda.sh:
Use the auxiliary script located in the private/rodolfo/mTASEP/ directory:
cd private/rodolfo/mTASEP/
python3 csv_to_gif.py --results_dir output_folder --format cuda --delay 100 --cmap binary--results_dir: Path to the folder containing the simulation results.--format: Usecudafor the GPU version ormpifor the CPU version.--delay: Time between frames in milliseconds (default: 100ms).--cmap: Color map to use (default: binary).
The generated GIFs will be saved in the output_folder/gifs/ folder.
Please check the constributions section in the documentation.
- MPI support for parallel features -
not currently supported.
At Thursday, December/23, 2021 there is one and only one developer, me :no_mouth: :envelope:
🚧 🚧 🚧 🚧 🚧
This project was initially uploaded to GitHub on Friday, 11 March 2016 :smile:
Licensed under the GNU GPLv3. A copy can be found on the LICENSE file.




