Skip to content
Sebastian Starke edited this page Apr 17, 2018 · 13 revisions

Installation

SimEx for python3.4 is installed under /data/netapp/s2e/simex. Every maxwell user should be able to

>>> from SimEx import *

Activation

Download the simex modulefile e.g. to your $HOME directory and load the module.

$> cd
$> wget https://gist.github.com/CFGrote/1d4b0acbc8ff7d0e545266f6f3838ec0/raw/2257886a80af812d4fba5c35d32abc2e6ce2537f/simex.modulefile
$> module load $HOME/simex.modulefile

Besides setting the paths to the simex installation, a couple of other modules are loaded. In particular the module python3/3.4. Henceforth, the command python will be linked to python3.4, so beware ...

Then check your active SimEx environment with

$> python
>>> from SimEx import *

If this returns without error (warnings ok), you're all set.

jupyter-notebooks

In order to run SimEx simulations in a jupyter-notebook on your desktop pc or laptop but have the kernel run on a maxwell compute node, we recommend the following setup:

Login to maxwell and allocate the compute resource (One node on partition exfel for 1 day, adjust according to your needs)

$> screen -R -D
$> salloc -N1 -pexfel -t1-0
$> ssh max-exfl080

On the compute node, activate your SimEx environment

$> module load $HOME/simex.modulefile

Launch jupyter notebook on dedicated port (pick your port number).

$> jupyter-notebook-3.4 --no-browser --port=12345

Note down the returned notebook URL. You can now return to the login node. Since you logged into the compute node in a screen session, you can simply press and hold ctrl, press and release a, press and release d. To resume the screen session and go back to the compute node,

$> screen -r

On your desktop or laptop: Setup a ssh tunnel (works from within DESY network, otherwise go through bastion).

$> ssh -f -N -L12345:localhost:12345 max-exfl080 (adjust port number and compute node hostname)

Then launch your favourite web browser and navigate to the notebook URL which you noted down in the previous step.

When using e.g. eduroam:

  1. connect to max-display via ssh using an X-session
  2. setup ssh tunnel to the compute node from the max-display server
   $> ssh -f -N -L12345:localhost:12345 max-exfl080 (adjust port number and compute node hostname)
  1. start firefox on max-display and browse to localhost:12345

Installing the detector simulation stack

Detector simulations with XCSITPhotonDetector depend on

  • py_detector_interface which depends on
  • xcsit
  • CImg.h
  • geant4
  • xerces-c

Getting all dependencies right can be cumbersome. This works on maxwell:

Install xerces-c

Then

$> mkdir build
$> cd build
$> cmake -DCMAKE_INSTALL_PREFIX=/data/netapp/s2e/simex -DCMAKE_BUILD_TYPE=Release
$> make -j64
$> make install

Install geant4

Then

$> mkdir build
$> cd build
$> cmake -DCMAKE_INSTALL_PREFIX=/data/netapp/s2e/simex -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DXERCESC_ROOT_DIR=/data/netapp/s2e/simex ..
$> make -j64
$> make install

Install xcsit

Then

$> cd xcsit
$> git checkout jan-philipp
  • Adjust the Geant4_DIR variable in line 21 to match the geant4 version installed in the previous step.

    $> source xcsit_install.sh

Finally, build simex with -DCMAKE_XCSITPhotonDetector=ON