@@ -66,8 +66,9 @@ The `make` command tripped over the compilation of `core.cpp` that failed becaus
66
66
67
67
OK fine, but now what? Can you spot something suspicious here?
68
68
Wait a minute... Why is ` make ` using ` /usr/bin/g++ ` for the compilation?!
69
- That's not where our toolchain compiler is installed,
70
- that's somewhere under ` /opt/cray/pe/gcc ` .
69
+ Aren't we using ` g++-13 ` these days?
70
+ (Or before the ` gcc-native ` modules: That's not where our toolchain compiler is installed,
71
+ that's somewhere under ` /opt/cray/pe/gcc ` .)
71
72
72
73
Let's see what ` /usr/bin/g++ ` is:
73
74
@@ -82,7 +83,7 @@ the base version, 7.1, is really from May 2, 2017, long before the Zen2 architec
82
83
That could definitely explain why it doesn't know about the Zen2 architecture yet...
83
84
84
85
Your next step in this case should probably be figuring
85
- out why ` /usr/bin/g++ ` is being used rather than just ` g++ ` , which would
86
+ out why ` /usr/bin/g++ ` is being used rather than the ` CC ` compiler wrapper , which would
86
87
result in using the right compiler version because EasyBuild sets up the build
87
88
environment carefully.
88
89
@@ -126,13 +127,13 @@ directory for successful installation, into the `easybuild` subdirectory.
126
127
For example:
127
128
128
129
```
129
- /appl/lumi/SW/LUMI-21.12 /L/EB/ncurses/6.2 -cpeGNU-21.12 /easybuild/easybuild-ncurses-6.2-20220302.110244 .log
130
+ /appl/lumi/SW/LUMI-24.03 /L/EB/ncurses/6.4 -cpeGNU-24.03 /easybuild/easybuild-ncurses-6.4-20240912.211604 .log
130
131
```
131
132
132
133
### Last log
133
134
134
135
The ` eb ` command supports a handy little option that prints the location
135
- to the most recently updated build log. You can leverage this to quickly
136
+ to the most recently updated build log: ` --last-log ` . You can leverage this to quickly
136
137
open the build log of the last *** failed*** EasyBuild session in an editor:
137
138
138
139
```
@@ -232,15 +233,15 @@ version = '2.0.1'
232
233
homepage = ' http://subread.sourceforge.net'
233
234
description = " High performance read alignment, quantification and mutation discovery"
234
235
235
- toolchain = {' name' : ' PrgEnv-gnu' , ' version' : ' 21.10 ' }
236
+ toolchain = {' name' : ' PrgEnv-gnu' , ' version' : ' 24.02 ' }
236
237
237
238
# download from https://download.sourceforge.net/subread/subread-2.0.1-source.tar.gz
238
239
sources = [' subread-%(version)s -source.tar.gz' ]
239
240
checksums = [' d808eb5b1823c572cb45a97c95a3c5acb3d8e29aa47ec74e3ca1eb345787c17b' ]
240
241
241
242
start_dir = ' src'
242
243
243
- # -fcommon is required to compile Subread 2.0.1 with GCC 10/11 ,
244
+ # -fcommon is required to compile Subread 2.0.1 from GCC 10 onwards ,
244
245
# which uses -fno-common by default (see https://www.gnu.org/software/gcc/gcc-10/porting_to.html)
245
246
buildopts = ' -f Makefile.Linux CFLAGS="-fast -fcommon"'
246
247
@@ -269,14 +270,14 @@ and that the EasyBuild-user module is loaded (unless you installed EasyBuild
269
270
yourself):
270
271
271
272
```
272
- module load LUMI/21.12
273
+ module load LUMI/24.03
273
274
module load EasyBuild-user
274
275
```
275
276
276
277
This will configure EasyBuild correctly for this exercise, though if you already have
277
278
an existing EasyBuild user installation you may want to work in a different one
278
279
by pointing ` $EBU_USER_PREFIX ` to the desired work directory before loading
279
- ` LUMI/21.12 ` .
280
+ ` LUMI/24.03 ` .
280
281
281
282
Check your configuration via ` eb --show-config ` .
282
283
@@ -305,8 +306,8 @@ the toolchain here...
305
306
```
306
307
$ eb subread.eb
307
308
...
308
- ERROR: Failed to process easyconfig /pfs/lustrep3 /users/kurtlust /easybuild-tutorial/Troubleshooting/ subread.eb: Toolchain PrgEnv-gnu not found,
309
- available toolchains: ...
309
+ ERROR: Failed to process easyconfig /pfs/lustrep4 /users/kulust /easybuild-tutorial/subread.eb:
310
+ Toolchain PrgEnv-gnu not found, available toolchains: ...
310
311
...
311
312
```
312
313
@@ -330,6 +331,12 @@ the toolchain here...
330
331
also built for the LUMI toolchains. Those are called `cpeCray`, `cpeGNU`, `cpeAOCC` and `cpeAMD`
331
332
and are maintained by LUST and available via the LUMI repositories.
332
333
334
+ In this example, we should have used `cpeGNU` as the toolchain and not `PrgEnv-gnu`:
335
+
336
+ ```python
337
+ toolchain = {'name': 'cpeGNU', 'version': '24.02'}
338
+ ```
339
+
333
340
Note: Depending on how you use EasyBuild you may now first run into the problem of Exercise T.2 or
334
341
first run into the problem covered by Exercise T.3.
335
342
@@ -352,9 +359,10 @@ the easyconfig file?
352
359
```
353
360
$ eb subread.eb
354
361
...
355
- == FAILED: Installation ended unsuccessfully (build directory: /run/user/XXXXXXXX/easybuild/build/Subread/2.0.1/cpeGNU-21.12): build failed (first 300 chars):
356
- Couldn't find file subread-2.0.1-source.tar.gz anywhere, and downloading it didn't work either...
357
- Paths attempted (in order): ...
362
+ == FAILED: Installation ended unsuccessfully (build directory:
363
+ /run/user/327000143/easybuild/build/Subread/2.0.1/cpeGNU-24.03): build failed
364
+ (first 300 chars): Couldn't find file subread-2.0.1-source.tar.gz anywhere,
365
+ and downloading it didn't work either... Paths attempted (in order): ...
358
366
```
359
367
360
368
In this case, the problem is that the easyconfig file does not specify
@@ -377,7 +385,10 @@ the easyconfig file?
377
385
(assuming you have set `EBU_USER_PREFIX`, otherwise replace `$EBU_USER_PREFIX` with
378
386
`$HOME/EasyBuild`).
379
387
380
- Or, we can change the easyconfig file to specify the location where
388
+ The problem with this approach is that everybody who wants to use this EasyBuild recipe,
389
+ would have to do that (unless we place the source file in the system source file repository).
390
+ Of course it should be possible to do better.
391
+ We can change the easyconfig file to specify the location where
381
392
the easyconfig file can be downloaded from:
382
393
```python
383
394
source_urls = ['https://download.sourceforge.net/subread/']
@@ -393,7 +404,7 @@ the easyconfig file?
393
404
```shell
394
405
$ ls -lh $EBU_USER_PREFIX/sources/s/Subread
395
406
total 23M
396
- -rw-rw-r-- 1 XXXXXXXX XXXXXXXX 23M Mar 30 16:08 subread-2.0.1-source.tar.gz
407
+ -rw-rw-r-- 1 XXXXXXXX XXXXXXXX 23M May 5 19:24 subread-2.0.1-source.tar.gz
397
408
```
398
409
399
410
---
@@ -411,32 +422,34 @@ the toolchain here...
411
422
412
423
??? success "(click to show solution)"
413
424
414
- The installation fails because the easyconfig specifies that `PrgEnv-gnu/21.12 `
425
+ The installation fails because the easyconfig specifies that `cpeGNU/23.10 `
415
426
should be used as toolchain:
416
427
417
428
```shell
418
429
$ eb subread.eb
419
430
...
420
431
ERROR: Build of /pfs/lustrep3/users/kurtlust/easybuild-tutorial/Troubleshooting/subread.eb failed (err: 'build failed (first 300 chars):
421
- No module found for toolchain: cpeGNU/21 .10')
432
+ No module found for toolchain: cpeGNU/23 .10')
422
433
...
423
434
```
424
435
425
- We don't have this `cpeGNU` version installed, but we do have `cpeGNU/21.12 `:
436
+ We don't have this `cpeGNU` version installed, but we do have `cpeGNU/24.03 `:
426
437
427
438
```shell
428
- $ module avail cpeGNU/
429
- ----- Infrastructure modules for the software stack LUMI/21.12 on LUMI-L -----
430
- cpeGNU/21.12
439
+ $ module spider cpeGNU/
440
+ ----- Infrastructure modules for the software stack LUMI/24.03 on LUMI-L -----
441
+ cpeGNU/24.03
431
442
...
432
443
```
433
444
445
+ (and obviously we should have known since we are installing in `LUMI/24.03`.)
446
+
434
447
So let's try using that instead.
435
448
436
449
Edit the easyconfig file so it contains this:
437
450
438
451
```python
439
- toolchain = {'name': 'cpeGNU', 'version': '21.12 '}
452
+ toolchain = {'name': 'cpeGNU', 'version': '24.03 '}
440
453
```
441
454
442
455
---
@@ -452,10 +465,12 @@ Can you fix the next problem you run into?
452
465
The compilation fails, but the error message we see is incomplete due to
453
466
EasyBuild truncating the command output (only the 300 first characters of the output are shown):
454
467
```
455
- == FAILED: Installation ended unsuccessfully (build directory: /run/user/10012026/easybuild/build/Subread/2.0.1/cpeGNU-21.12): build failed
456
- (first 300 chars): cmd " make -j 256 -f Makefile.Linux CFLAGS="-fast -fcommon"" exited with exit code 2 and output:
457
- gcc -mtune=core2 -O3 -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\""2.0.1"\" -D_FILE_OFFSET_BITS=64 -fmessage-length=0
458
- -ggdb -fast -fcommon -I/opt/cray/pe/libsci/21.08.1.2/GNU/9.1/x86 (took 4 secs)
468
+ == FAILED: Installation ended unsuccessfully (build directory:
469
+ /run/user/327000143/easybuild/build/Subread/2.0.1/cpeGNU-24.03): build failed (first 300 chars):
470
+ cmd "make -j 16 -f Makefile.Linux CFLAGS="-fast -fcommon"" exited with exit code 2 and output:
471
+ gcc -mtune=core2 -O3 -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\""2.0.1"\"
472
+ -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -ggdb -fast -fcommon
473
+ -I/opt/cray/pe/libsci/24.03.0/GNU/12.3/x86_6 (took 5 secs)
459
474
```
460
475
461
476
If you open the log file (e.g., with `view $(eb --last-log)`) and scroll to the end,
@@ -467,7 +482,7 @@ Can you fix the next problem you run into?
467
482
468
483
The easyconfig file hard specifies the `-fast` compiler flag via the `CFLAGS` argument to the build command:
469
484
```python
470
- # -fcommon is required to compile Subread 2.0.1 with GCC 10,
485
+ # -fcommon is required to compile Subread 2.0.1 from GCC 10 onwards ,
471
486
# which uses -fno-common by default (see https://www.gnu.org/software/gcc/gcc-10/porting_to.html)
472
487
buildopts = '-f Makefile.Linux CFLAGS="-fast -fcommon"'
473
488
```
@@ -476,7 +491,7 @@ Can you fix the next problem you run into?
476
491
to hard specify compiler flags (certainly not incorrect ones).
477
492
The comment above the `buildopts` definition makes it clear that the `-fcommon`
478
493
flag *is* required though, because GCC 10 became a bit stricter by
479
- using `-fno-common` by default (and we're using GCC 11 in `cpeGNU/21.12 `).
494
+ using `-fno-common` by default (and we're using GCC 13 in `cpeGNU/24.03 `).
480
495
Note that we are using `-fcommon`
481
496
as an escape mechanism here: it would be better to fix the source code
482
497
and create a patch file instead.
@@ -502,20 +517,20 @@ Can you fix the next problem you run into?
502
517
503
518
Defining build environment...
504
519
505
- export BLAS_INC_DIR='/opt/cray/pe/libsci/21.08.1.2 /GNU/9.1 /x86_64/include'
520
+ export BLAS_INC_DIR='/opt/cray/pe/libsci/24.03.0 /GNU/12.3 /x86_64/include'
506
521
...
507
522
export CC='cc'
508
523
export CFLAGS='-O2 -ftree-vectorize -fno-math-errno'
509
524
...
510
525
[build_step method]
511
- running command "make -j 256 -f Makefile.Linux CFLAGS="$CFLAGS -fcommon""
512
- (in /run/user/10012026/easybuild/ build/Subread/2.0.1/cpeGNU-21.12 /Subread-2.0.1/src)
526
+ running command "make -j 16 -f Makefile.Linux CFLAGS="$CFLAGS -fcommon""
527
+ (in /rXXXX/ build/Subread/2.0.1/cpeGNU-24.03 /Subread-2.0.1/src)
513
528
...
514
529
```
515
530
516
531
EasyBuild will launch the command
517
532
```
518
- make -j 256 -f Makefile.Linux CFLAGS="$CFLAGS -fcommon"
533
+ make -j 16 -f Makefile.Linux CFLAGS="$CFLAGS -fcommon"
519
534
```
520
535
in a shell where `CFLAGS` is defined and set to an appropriate value (determined by
521
536
defaults in EasyBuild, settings in the EasyBuild configuration and settings in the
@@ -534,12 +549,14 @@ Don't give up now, try one last time and fix the last problem that occurs...
534
549
535
550
Now the installation itself works but the sanity check fails,
536
551
and hence the module file does not get generated:
552
+
537
553
```
538
554
$ eb subread.eb
539
555
...
540
- == FAILED: Installation ended unsuccessfully (build directory: /run/user/10012026/easybuild/build/Subread/2.0.1/cpeGNU-21.12):
541
- build failed (first 300 chars): Sanity check failed: sanity check command featureCounts --version exited with code 255
542
- (output: featureCounts: unrecognized option '--version'
556
+ == FAILED: Installation ended unsuccessfully (build directory:
557
+ /run/user/327000143/easybuild/build/Subread/2.0.1/cpeGNU-24.03): build failed (first 300 chars):
558
+ Sanity check failed: sanity check command featureCounts --version exited with code 255 (output:
559
+ featureCounts: unrecognized option '--version'
543
560
...
544
561
...
545
562
```
@@ -566,14 +583,14 @@ Don't give up now, try one last time and fix the last problem that occurs...
566
583
567
584
*** Exercise T.6**** - Post-install check of the log file*
568
585
569
- In the end, you should be able to install Subread 2.0.1 with the cpeGNU 21.12 toolchain by
586
+ In the end, you should be able to install Subread 2.0.1 with the cpeGNU 24.03 toolchain by
570
587
fixing the problems with the ` subread.eb ` easyconfig file.
571
588
572
589
Check your work by manually loading the module and checking the version
573
590
via the ` featureCounts ` command, which should look like this:
574
591
575
592
``` shell
576
- $ module load Subread/2.0.1-cpeGNU-21.12
593
+ $ module load Subread/2.0.1-cpeGNU-24.03
577
594
...
578
595
$ featureCounts -v
579
596
featureCounts v2.0.1
@@ -602,8 +619,8 @@ eb subread.eb -f
602
619
603
620
(the last line to force a rebuild).
604
621
605
- Now go to the ` $EBU_USER_PREFIX/SW/LUMI-21.12 /L/Subread/2.0.1-cpeGNU-21.12 /easybuild `
606
- (or ` $HOME/EasyBuild/SW/LUMI-21.12 /L/Subread/2.0.1-cpeGNU-21.12 /easybuild ` , depending on your configuration,) directory and open
622
+ Now go to the ` $EBU_USER_PREFIX/SW/LUMI-24.03 /L/Subread/2.0.1-cpeGNU-24.03 /easybuild `
623
+ (or ` $HOME/EasyBuild/SW/LUMI-24.03 /L/Subread/2.0.1-cpeGNU-24.03 /easybuild ` , depending on your configuration,) directory and open
607
624
the log file in your favourite editor. Search for the build step by searching for the string
608
625
` INFO Starting build ` and look carefully at how the program was actually build...
609
626
@@ -632,7 +649,7 @@ the tutorial, but try to figure out what could be wrong first though...
632
649
run into (yours may differ since this is a parallel build) is
633
650
634
651
```
635
- gcc -mtune=core2 -O3 -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\""2.0.1"\" -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -ggdb -O2 -ftree-vectorize -fno-math-errno -fcommon -I/opt/cray/pe/libsci/21.08.1.2 /GNU/9.1 /x86_64/include -c -o core.o core.c
652
+ gcc -mtune=core2 -O3 -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\""2.0.1"\" -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -ggdb -O2 -ftree-vectorize -fno-math-errno -fcommon -I/opt/cray/pe/libsci/24.03.0 /GNU/12.3 /x86_64/include -c -o core.o core.c
636
653
```
637
654
638
655
The flags that we added via `CFLAGS` are in there but only after some other flags.
@@ -658,7 +675,7 @@ the tutorial, but try to figure out what could be wrong first though...
658
675
a regular way.
659
676
660
677
```
661
- pushd $EASYBUILD_BUILDPATH/Subread/2.0.1/cpeGNU-21.12
678
+ pushd $EASYBUILD_BUILDPATH/Subread/2.0.1/cpeGNU-24.03
662
679
cd subread-2.0.1-source
663
680
cd src
664
681
```
@@ -741,7 +758,7 @@ the tutorial, but try to figure out what could be wrong first though...
741
758
directory) and check what happened now during the build step.
742
759
743
760
As we scroll through the output of the build step, we still see a few lines mentioning
744
- `gcc `... It turns out there is a second Makefile hidden in the subdirectory `longread-one` so we
761
+ `-mtune=core2 -O3 -Wall `... It turns out there is a second Makefile hidden in the subdirectory `longread-one` so we
745
762
need to edit that one too... So following the second approach we can do this with
746
763
747
764
```python
0 commit comments