Prescriptions from Chris with my comments.

Login

ssh -Y <username>@cori.nersc.gov

ssh -Ycori05 # other nodes may have different versions of compilers...

Cloning lcls2 repository

Version control with git -describes git initialization.

The final command should be

git clone git@github.com:slac-lcls/lcls2.git

Create and activate conda environment

module load python

See available conda environments and create one:

conda env list
conda env create --name <ps-0.1.1-...-environment-name> -f env_create.yaml
source activate <ps-0.1.1-...-environment-name>

where the file env_create.yaml contains the list of require packages.

Originally it is located in https://github.com/slac-lcls/relmanage/blob/master/env_create.yaml or env_create_py2.yaml for python2.

Our version of env_create.yaml has slightly modified content of the file env_create_py2.yaml
 channels:
  - defaults
  - conda-forge
dependencies:
  - python=3.6
  - cmake
  - h5py
  - ipython
  - numpy
  - cython
  - matplotlib
  - mongodb
  - pymongo
  - mpi4py
  - nose
  - pyzmq
  - versioneer
  - requests

Build

cd lcls2

export CRAYPE_LINK_TYPE=dynamic
export INSTDIR=`pwd`/install

For python2.7

./build_python2_psana.sh
export PYTHONPATH=$INSTDIR/lib/python2.7/site-packages

For python3.6

./build_python3_light.sh
export PYTHONPATH=$INSTDIR/lib/python3.6/site-packages

Useful conda commands

  • conda list
  • conda env list
  • conda env remove --name <ps-0.1.1-...-environment-name>

Run apps etc

python psana/psana/pscalib/calib/MDBWebUtils.py 7
ipython
> import psana

References

 

  • No labels