Message boards :
ATLAS Application :
Script "run_atlas" - Minor Issue
Message board moderation
Author | Message |
---|---|
![]() Send message Joined: 28 Jul 16 Posts: 434 Credit: 376,220 RAC: 0 ![]() ![]() |
The following lines check for singularity and set the version from CVMFS if there's no local installation. def check_singularity(sin_binary): logger.info("Checking Singularity...") (ret,mes)=commands.getstatusoutput("%s --version" % sin_binary) if ret!=0: if mes.find('not found') != -1: logger.info("Singularity is not installed, using version from CVMFS") else: logger.info("Singularity seems to be installed but not working: %s" % mes) logger.info("Will use version from CVMFS") sin_binary = '/cvmfs/atlas.cern.ch/repo/containers/sw/singularity/x86_64-el7/current/bin/singularity' else: logger.info("Singularity is installed, version %s" % mes) return sin_binary You may be aware that on my hosts the check doesn't include "not found" in it's output: > singularity --version If 'singularity' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf singularity Hence the script logs "Singularity seems to be installed but not working" instead of "Singularity is not installed ...". |
![]() Send message Joined: 28 Jul 16 Posts: 434 Credit: 376,220 RAC: 0 ![]() ![]() |
Another host logs the message in german language which also doesn't include "not found": singularity: Kommando nicht gefunden. |
©2023 CERN