Ha14 installation: Difference between revisions

From cctbx_xfel
Jump to navigation Jump to search
m (Typo.)
(Unified source setup for regular users and developers.)
Line 1: Line 1:
This document aims to be a step-by-step installation guide for ''cctbx.xfel''.  Note that in this text <code>$</code> denotes the prompt of any unprivileged user on the system.  Certain shells may be configured to use <code>%</code> or <code>&gt;</code> for that purpose.  The user prompt is distinct from <code>#</code>, which denotes the prompt of the superuser.  The prompt should <em>not</em> be included in the command typed to the shell.  This installation can be performed by any regular user—no superuser privileges are required.
{{ mbox
| type = notice
| text = Installing ''cctbx.xfel'' is not necessary for most users, as ''cctbx.xfel'' is installed at SLAC already and is generally accessible.  General users should instead go to [[setup]] to configure their unix account at SLAC to run ''cctbx.xfel.''
}}
== Prerequisite: install and set up the PSDM suite ==
== Prerequisite: install and set up the PSDM suite ==


See [[Set up PSDM software]].  It is assumed that <code>ana_env.sh</code> or <code>ana_env.csh</code> has been sourced, a release directory has been configured in <code>~/myrelease</code> or <code>~/analisys-rel</code>, and that an empty analysis package has been set up in <code>~/myrelease/my_ana_pkg</code> or <code>~/analisys-rel/my_ana_pkg</code>
It is assumed that the [[Set up PSDM software | PSDM software distribution has been set up]].  Note again that several sites already have ''cctbx.xfel'' installed, and that this step can be skipped for regular users not involved in the development of the software.  Once ''cctbx.xfel'' has been installed it must be [[Setup | set up]] before it can be used.


<!-- XXX In addition, these software packages need to be available: reportlab, h5py, etc -->


== Download and extract ''cctbx'' and ''LABELIT'' source bundles ==
== Download and extract a source tree ==


<!-- XXX Seems to be important to source ana_env.sh before building! XXX Stored in /net/cci/auto_build/cctbx/results -->
This step has to be performed on a host with Internet access. Not all hosts at SLAC have that, but the members of <i>e.g.</i> psexport pool do. In what follows, the absolute path <code><b><i>/path/to/cctbx/sources</i></b></code> should be replaced with something more appropriate (a site-wide install will benefit from a location on a shared disk, whereas <code>~/projects/phenix-src</code> is a common choice among developers).  The directory must accessible everywhere ''cctbx.xfel'' is to be run.


<!-- XXX This is probably the only place where the developer installation is different from the standard installation.  Investigate and accommodate! -->
=== Regular users ===
 
  $ mkdir -p <b><i>/path/to/cctbx/sources</i></b>
Note that developers should follow the instructions in [[Installation for developers]] instead.  This step has to be performed on a host with Internet access. Not all hosts at SLAC have that, but the members of <i>e.g.</i> psexport pool do. In what follows, the absolute path <code><b><i>/path/to/cctbx/directory</i></b></code> should be replaced with something more appropriate. The directory should accessible everywhere ''cctbx.xfel'' is to be run.
  $ cd <b><i>/path/to/cctbx/sources</i></b>
  $ mkdir -p <b><i>/path/to/cctbx/directory</i></b>
  $ cd <b><i>/path/to/cctbx/directory</i></b>
  $ wget http://cci.lbl.gov/cctbx_build/results/2013_08_13_0005/cctbx_bundle.tar.gz
  $ wget http://cci.lbl.gov/cctbx_build/results/2013_08_13_0005/cctbx_bundle.tar.gz
  $ wget http://cci.lbl.gov/~hattne/labelit/labelit_bundle_20130814.tar.gz
  $ wget http://cci.lbl.gov/~hattne/labelit/labelit_bundle_20130814.tar.gz
$ mkdir cctbx_project
$ tar -xpvzf cctbx_bundle.tar.gz -C cctbx_project --strip-components=1
$ tar -xpvzf labelit_bundle_20130814.tar.gz
<!-- XXX Nightly bundles are stored in /net/cci/auto_build/cctbx/results -->


{{ mbox
{{ mbox
Line 30: Line 24:
}}
}}


Extract the sources:
=== Developers ===
  $ mkdir cctbx_project
 
  $ tar -xpvzf cctbx_bundle.tar.gz -C cctbx_project --strip-components=1
<!-- XXX Why is this PHENIX when we really want cctbx.xfel -->
  $ tar -xpvzf labelit_bundle_20130814.tar.gz
A user account on cci.lbl.gov is required, the name of which is to be substituted for <code><b><i>user</i></b></code> below.
$ mkdir -p <b><i>/path/to/cctbx/sources</i></b>
  $ cd <b><i>/path/to/cctbx/sources</i></b>
  $ svn export svn+ssh://<b><i>user</i></b>@cci.lbl.gov/phenix_regression/trunk/phenix_svn_getting_started.csh
  $ ./phenix_svn_getting_started.csh <b><i>user</i></b>
$ rm phenix_svn_getting_started.csh
 
 
== Create the <code>cxi_user</code> directory ==


<!-- XXX This is duplicated in the developer instructions! -->
Add the <code>cxi_user</code> directory and its <code>__init__.py</code> module.  This defines the default integration algorithm used by ''cctbx.xfel''.
Add the <code>cxi_user</code> directory and its <code>__init__.py</code> module.  This defines the default integration algorithm used by ''cctbx.xfel''.
  $ mkdir cxi_user
  $ mkdir cxi_user
Line 44: Line 45:


== Configure the source tree ==
== Configure the source tree ==
This next two steps require access to a C++ compiler and a Python interpreter.  At SLAC, the members of the psexport pool do not have any compilers installed, but the interactive nodes, reachable <i>via</i> psanacs, do.  The Python interpreter used to configure the source tree must be the same interpreter the PSDM suite uses.  That interpreter can be located using find, <i>e.g.</i>
The Python interpreter required for the next step must be the same interpreter provided by the PSDM software distribution.  That interpreter can be located using find, <i>e.g.</i>
  $ find $SIT_ROOT/sw/external/python -perm /0111 -type f -wholename "*/$SIT_ARCH/*/python" 2> /dev/null
  $ find $SIT_ROOT/sw/external/python -perm /0111 -type f -wholename "*/$SIT_ARCH/*/python" 2> /dev/null
At SLAC this interpreter is located somewhere under <code>/reg/g/psdm/sw/external/python</code>.  Then create and initialize the build directory using the appropriate Python interpreter.  Developers may want to use slightly different configuration options, see [[Installation for developers]].
At SLAC this interpreter is located somewhere under <code>/reg/g/psdm/sw/external/python</code>.  Then create and initialize the build directory using the appropriate Python interpreter.  Developers may want to use slightly different configuration options, see [[Installation for developers]].
Line 52: Line 53:
where <code><b><i>python</i></b></code> should be substituted with output of the previous find command.  The name and location of the build directory is arbitrary; <code><b><i>/path/to/cctbx/directory</i></b>/cctbx_build</code> is a common choice.
where <code><b><i>python</i></b></code> should be substituted with output of the previous find command.  The name and location of the build directory is arbitrary; <code><b><i>/path/to/cctbx/directory</i></b>/cctbx_build</code> is a common choice.


Now, initialise the running shell using the newly created configuration files.  bash-users should do
 
== Compile the sources ==
 
Initialise the running shell using the newly created configuration files.  bash-users should
  $ . setpaths.sh
  $ . setpaths.sh
while csh-users should instead run
while csh-users will instead need to run
  % source setpaths.csh
  % source setpaths.csh


 
The next step requires a C++ compiler.  At SLAC, the members of the psexport pool do not have any compilers installed, but the interactive nodes, reachable <i>via</i> psanacs, do.
== Compile the sources ==
If building at SLAC, log into one of the psanacs nodes. Then compile:
  $ make
  $ make
On SLAC's interactive nodes, this takes just over 6 minutes.  To finalize the installation, see [[Setup]].
On SLAC's interactive nodes, this takes just over 6 minutes.  To finalize the installation, see [[Setup]].

Revision as of 10:18, 7 February 2014

Prerequisite: install and set up the PSDM suite

It is assumed that the PSDM software distribution has been set up. Note again that several sites already have cctbx.xfel installed, and that this step can be skipped for regular users not involved in the development of the software. Once cctbx.xfel has been installed it must be set up before it can be used.


Download and extract a source tree

This step has to be performed on a host with Internet access. Not all hosts at SLAC have that, but the members of e.g. psexport pool do. In what follows, the absolute path /path/to/cctbx/sources should be replaced with something more appropriate (a site-wide install will benefit from a location on a shared disk, whereas ~/projects/phenix-src is a common choice among developers). The directory must accessible everywhere cctbx.xfel is to be run.

Regular users

$ mkdir -p /path/to/cctbx/sources
$ cd /path/to/cctbx/sources
$ wget http://cci.lbl.gov/cctbx_build/results/2013_08_13_0005/cctbx_bundle.tar.gz
$ wget http://cci.lbl.gov/~hattne/labelit/labelit_bundle_20130814.tar.gz
$ mkdir cctbx_project
$ tar -xpvzf cctbx_bundle.tar.gz -C cctbx_project --strip-components=1
$ tar -xpvzf labelit_bundle_20130814.tar.gz


{{#invoke:Message box|mbox}}

Developers

A user account on cci.lbl.gov is required, the name of which is to be substituted for user below.

$ mkdir -p /path/to/cctbx/sources
$ cd /path/to/cctbx/sources
$ svn export svn+ssh://user@cci.lbl.gov/phenix_regression/trunk/phenix_svn_getting_started.csh
$ ./phenix_svn_getting_started.csh user
$ rm phenix_svn_getting_started.csh


Create the cxi_user directory

Add the cxi_user directory and its __init__.py module. This defines the default integration algorithm used by cctbx.xfel.

$ mkdir cxi_user
$ cat > cxi_user/__init__.py << EOF
from xfel.mono_simulation.mono_treatment import post_outlier_rejection
from xfel.mono_simulation.mono_treatment import pre_get_predictions
EOF

Configure the source tree

The Python interpreter required for the next step must be the same interpreter provided by the PSDM software distribution. That interpreter can be located using find, e.g.

$ find $SIT_ROOT/sw/external/python -perm /0111 -type f -wholename "*/$SIT_ARCH/*/python" 2> /dev/null

At SLAC this interpreter is located somewhere under /reg/g/psdm/sw/external/python. Then create and initialize the build directory using the appropriate Python interpreter. Developers may want to use slightly different configuration options, see Installation for developers.

$ mkdir -p /path/to/cctbx_build
$ cd /path/to/cctbx_build
$ python /path/to/cctbx/directory/cctbx_project/libtbx/configure.py xfel

where python should be substituted with output of the previous find command. The name and location of the build directory is arbitrary; /path/to/cctbx/directory/cctbx_build is a common choice.


Compile the sources

Initialise the running shell using the newly created configuration files. bash-users should

$ . setpaths.sh

while csh-users will instead need to run

% source setpaths.csh

The next step requires a C++ compiler. At SLAC, the members of the psexport pool do not have any compilers installed, but the interactive nodes, reachable via psanacs, do.

$ make

On SLAC's interactive nodes, this takes just over 6 minutes. To finalize the installation, see Setup.


External links