diff --git a/docs/index.rst b/docs/index.rst index 3327b50f..7e76e1c4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ This is the documentation for STARDIS. Quickstart Downloading and Installation Physics of STARDIS + Using STARDIS in Parallel Example Notebooks Contributing Bibliography diff --git a/docs/using_stardis_in_parallel/stardis_in_parallel.ipynb b/docs/using_stardis_in_parallel/stardis_in_parallel.ipynb new file mode 100644 index 00000000..b2afe6ee --- /dev/null +++ b/docs/using_stardis_in_parallel/stardis_in_parallel.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Setting number of threads used in running a STARDIS simulation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When you run a STARDIS simulation, the yaml file determines how many threads are used. By default, it will only use 1 thread. The more threads you set a simulation to use, the more computing power the simulation will take advantage of for calculating line opacity and ray tracing steps (as both of these are parallelized in STARDIS). **Setting n_threads to 0 will make the simulation use all available threads.**" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here is a what a yaml file that has the STARDIS simulation use 3 threads will look like\n", + "\n", + "``` yaml\n", + "stardis_config_version: 1.0\n", + "n_threads: 3 # <----------- add your 'n_threads: ' here\n", + "atom_data: kurucz_cd23_chianti_H_He.h5\n", + "model:\n", + " ...\n", + "```\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "One reason you may want to consider increasing threads used is when computing spectra with large numbers (i.e. 10,000 or more) of wavelength points." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "stardis", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}