Computer Setup/Graphics
- Have a laptop
- get a terminal on a psana machine, ideally with graphics
- use nomachine - probably best Remote Visualization
- mac - can also install XQuartz, and use the terminal program
- windows - only free X connection is through cygwin, but that is heavyweight software
Software
In bash, source ~davidsch/mlearntut.sh for environment.
If you use cshell, start a bash shell first, or look at the script to modify for cshell.
The script clears environment variables like PYTHONPATH, LD_LIBRARY_PATH, and sets PATH to the rhel7 default, and puts a miniconda bin dir at the frount. Then it activates the 'mlearntut' environment in the conda install.
We will use Keras and tensorflow
Code
- from pslogin (a machine with outside internet), do git clone https://github.com/davidslac/mlearntut.git
- you may need to go back and forth to the outside internet connection - leave pslogin terminal up
- start new termina, ssh to pslogin, then ssh to psana
- cd to the mlearntut directory you made, from the pslogin terminal
Running
If resources are getting tight on the interactive nodes, you can launch jobs on the batch. You can launch the jobs in 'interactive' mode so you can see output (graphical output won't work from batch). Here is an example:
export OMPI_MCA_mpi_warn_on_fork=0
bsub -q psanaq -I python ex01_keras_train.py
I am not sure why we need to set mpi_warn_on_fork=0, it quiets a noisy error message. Although we aren't using MPI, our hdf5 library is built with it, so some MPI aware code is running and complaining. Note, the code includes
sys.stdout.flush()
calls so that we can see print output while running on batch interactively.