logo glicid


1. Guix summary

Guix allows you to immediately benefit from nearly 22,000 software packages. One of the benefits is to make the user completely autonomous in the installation of software (no administrator rights required). This operating mode is practical for an in-depth and rapid testing phase: no waiting for administrators to install the necessary software.

There is therefore no pre-installed software, strictly speaking, with the exception of Slurm. Each user can install what they need and have a completely different set of software than other users.

Guix even allows you to install many different versions of the same software, ad-hoc execution environments, cf. this part of the Guix documentation, or go back in time as explained here.

2. Basic software channels on GLiCID

Guix can install software based on different channels. The base channel contains over 20,000 packages. On the GLiCID cluster, additional channels are added to this database:

  • glicid: specific or optimized software for proper operation on the GLiCID cluster (for example, specific openMPI libraries)

  • glicid-non-free: non-open-source software or variations of basic software, but compiled or optimized with non-open-source libraries (such as cuda)

  • guix-hpc: additional software and libraries useful in a scientific computing context

  • guix-hpc-non-free: as above but concerning non-free software (such as cuda)

  • guix-past: old versions of software or libraries considered obsolete but which can be useful for compiling old software.

  • guix-science: another series of scientific software

  • guix-cran: complete CRAN archive (libraries for R)

  • guix-bimsb: bioinformatics software archive

  • guix-zpid: other scientific software

The user has the possibility to customize the list of channels if the need arises.

3. Installing Guix

Guix works equally well on all GLiCID machines (Nautilus or Waves cluster). The installed software is specific to each user and independent of the underlying operating system, which makes the solution very interesting in the case of a heterogeneous cluster.

Guix installs personalized for each user. A profile is created during The very first guix pull command.
This very first guix pull must be carried out from a native guix machine (guix-devel-001 for example) (Not Nautilus Login-node).

Once this is done, the profile is created (directories ~/.config/guix, ~/.guix-profile among others). On this occasion, an error may appear regarding a directory in /var/guix. This is recreated automatically, all you have to do is rerun the command.

4. Software installation

Guix can be used on all machines. On non-native Guix machines (RedHat 8 on Nautilus), you must load the Guix profile before you can use it:

source ~/.guix-profile/etc/profile
export GUIX_DAEMON_SOCKET="guix://guix-store.intra.glicid.fr"
export PATH=~/.config/guix/current/bin:$PATH
This can be done on Nautilus login node or node nautilus-devel-001 directly when you invoke the module guix/latest if the module is available
module load guix/latest
Reminder, see Installing Guix, the guix commands will only work if a Guix profile has already been initialized.

To install software, the steps to follow are as follows:

  1. guix pull is the first command to perform. It allows you to retrieve the list of packages available at the time of ordering. This command can be considered similar to apt update or yum update for distributions based on Debian or RedHat.

    This command actually does a lot more, (it retrieves a version history of all software from all channels and captures all dependencies between them). This is a complex process, which explains why the execution time of this command is much longer than the usual equivalents (several minutes).

    WARNING: At the end of the very first guix pull it is advisable to dislodge yourself from the front end, then relocate to take into account the new environment (and in particular the software specific to GLiCID). This only needs to be done the very first time.

  2. Install, with guix install, the minimum to compile software. For example, for software written in C: guix install gcc make glibc.

  3. Check what is installed in your current profile: guix package -I

  4. Check what is installable: guix package -A

  5. Check if software exists: guix search chemical to search in the description, guix package -A | grep -i gromacs to search the list of packages.

  6. Install the software if it is directly available from the Guix repositories: guix install gromacs. Otherwise, compile it.

  7. Run it with slurm: srun -p short my-software' or `sbatch my-batch.

Slurm is installed as standard on frontends and compute nodes.

Software installed in your Guix profile is shared and available across the cluster.

Software installation does not consume space on your /home. the software, just like user profiles, is stored in the Guix global store. On your /home there are only links to your profile (and these links point to the global store, which is common to everyone).

Guix allows much, much more. Refer to its complete documentation.

5. Special cases related to Guix for running jobs on the cluster.

The actual cluster is heterogeneous: the front-ends and the test machines (vm-compute) are machines installed with “Guix system”, while others (the budbud GPU machines of the short partition ) are currently Alma .6 systems. They do not use the same operating system, nor the same versions of libraries or system software. However, running a script via sbatch or srun from the front end to these machines with a different system will generally work transparently. Indeed, the software installed in your Guix profile is completely autonomous and independent of the underlying system and the user’s Guix profile is available on all machines in the cluster. This allows all software in YOUR Guix profile to run smoothly. These are the software programs that appear with the guix package -I command.

The exception is: software that is not in YOUR guix profile will not be available on redhat like machines. This may seem counterintuitive, but the basic frontend software (bash), common commands like ps or ls or even srun will not be. If the slurm submission scripts use such commands, then you must install them in your profile: guix install bash coreutils procps for example)
To find out if a program comes from the user profile or the underlying system, type which program. If it comes from /home/user/.guix-profile…, then it comes from the user’s profile and will work on all machines in the cluster. If it comes from /run/current-system/profile/ then it NOT comes from the user’s guix profile and will NOT work on other systems.

5.1. Illustration

$ which rsync
/home/dupont-y@univ-nantes.fr/.guix-profile/bin/rsync (1)

$ which ps
/run/current-system/profile/bin/ps (2)
1 is in the user profile
2 comes from the underlying system (and will not work on Centos machines)
~$ srun -p short rsync --version
srun: job 2044 queued and waiting for resources
srun: job 2044 has been allocated resources
rsync  version 3.2.7  protocol version 31 (1)
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/

$ srun -p short ps --version
srun: job 2047 queued and waiting for resources
srun: job 2047 has been allocated resources
slurmstepd: error: execve(): ps: No such file or directory (2)
srun: error: budbud015: task 0: Exited with exit code 2

$ guix install procps (3)
The following package will be installed:
   procps 4.0.3

$ srun -p short ps --version
srun: job 2050 queued and waiting for resources
srun: job 2050 has been allocated resources
ps from procps-ng 4.0.3 (3)
1 The software is available as expected
2 ps is not available in the user profile and therefore not found on CentOS machines
3 once installed in the user profile, everything works as expected

5.2. Find the source of the missing software

In Guix, all installed software is invariable, independent from others AND stored in a global repository, common to the entire cluster. Sometimes package names are self-explanatory, sometimes not. In case software is available in the system, it is easy to see where it comes from:

$ which tail
/run/current-system/profile/bin/tail (1)

$ ls -al /run/current-system/profile/bin/tail
lrwxrwxrwx 1 root root 66 Jan  1  1970 /run/current-system/profile/bin/tail -> /gnu/store/yr39rh6wihd1wv6gzf7w4w687dwzf3vb-coreutils-9.1/bin/tail (2)

$ guix install coreutils (3)
The following package will be installed:
   coreutils 9.1

The following derivation will be built:

building [...]

$ which tail
/home/dupont-y@univ-nantes.fr/.guix-profile/bin/tail (3)
1 the tail command comes from the system, not the user profile
2 the tail command comes from the coreutils package
3 by installing this package in its profile, the commands included in coreutils (including tail) will become usable across the entire cluster

6. Minimum profile to compile software in C with guix

guix install gcc-toolchain glibc binutils make. enought for compil a little «hello world».

you must understand that in reality, you do not install this software in your HOME, you just make them available in your main profile.

A more complete documentation is available here.

6.1. cuda projects

Cuda is a proprietary, non-free library, only available in binary format, by the will of the company that develops it (nvidia). This library is therefore not available as standard in Guix. As noted in the Basic software channels on GLiCID chapter, our installation adds specific channels to simplify the installation of such software. cuda is one of them and is therefore easily installable:
guix install cuda-toolkit

budbud nodes work under CENTOS 7.9. Programs compiled on frontends with Guix work perfectly provided you add a LD_LIBRARY_PATH path.

cf. the following example to launch a gromacs compiled with cuda (package gromacs+gpu):

LD_PRELOAD=/usr/lib64/libcuda.so.1 srun -p short -C gpu_a100 gmx -version

6.2. openmpi projects

It is recommended to use the openMPI strain specially usable on all GLiCID machines: openmpi-glicid

If the srun software is to be launched in a sbatch running on non-native Guix machines (budbud…), you must also install the slurm package: guix install slurm-glicid. The reason is explained in the “[software_profile_system]” chapter.

7. Pre-compiled binary programs and guix

When possible, it is therefore recommended to recompile the software (or to use its Guix version, which amounts to the same thing) rather than using binary versions of which we know nothing.

In the context of Guix, it is possible to run such a binary natively if the library names are compatible:

This procedure is at your own risk and may malfunction spectacularly: segfault or otherwise. There is no guarantee of proper functioning.
  • it is necessary to install in the execution context (the general user profile, or a dedicated profile with guix shell) the necessary libraries: for example, to run software that requires libstdc++ and libz, it is necessary to install these libraries AND include them in search paths:

guix install gcc:lib libzip (1)
1 to do only once
2 to do before each launch of the software

Or to better compartmentalize:

guix shell -CF bash coreutils gcc:lib libzip

In more complicated cases: - It is also possible to use podman or apptainer and run the binary in the execution context corresponding to what is expected.