HenrikBengtsson / CBI-software

A Scientific Software Stack for HPC (CentOS oriented)
https://wynton.ucsf.edu/hpc/software/software-repositories.html
5 stars 2 forks source link

R: conditional dependency on the 'scl-devtoolset' module #22

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

We're building R 4.1.0 with gcc 8.3.1 which requires the 'scl-devtoolset/8' module. However, we can't depend on that module when launching R on compute nodes, because they don't have the devtoolset SCL:s.

Task

Alternatively, if we drop the dependency, we need update the online instructions to mention that many CRAN and Bioconductor packages require a C++14 compliant version of gcc to be installed, which can be obtained by doing module load CBI scl-devtoolset/8 before starting R.

HenrikBengtsson commented 3 years ago

Something like:

    -- SCL devtoolset is not available on compute nodes
    if os.getenv("SLURM_CLUSTER_NAME") == "" then
      depends_on("scl-devtoolset/" .. gv)
    end

but a big hardcoded. Would be nicer if we could create a try_depends_on() function in Lua.

HenrikBengtsson commented 3 years ago

Solved for now as:

https://github.com/HenrikBengtsson/CBI-software/blob/1db83ba723ab9339c0af1fb28a04975b8d776ea9/CBI/r/module.lua.tmpl#L48-L50