Difference between revisions of "EGSnrc"

From HPC users
Jump to navigationJump to search
(Added information about modifications to .bashrc that are not needed.)
Line 37: Line 37:
After the installation of the ''user codes'' you will see the following message:
After the installation of the ''user codes'' you will see the following message:
   *******************************************************************************
   *******************************************************************************
 
 
   The configuration was completed succesfully for user abcd1234.
   The configuration was completed succesfully for user abcd1234.
 
 
   Your default shell is /bin/bash
   Your default shell is /bin/bash
   Add the following 3 statements to your .bashrc file:  
   Add the following 3 statements to your .bashrc file:  
 
 
   export EGS_HOME=/user/hrz/lees4820/egsnrc/
   export EGS_HOME=/user/hrz/lees4820/egsnrc/
   export EGS_CONFIG=/cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/specs/x86_64-gcc.config
   export EGS_CONFIG=/cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/specs/x86_64-gcc.config
   . /cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/scripts/egsnrc_bashrc_additions
   . /cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/scripts/egsnrc_bashrc_additions
 
 
   ******************************************************************************
   ******************************************************************************
You do '''not''' need to modify your <tt>.bashrc</tt>-file as all the required settings are done by loading the module as described above.  
You do '''not''' need to modify your <tt>.bashrc</tt>-file as all the required settings are done by loading the module as described above.  

Revision as of 11:57, 20 November 2014

Overview

The follwing description can also be found here:

NRC’s electron gamma shower (EGS) software tool can meet your specific requirements relating to modelling the passage of electrons and photons through matter. EGSnrc relies on Monte Carlo, which is the most accurate method to model the transport of radiation.

EGSnrc is used to address a broad range of questions about the propagation of radiation in materials. It is particularly well-suited for medical physics purposes, such as the research and development of devices that allow medical professionals to detect radiation, image a patient’s anatomy using x-rays, or deliver a prescribed radiation dose to a tumour while sparing healthy tissue. The software is also employed directly by medical physicists in cancer clinics for research and for verifying radiation treatment plans.

The software is freely available for research and other non-commercial purposes, see [1] for details.


Using EGSnrc on the cluster

Loading the module

In order to use EGSnrc you have to load the corresponding module with

 module load egsnrc

after which using

 module list

should show e.g.

 Currently Loaded Modulefiles:
 1) shared         2) gcc/4.7.1      3) sge/6.2u5p2    4) egsnrc/2.4.0

First time usage

EGSnrc requires a directory in user space to store the so-called user codes. If you are using EGSnrc for the first time on the cluster you need create a directory and to copy these user codes there.

This can be done conveniently by running the provided script

 finalize_egs_foruser

(after you have loaded the module, of course). The script will ask you for a directory name to store the user codes

 Input the directory where you want to keep your user codes 
      [/user/somegroup/abcd1234/egsnrc]:

It is strongly recommended that you use the provided default (which is $HOME/egsnrc) by just typing RETURN.

Then you will be asked which user codes should be installed where you can enter e.g. 1 for Compile all. After that you should a few messages about codes being successfully compiled. This may take a few minutes.

After the installation of the user codes you will see the following message:

 *******************************************************************************
 
 The configuration was completed succesfully for user abcd1234.
 
 Your default shell is /bin/bash
 Add the following 3 statements to your .bashrc file: 
 
 export EGS_HOME=/user/hrz/lees4820/egsnrc/
 export EGS_CONFIG=/cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/specs/x86_64-gcc.config
 . /cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/scripts/egsnrc_bashrc_additions
 
 ******************************************************************************

You do not need to modify your .bashrc-file as all the required settings are done by loading the module as described above.


Remember, this step only needs to done once.

Testing

You can quickly test if everything is installed correctly by the command

 tutor1 -p /cm/shared/apps/egsnrc/2.4.0/HEN_HOUSE/pegs4/data/tutor_data.pegs4dat

which should produce around 100 lines of output in one second.

Running jobs on the cluster

As with any application on the cluster you have to submit a job script to run EGSnrc (see below for an example). A detailed introduction to job submission can be found under SGE Job Management (Queueing) System.

 example job script will follow

If you need to run the same code many times you should consider using a job array

 example for job array will follow