**NOTE**: it is crucial to fix the `spack` version to have the identical SW packages versions (different Spack versions will have different preferred versions of packages, .e.g Spack v0.17.1 will install cuda@11.5.0, while the current spack master will install cuda@11.6.1).
The above command will clone Spack in the directory you have created beforehand (you can clone it in a different directory).
# Generate a specific version of gcc:
Now, we will install a specific compiler (e.g. `gcc@9.4.0`) using the default compiler available in the system employed.
```
spack install -j 32 gcc@9.4.0
```
Then, we add the generated compiler to spack :
```
spack load gcc@9.4.0
spack compiler find
```
Finally, we generate the definitive (the one we will use), by installing it again using itself as a seed:
```
spack install -j 32 gcc@9.4.0 %gcc@9.4.0
```
# Create a Spack environment for WSClean (+IDG)
Clone the `schaap-spack` repo in the repos folder of spack:
This results in a ~/spack/var/spack/environments/gcc-940/spack.yaml file. **Fill it as follows (fill the field inside the angular brackets with the appropriate content**):