Difference between revisions of "HOWTO Run Gluex Software with GCC 8 in a CentOS 7 Container"

From GlueXWiki
Jump to: navigation, search
Line 1: Line 1:
 +
The following assumes that you are using the bash shell. tcsh can be used as well with appropriate modifications.
 +
 
== Log into the ifarm at JLab ==
 
== Log into the ifarm at JLab ==
  
Line 11: Line 13:
 
  singularity shell --cleanenv --bind /group/halld $container_file
 
  singularity shell --cleanenv --bind /group/halld $container_file
  
== Set Up to Use Developers Toolset 8 ==
+
You will be placed in a bash shell session. Your home directory will be available automatically. The --bind option gives you access to the group disk inside the container. If you need other filesystems, use additional --bind options, e.g., "--bind /work/halld".
 +
 
 +
== Set Up to Use Developer Toolset 8 ==
  
 
  scl enable devtoolset-8 bash
 
  scl enable devtoolset-8 bash
 +
 +
This sets you up to use GCC 8.3.1. To check, to a "gcc --version".
  
 
== Set Up the GlueX Environment ==
 
== Set Up the GlueX Environment ==
Line 19: Line 25:
 
  source /group/halld/Software/build_scripts/gluex_env_boot_jlab.sh
 
  source /group/halld/Software/build_scripts/gluex_env_boot_jlab.sh
 
  gxenv $HALLD_VERSIONS/version_beta_1.0.xml
 
  gxenv $HALLD_VERSIONS/version_beta_1.0.xml
 +
 +
This is no different than usual.
  
 
== Run hd_root ==
 
== Run hd_root ==
  
 
  hd_root
 
  hd_root
 +
 +
You should see the usage message. From this point forward, things should be like a normal session on the ifarm, except that not all of the packages you normally see on the ifarm proper are available in the container.

Revision as of 20:59, 17 July 2021

The following assumes that you are using the bash shell. tcsh can be used as well with appropriate modifications.

Log into the ifarm at JLab

Enable Singularity

module use /apps/modulefiles
module load singularity/3.7.1

Enter the Singularity Container

container_file=/group/halld/www/halldweb/html/dist/gluex_centos-7.7.1908_sng3.8_gxi2.20.sif
singularity shell --cleanenv --bind /group/halld $container_file

You will be placed in a bash shell session. Your home directory will be available automatically. The --bind option gives you access to the group disk inside the container. If you need other filesystems, use additional --bind options, e.g., "--bind /work/halld".

Set Up to Use Developer Toolset 8

scl enable devtoolset-8 bash

This sets you up to use GCC 8.3.1. To check, to a "gcc --version".

Set Up the GlueX Environment

source /group/halld/Software/build_scripts/gluex_env_boot_jlab.sh
gxenv $HALLD_VERSIONS/version_beta_1.0.xml

This is no different than usual.

Run hd_root

hd_root

You should see the usage message. From this point forward, things should be like a normal session on the ifarm, except that not all of the packages you normally see on the ifarm proper are available in the container.