@@ -49,7 +49,10 @@ apt upgrade -y
49
49
apt install -y build-essential g++-11 gcc-11 gfortran-11 g++-12 gcc-12 gfortran-12 g++-13 gcc-13 gfortran-13 make cmake automake autoconf apt-utils
50
50
51
51
# Install other requirements.
52
- apt install -y cpp-11 libgomp1 git git-lfs autopoint mysql-server libmysqlclient-dev qtbase5-dev qt5-qmake libqt5svg5-dev qt5dxcb-plugin wget curl file tcl-dev gnupg2 iproute2 locales unzip less bzip2 gettext libtree pkg-config libcurl4-openssl-dev mysql-server libtool flex
52
+ apt install -y cpp-11 libgomp1 git git-lfs autopoint mysql-server libmysqlclient-dev qtbase5-dev qt5-qmake libqt5svg5-dev qt5dxcb-plugin wget curl file tcl-dev gnupg2 iproute2 locales unzip less bzip2 gettext libtree pkg-config libcurl4-openssl-dev mysql-server libtool flex llvm-14
53
+
54
+ # Set llvm config.
55
+ update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-14 10
53
56
54
57
# Editors
55
58
apt install -y vim nano
@@ -227,12 +230,46 @@ apt install intel-oneapi-compiler-dpcpp-cpp-2024.2 intel-oneapi-compiler-fortran
227
230
exit
228
231
```
229
232
233
+ #### Setup OneAPI Modules
234
+
235
+ ``` bash
236
+ sudo su -
237
+ # Create all modulefiles.
238
+ /opt/intel/oneapi/modulefiles-setup.sh --output-dir=/opt/intel/oneapi/modulefiles
239
+
240
+ # Add the oneapi module files to lmod init (confirm that this file does not exist)
241
+ cat << 'EOF ' >> /etc/profile.d/z01_lmod.sh
242
+ module use /opt/intel/oneapi/modulefiles
243
+ EOF
244
+
245
+ # Create combined module file.
246
+ mkdir /opt/intel/oneapi/modulefiles/intel-oneapi-full-env/
247
+ cat << 'EOF ' >> /opt/intel/oneapi/modulefiles/intel-oneapi-full-env/2024.2.1
248
+ #%Module1.0
249
+ ##
250
+ ## intel-oneapi-full-env/2024.2.1
251
+ ## Intel oneAPI full module environment
252
+
253
+ proc ModulesHelp { } {
254
+ puts stderr "intel-oneapi-full-env defines the entire module set used for spack-stack intel builds"
255
+ }
256
+ module-whatis "intel-oneapi-full-env defines the entire module set used for spack-stack intel builds"
257
+ module load tbb/2021.13
258
+ module load compiler-rt/2024.2.1
259
+ module load compiler/2024.2.1
260
+ module load ifort/2024.2.1
261
+ module load mpi/2021.13
262
+ module load mkl/2024.2
263
+ module load compiler-intel-llvm/2024.2.1
264
+ EOF
265
+ ```
266
+
230
267
#### Install Intel OneAPI Spack-Stack Environment
231
268
232
269
``` bash
233
270
sudo su -
234
271
235
- source /opt/ intel/ oneapi/setvars.sh
272
+ module load intel- oneapi-full-env/2024.2.1
236
273
237
274
cd /opt/spack-stack
238
275
source ./setup.sh
@@ -256,12 +293,12 @@ cat << 'EOF' >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
256
293
gcc:
257
294
buildable: false
258
295
externals:
259
- - spec: gcc@13.3 .0
296
+ - spec: gcc@11.4 .0
260
297
prefix: /usr
261
298
gcc-runtime:
262
299
buildable: false
263
300
externals:
264
- - spec: gcc-runtime@13.3 .0
301
+ - spec: gcc-runtime@11.4 .0
265
302
prefix: /usr
266
303
intel-oneapi-mkl:
267
304
buildable: false
@@ -297,13 +334,17 @@ EOF
297
334
298
335
spack compiler find --scope system
299
336
300
- # Replace ifx with ifort
337
+ # Edit site/compilers.yaml
338
+ pico ${PWD} /site/compilers.yaml
339
+ # 1) Replace ifx with ifort.
340
+ # 2) Add "- intel-oneapi-full-env/2024.2.1" to the modules section for oneapi.
341
+ # 3) Disable gcc compilers other than 11.4.0
301
342
sed -i ' s/ifx/ifort/g' ${PWD} /site/compilers.yaml
302
343
303
344
unset SPACK_SYSTEM_CONFIG_PATH
304
345
305
346
spack config add
" packages:all:providers:mpi:[[email protected] ]"
306
- spack config add
" packages:all:compiler:[[email protected] , gcc@13.3 .0]"
347
+ spack config add
" packages:all:compiler:[[email protected] , gcc@11.4 .0]"
307
348
spack config add " packages:gmake:buildable:False"
308
349
309
350
spack concretize 2>&1 | tee log.concretize
@@ -353,7 +394,7 @@ ctest
353
394
354
395
``` bash
355
396
# Re-source the intel OneAPI environment
356
- source /opt/ intel/ oneapi/setvars.sh
397
+ module load intel- oneapi-full-env/2024.2.1
357
398
358
399
# Example given for building jedi-bundle
359
400
module use /opt/spack-stack/envs/unified-env-oneapi/install/modulefiles/Core
0 commit comments