https://github.com/ornl/sagesim
https://github.com/ornl/sagesim
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ornl/sagesim
- Owner: ORNL
- License: mit
- Created: 2024-03-22T16:35:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T19:50:54.000Z (3 months ago)
- Last Synced: 2025-03-13T20:36:50.459Z (3 months ago)
- Language: Python
- Size: 95.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SAGESim
Scalable Agent-based GPU Enabled Simulator
# Requirements
- Python 3.7+
- `conda create -n sagesimenv python=3.9`
- `conda activate sagesimenv`
- Install CUDA toolkit
- - https://developer.nvidia.com/cuda-toolkit
- - https://rocm.docs.amd.com/projects/install-on-linux/en/docs-6.0.2/
- - [Install using Anaconda](`conda install -c anaconda cudatoolkit`)
- install mpi4py (Recommend using conda): https://mpi4py.readthedocs.io/en/stable/install.html#using-conda
- [Follow the instructions here to install CuPy](https://docs.cupy.dev/en/stable/install.html)
- `pip install -r requirements.txt`
# Run Example- `git clone https://code.ornl.gov/sagesim/sagesim`
- `export PYTHONPATH=/path/to/clone_repo`
- `cd /path/to/clone_repo/examples/sir`
- `mpiexec -n 4 python run.py`# There are some unfortunate quirks to using CuPyx `jit.rawkernel`:
- nan checked by inequality to self. Unfortunate limitation of cupyx.
- Dicts and objects are unsupported.
- *args and **kwargs are unsupported.
- nested functions are unsupported.
- Be sure to use `cupy` data types and array routines in favor of `numpy`: [https://docs.cupy.dev/en/stable/reference/routines.html]
- `for` loops must use range iterator only. No 'for each' style loops.
- `return` does not seem to work well either
- `break` and `continue` are unsupported!
- Cannot reassign variables within `if` or `for` statements. Must be assigned at top level of function or new variable declared under subscope.
- `-1` indexing does not necessarily work as expected, as it will access the last element of the memory block of the array instead of the logical array. Use `len(my_array) - 1` instead