pyro can be obtained on the pyro2 github page. The best thing to do is to fork the project there and then you can interact with your own git repo.
If you prefer to work via the commandline, you can clone it as1:
git clone https://github.com/zingale/pyro2
Alternately, if you setup a github account and store your ssh key in your
account, you can clone it through ssh as:
git clone ssh://email@example.com:/zingale/pyro2.git
When you clone the git repository, you will have a full working directory along with all of the development history (hidden away in the files in the .git/ directory). You can use this repo to keep track of your own changes:
- To commit any local changes you've made to your local repo, you
git commit filename
- To see the history of changes to a file, you can do:
git log filename
- pyro is under active development and changing rapidly. To get the changes made by the developers, you need to "pull" from the original repository, by doing git pull in your pyro2/ directory. Most times this will go smoothly, but if you have made changes that conflict with those upstream, git may not be able to merge things on its own. In this case, you will need to resolve the differences by editting the affected files and recommit.
Note that all of the above only affects your copy of pyro. If you want to contribute changes back to the main pyro repository, you can use github to issue a "pull request". This will alert the developers who can evaluate your changes and then pull them from your repo into the main git repo for pyro.
There is extensive documentation on git online—here's some to get you started:
pyro is released under the BSD-3 license (LICENSE).
By default, pyro uses python 3.x—it is recommended that you use python 3 as well. There are a few steps to take to get things running. You need to make sure you have numpy, f2py, matplotlib, and h5py installed.
- On a Fedora system, this can be accomplished by doing:
dnf install python3-numpy python3-numpy-f2py python3-matplotlib \ python3-matplotlib-tk python3-h5py
You also need to make sure gfortran is present on you system.
dnf install gcc-gfortran
- On a Mac OSX system, you can install the dependencies using
sudo port install python36 py36-numpy py36-tkinter py36-h5py(Note that macports includes f2py as part of the numpy package.)
Not all matplotlib backends allow for the interactive plotting as pyro is run. One that does is the TkAgg backend. On recent Fedora systems, this appears to be the default. Otherwise, you can make this the default by creating a file ~/.matplotlib/matplotlibrc with the content:
backend: TkAggYou can check what backend is your current default in python via:
import matplotlib.pyplot print(matplotlib.pyplot.get_backend())
The remaining steps are:
- Set the PYRO_HOME environment variable to point
to the pyro2/ directory. This is used so pyro can find
the test benchmarks. You can putting
export PYRO_HOME="/path/to/pyro2/"in your .bashrc if you use the bash shell.
- Set the PYTHONPATH environment variable to point to
the pyro2/ directory. Again, with bash, put the
following in your .bashrc
- Build the Fortran source. In pyro2/ type
- Run a quick test of the advection solver:
./pyro.py advection smooth inputs.smooth
you should see a graphing window pop up with a smooth pulse advecting diagonally through the periodic domain.
ChangeLog (updated automatically)
Regression and unit testing
Information about the mailing list and a FAQ can be found on the pyro help page.
1git is available on most linux distributions through the package manager. On fedora, do dnf install git
2thanks to Selma E. de Mink for the Mac/OSX package installation instructions.