Message boards : ATLAS Application : Script "run_atlas" - Minor Issue
Message board moderation

To post messages, you must log in.

AuthorMessage
computezrmle
Volunteer moderator
Project tester
Volunteer developer
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 28 Jul 16
Posts: 473
Credit: 389,411
RAC: 62
Message 6755 - Posted: 11 Oct 2019, 11:01:18 UTC

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 ...".
ID: 6755 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
computezrmle
Volunteer moderator
Project tester
Volunteer developer
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 28 Jul 16
Posts: 473
Credit: 389,411
RAC: 62
Message 6756 - Posted: 11 Oct 2019, 12:24:52 UTC

Another host logs the message in german language which also doesn't include "not found":
singularity: Kommando nicht gefunden.
ID: 6756 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : ATLAS Application : Script "run_atlas" - Minor Issue


©2024 CERN