pcchen / scopion

Scopion cluster
2 stars 0 forks source link

Bug: module loading shows module 'posix' not found #1

Open tanlin2013 opened 2 years ago

tanlin2013 commented 2 years ago

Description

Job script failed when one attemps to use the module loading feature within the sbatch script.

Expected Behaviours

User should be able to use module load for thier specific environment.

Job Script

#!/usr/bin/bash
#SBATCH -n 1
#SBATCH -p scopion2
#SBATCH --cpus-per-task=1
#SBATCH --time=00:01:00

module purge 
module load singularity
singularity --debug run library://sylabsed/examples/lolcow

Failure Logs

/usr/bin/lua: /opt/ohpc/admin/lmod/lmod/libexec/lmod:61: module 'posix' not found:
    no field package.preload['posix']
    no file '/usr/share/lua/5.3/posix.lua'
    no file '/usr/share/lua/5.3/posix/init.lua'
    no file '/usr/lib64/lua/5.3/posix.lua'
    no file '/usr/lib64/lua/5.3/posix/init.lua'
    no file '/usr/lib64/lua/5.3/posix.so'
    no file '/usr/lib64/lua/5.3/loadall.so'
stack traceback:
    [C]: in function 'require'
    /opt/ohpc/admin/lmod/lmod/libexec/lmod:61: in main chunk
    [C]: in ?
/usr/bin/lua: /opt/ohpc/admin/lmod/lmod/libexec/lmod:61: module 'posix' not found:
    no field package.preload['posix']
    no file '/usr/share/lua/5.3/posix.lua'
    no file '/usr/share/lua/5.3/posix/init.lua'
    no file '/usr/lib64/lua/5.3/posix.lua'
    no file '/usr/lib64/lua/5.3/posix/init.lua'
    no file '/usr/lib64/lua/5.3/posix.so'
    no file '/usr/lib64/lua/5.3/loadall.so'
stack traceback:
    [C]: in function 'require'
    /opt/ohpc/admin/lmod/lmod/libexec/lmod:61: in main chunk
    [C]: in ?
DEBUG   [U=1070,P=264172]  persistentPreRun()            Singularity version: 3.7.2-1.el8
DEBUG   [U=1070,P=264172]  persistentPreRun()            Parsing configuration file /etc/singularity/singularity.conf
DEBUG   [U=1070,P=264172]  handleConfDir()               /home/tanlin2013/.singularity already exists. Not creating.
DEBUG   [U=1070,P=264172]  getCacheParentDir()           environment variable SINGULARITY_CACHEDIR not set, using default image cache
DEBUG   [U=1070,P=264172]  apiGet()                      apiGet calling v1/images/sylabsed/examples/lolcow:latest?arch=amd64
FATAL   [U=1070,P=264172]  replaceURIWithImage()         Unable to handle library://sylabsed/examples/lolcow uri: error making request to server:
    Get "https://library.sylabs.io/v1/images/sylabsed/examples/lolcow:latest?arch=amd64": dial tcp: lookup library.sylabs.io on [::1]:53: read udp [::1]:44473->[::1]:53: read: connection refused

Possible Reference

https://curc.readthedocs.io/en/latest/compute/modules.html

tanlin2013 commented 2 years ago

Updates:

For some reason module load does work in the command line environment, though lmod can't find singularity.

[tanlin2013@scopion ~]$ module load singularity
Lmod has detected the following error: The following module(s) are unknown: "singularity"

Please check the spelling or version number. Also try "module spider ..."
It is also possible your cache file is out-of-date; it may help to try:
  $ module --ignore_cache load "singularity"

Also make sure that all modulefiles written in TCL start with the string #%Module