-
Notifications
You must be signed in to change notification settings - Fork 570
Expand file tree
/
Copy pathpackage.py
More file actions
787 lines (727 loc) · 36.4 KB
/
package.py
File metadata and controls
787 lines (727 loc) · 36.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import pathlib
import platform
import warnings
from spack_repo.builtin.build_systems.compiler import CompilerPackage
from spack_repo.builtin.build_systems.oneapi import IntelOneApiPackage
from spack.package import *
versions = [
{
"version": "2025.3.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0d61d48a-4fe8-4cb2-bd9d-94d2c19c6227/intel-dpcpp-cpp-compiler-2025.3.2.26_offline.sh",
"sha256": "37d6c9c22f90fbb4d2072fd45d0284f2b6b1ffd030d699e1e7a669087d093396",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3e53d136-2870-4836-adb1-892b558fa34a/intel-fortran-compiler-2025.3.2.25_offline.sh",
"sha256": "c64d20d70a277b1249d2ba9221be7245a843f3988df9076b4456619fe5929278",
},
},
{
"version": "2025.3.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5adfc398-db78-488c-b98f-78461b3c5760/intel-dpcpp-cpp-compiler-2025.3.1.16_offline.sh",
"sha256": "b0e8920fa390302133b0e92784389ae383806d8414c48ae8b9e2f2ed1ad72471",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/724303ca-6927-4327-a560-e0aabb55b010/intel-fortran-compiler-2025.3.1.16_offline.sh",
"sha256": "13138cca7df96469d7f707428de6e2cf23a98a49ac01ea0b80c7623c0f474d43",
},
},
{
"version": "2025.3.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/44809add-596f-4484-9cd1-cc032460e241/intel-dpcpp-cpp-compiler-2025.3.0.322_offline.sh",
"sha256": "a85dc98ac76d16522d387cf62dc3b712b863779cb74520d8e37ea282ea02ef63",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b3aa3ab5-c79d-4af4-8801-983ef00b90fd/intel-fortran-compiler-2025.3.0.325_offline.sh",
"sha256": "ede518607ce625051321989c843af9cebdbdc9ab07c8dbb2f011463e4e18678b",
},
},
{
"version": "2025.2.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/95aea65e-ead3-402f-838c-53d9f7bbaf3c/intel-dpcpp-cpp-compiler-2025.2.2.10_offline.sh",
"sha256": "f143aa4df3ce4add7efb795ae53482120407009607bc8924fb25b9325b5ed39f",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/05fdb0f1-5c91-4bdc-af11-cf7afe0c02fe/intel-fortran-compiler-2025.2.2.10_offline.sh",
"sha256": "8ddd51baab30e3370ab41ce2ad38d4c3a1455d2354715ccc7392d4b655ba6bc9",
},
},
{
"version": "2025.2.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/04c5fd98-57e6-4a4b-be4d-e84de3aea45a/intel-dpcpp-cpp-compiler-2025.2.1.7_offline.sh",
"sha256": "028ef9e2176289bab6b9d19828199d26cb6cd91babdcfcece7a9dd00c5a50376",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/466b0d65-e502-4172-9e06-24c565029b96/intel-fortran-compiler-2025.2.1.9_offline.sh",
"sha256": "75165cc737d164cda2c068e0d8ec4f269f005a50bc2e254cd3cab6fdd063e145",
},
},
{
"version": "2025.2.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/39c79383-66bf-4f44-a6dd-14366e34e255/intel-dpcpp-cpp-compiler-2025.2.0.527_offline.sh",
"sha256": "aea3c1ccb97728db138b4f11f771411264292ba7bbec313782229510c9b831bc",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2c69ab6a-dfff-4d8f-ae1c-8368c79a1709/intel-fortran-compiler-2025.2.0.534_offline.sh",
"sha256": "3808000bbcef15f17b608156b956e0114393a1b64ee6d9fb29be06450fa40083",
},
},
{
"version": "2025.1.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c4d2aef3-3123-475e-800c-7d66fd8da2a5/intel-dpcpp-cpp-compiler-2025.1.1.9_offline.sh",
"sha256": "63ea61f54a5ea9d30059ea499697e04953915ef317c0e8fc457077b690c726df",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0e4735b3-8721-422b-b204-00eefe413bfd/intel-fortran-compiler-2025.1.1.10_offline.sh",
"sha256": "c59060a5b959fb0faeb1cde349689086da41d491adb41fd6c97177fcf59bf957",
},
},
{
"version": "2025.1.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cd63be99-88b0-4981-bea1-2034fe17f5cf/intel-dpcpp-cpp-compiler-2025.1.0.573_offline.sh",
"sha256": "53489afcc9534e30ad807e94b158abfccf6a7eb3658f59655122d92fbad8fa72",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/577ebc28-d0f6-492b-9a43-b04354ce99da/intel-fortran-compiler-2025.1.0.601_offline.sh",
"sha256": "27016329dede8369679f22b4e9f67936837ce7972a1ef4f5c76ee87d7c963c81",
},
},
{
"version": "2025.0.4",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/84c039b6-2b7d-4544-a745-3fcf8afd643f/intel-dpcpp-cpp-compiler-2025.0.4.20_offline.sh",
"sha256": "0537c6e462fe74063cb0b9209a0fd5c0ca3a29b4520d43d382ae27fb3f98b375",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ad42ee3b-7a2f-41cb-b902-689f651920da/intel-fortran-compiler-2025.0.4.21_offline.sh",
"sha256": "ad453f1dd68111e7cf7053d6f86fa26d982bd9ab61982cbb6dbe5195fb6feedb",
},
},
{
"version": "2025.0.3",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1cac4f39-2032-4aa9-86d7-e4f3e40e4277/intel-dpcpp-cpp-compiler-2025.0.3.9_offline.sh",
"sha256": "0ca834002b9091dc9988da6798a2eb36ebc5933d8d523ed0fa78a55744c88823",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fafa2df1-4bb1-43f7-87c6-3c82f1bdc712/intel-fortran-compiler-2025.0.3.9_offline.sh",
"sha256": "1ad813cf6495ded730646d6c4fd065dcc840875fdea28fcc6bac2cafb8d22c8d",
},
},
{
"version": "2025.0.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4fd7c6b0-853f-458a-a8ec-421ab50a80a6/intel-dpcpp-cpp-compiler-2025.0.1.46_offline.sh",
"sha256": "1595397566b59a5c8f81e2c235b6bedd2405dc70309b5bf00ed75827d0f12449",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7ba31291-8a27-426f-88d5-8c2d65316655/intel-fortran-compiler-2025.0.1.41_offline.sh",
"sha256": "aa54f019ad8db79f716f880c72784dc117d64e525e4c3b62717bd9d18a6c9060",
},
},
{
"version": "2025.0.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ac92f2bb-4818-4e53-a432-f8b34d502f23/intel-dpcpp-cpp-compiler-2025.0.0.740_offline.sh",
"sha256": "04fadf63789acee731895e631db63f65a98b8279db3d0f48bdf0d81e6103bdd8",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/69f79888-2d6c-4b20-999e-e99d72af68d4/intel-fortran-compiler-2025.0.0.723_offline.sh",
"sha256": "2be6d607ce84f35921228595b118fbc516d28587cbc4e6dcf6b7219e5cd1a9a9",
},
"nvidia-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2025.0.0&filters[]=12.0&filters[]=linux",
"sha256": "264a43d2e07c08eb31d6483fb1c289a6b148709e48e9a250efc1b1e9a527feb6",
},
"amd-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2025.0.0&filters[]=6.1.0&filters[]=linux",
"sha256": "2c5a147e82f0e995b9c0457b53967cc066d5741d675cb64cb9eba8e3c791a064",
},
},
{
"version": "2024.2.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/74587994-3c83-48fd-b963-b707521a63f4/l_dpcpp-cpp-compiler_p_2024.2.1.79_offline.sh",
"sha256": "af0243f80640afa94c7f9c8151da91d7ab17f448f542fa76d785230dec712048",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5e7b0f1c-6f25-4cc8-94d7-3a527e596739/l_fortran-compiler_p_2024.2.1.80_offline.sh",
"sha256": "6f6dab82a88082a7a39f6feb699343c521f58c6481a1bb87edba7e2550995b6d",
},
"nvidia-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.1&filters[]=12.0&filters[]=linux",
"sha256": "2c377027c650291ccd8267cbf75bd3d00c7b11998cc59d5668a02a0cbc2c015f",
},
"amd-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.1&filters[]=6.1.0&filters[]=linux",
"sha256": "fbeb64f959f907cbf3469f4e154b2af6d8ff46fe4fc667c811e04f3872a13823",
},
},
{
"version": "2024.2.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/6780ac84-6256-4b59-a647-330eb65f32b6/l_dpcpp-cpp-compiler_p_2024.2.0.495_offline.sh",
"sha256": "9463aa979314d2acc51472d414ffcee032e9869ca85ac6ff4c71d39500e5173d",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/801143de-6c01-4181-9911-57e00fe40181/l_fortran-compiler_p_2024.2.0.426_offline.sh",
"sha256": "fd19a302662b2f86f76fc115ef53a69f16488080278dba4c573cc705f3a52ffa",
},
"nvidia-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=2024.2.0&filters[]=12.0&filters[]=linux",
"sha256": "0622df0054364b01e91e7ed72a33cb3281e281db5b0e86579f516b1cc5336b0f",
},
"amd-plugin": {
"url": "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=2024.2.0&filters[]=6.1.0&filters[]=linux",
"sha256": "d1e9d30fa92f3ef606f054d8cbd7c338b3e46f6a9f8472736e29e8ccd9e50688",
},
},
{
"version": "2024.1.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2e562b6e-5d0f-4001-8121-350a828332fb/l_dpcpp-cpp-compiler_p_2024.1.0.468_offline.sh",
"sha256": "534ecc6e4b690c9011d7765cbe178f520aa8f49c0eb4ea80ea1415e48e5d7cf7",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fd9342bd-7d50-442c-a3e4-f41974e14396/l_fortran-compiler_p_2024.1.0.465_offline.sh",
"sha256": "30a02bad9a96a543c60f3bfa4238dfe07c2d26d76fc22ba9aa9b7c603e11f1b9",
},
},
{
"version": "2024.0.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/bb99984f-370f-413d-bbec-38928d2458f2/l_dpcpp-cpp-compiler_p_2024.0.2.29_offline.sh",
"sha256": "0ec22d69f4207fea4b7488d1c9e62adbc14fb6daa1574d6edcadc912da007b3c",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/41df6814-ec4b-4698-a14d-421ee2b02aa7/l_fortran-compiler_p_2024.0.2.28_offline.sh",
"sha256": "396ac4fbcb3799d5c1a866a60cf81f85f7cab8c6f35289f61c5cda63c7101b5e",
},
},
{
"version": "2024.0.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/c68c8f0a-47f5-4f26-8e8e-fa2627271279/l_dpcpp-cpp-compiler_p_2024.0.1.29_offline.sh",
"sha256": "22497c46bfb916c82677489775c113141510423799b7eca35f35dffeb2a14104",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/4eedf77e-e097-40de-b62d-5fb70efecb59/l_fortran-compiler_p_2024.0.1.31_offline.sh",
"sha256": "9d49ecc1862c60eb0627bfdd80d63a47118095af0ff5adeeda10ec36aaffc82c",
},
},
{
"version": "2024.0.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/5c8e686a-16a7-4866-b585-9cf09e97ef36/l_dpcpp-cpp-compiler_p_2024.0.0.49524_offline.sh",
"sha256": "d10bad2009c98c631fbb834aae62012548daeefc806265ea567316cd9180a684",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/89b0fcf9-5c00-448a-93a1-5ee4078e008e/l_fortran-compiler_p_2024.0.0.49493_offline.sh",
"sha256": "57faf854b8388547ee4ef2db387a9f6f3b4d0cebd67b765cf5e844a0a970d1f9",
},
},
{
"version": "2023.2.4",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b00a4b0e-bd21-41fa-ab34-19e8e2a77c5a/l_dpcpp-cpp-compiler_p_2023.2.4.24_offline.sh",
"sha256": "f143a764adba04a41e49ec405856ad781e5c3754812e90a7ffe06d08cd07f684",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/5bfaa204-689d-4bf1-9656-e37e35ea3fc2/l_fortran-compiler_p_2023.2.4.31_offline.sh",
"sha256": "2f327d67cd207399b327df5b7c912baae800811d0180485ef5431f106686c94b",
},
},
{
"version": "2023.2.3",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d85fbeee-44ec-480a-ba2f-13831bac75f7/l_dpcpp-cpp-compiler_p_2023.2.3.12_offline.sh",
"sha256": "b80119a3e54306b85198e907589b00b11c072f107ac39c1686a1996f76466b26",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0ceccee5-353c-4fd2-a0cc-0aecb7492f87/l_fortran-compiler_p_2023.2.3.13_offline.sh",
"sha256": "ef8d95b7165d42da8576bf89a100bd21be7253d0aec039ff76c9213fa2aa9c62",
},
},
{
"version": "2023.2.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/ebf5d9aa-17a7-46a4-b5df-ace004227c0e/l_dpcpp-cpp-compiler_p_2023.2.1.8_offline.sh",
"sha256": "f5656b2f5bb5d904639e6ef1f90a2d2e760d2906e82ebc0dd387709738ca714b",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/0d65c8d4-f245-4756-80c4-6712b43cf835/l_fortran-compiler_p_2023.2.1.8_offline.sh",
"sha256": "d4e36abc014c184698fec318a127f15a696b5333b3b0282aba1968b351207185",
},
},
{
"version": "2023.2.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/748687b0-5a22-467c-86c6-c312fa0206b2/l_dpcpp-cpp-compiler_p_2023.2.0.49256_offline.sh",
"sha256": "21497b2dd2bc874794c2321561af313082725f61e3101e05a050f98b7351e08f",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/237236c4-434b-4576-96ac-020ceeb22619/l_fortran-compiler_p_2023.2.0.49254_offline.sh",
"sha256": "37c0ad6f0013512d98e385f8708ca29b23c45fddc9ec76069f1d93663668d511",
},
},
{
"version": "2023.1.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/89283df8-c667-47b0-b7e1-c4573e37bd3e/l_dpcpp-cpp-compiler_p_2023.1.0.46347_offline.sh",
"sha256": "3ac1c1179501a2646cbb052b05426554194573b4f8e2344d7699eed03fbcfa1d",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/150e0430-63df-48a0-8469-ecebff0a1858/l_fortran-compiler_p_2023.1.0.46348_offline.sh",
"sha256": "7639af4b6c928e9e3ba92297a054f78a55f4f4d0db9db0d144cc6653004e4f24",
},
},
{
"version": "2023.0.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19123/l_dpcpp-cpp-compiler_p_2023.0.0.25393_offline.sh",
"sha256": "473eb019282c2735d65c6058f6890e60b79a5698ae18d2c1e4489fed8dd18a02",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19105/l_fortran-compiler_p_2023.0.0.25394_offline.sh",
"sha256": "fd7525bf90646c8e43721e138f29c9c6f99e96dfe5648c13633f30ec64ac8b1b",
},
},
{
"version": "2022.2.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19049/l_dpcpp-cpp-compiler_p_2022.2.1.16991_offline.sh",
"sha256": "3f0f02f9812a0cdf01922d2df9348910c6a4cb4f9dfe50fc7477a59bbb1f7173",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18998/l_fortran-compiler_p_2022.2.1.16992_offline.sh",
"sha256": "64f1d1efbcdc3ac2182bec18313ca23f800d94f69758db83a1394490d9d4b042",
},
},
{
"version": "2022.2.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18849/l_dpcpp-cpp-compiler_p_2022.2.0.8772_offline.sh",
"sha256": "8ca97f7ea8abf7876df6e10ce2789ea8cbc310c100ad7bf0b5ffccc4f3c7f2c9",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18909/l_fortran-compiler_p_2022.2.0.8773_offline.sh",
"sha256": "4054e4bf5146d55638d21612396a19ea623d22cbb8ac63c0a7150773541e0311",
},
},
{
"version": "2022.1.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18717/l_dpcpp-cpp-compiler_p_2022.1.0.137_offline.sh",
"sha256": "1027819581ba820470f351abfc2b2658ff2684ed8da9ed0e722a45774a2541d6",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18703/l_fortran-compiler_p_2022.1.0.134_offline.sh",
"sha256": "583082abe54a657eb933ea4ba3e988eef892985316be13f3e23e18a3c9515020",
},
},
{
"version": "2022.0.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18478/l_dpcpp-cpp-compiler_p_2022.0.2.84_offline.sh",
"sha256": "ade5bbd203e7226ca096d7bf758dce07857252ec54e83908cac3849e6897b8f3",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18481/l_fortran-compiler_p_2022.0.2.83_offline.sh",
"sha256": "78532b4118fc3d7afd44e679fc8e7aed1e84efec0d892908d9368e0c7c6b190c",
},
},
{
"version": "2022.0.1",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18435/l_dpcpp-cpp-compiler_p_2022.0.1.71_offline.sh",
"sha256": "c7cddc64c3040eece2dcaf48926ba197bb27e5a46588b1d7b3beddcdc379926a",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18436/l_fortran-compiler_p_2022.0.1.70_offline.sh",
"sha256": "2cb28a04f93554bfeffd6cad8bd0e7082735f33d73430655dea86df8933f50d1",
},
},
{
"version": "2021.4.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18209/l_dpcpp-cpp-compiler_p_2021.4.0.3201_offline.sh",
"sha256": "9206bff1c2fdeb1ca0d5f79def90dcf3e6c7d5711b9b5adecd96a2ba06503828",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18210/l_fortran-compiler_p_2021.4.0.3224_offline.sh",
"sha256": "de2fcf40e296c2e882e1ddf2c45bb8d25aecfbeff2f75fcd7494068d621eb7e0",
},
},
{
"version": "2021.3.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17928/l_dpcpp-cpp-compiler_p_2021.3.0.3168_offline.sh",
"sha256": "f848d81b7cabc76c2841c9757abb2290921efd7b82491d830605f5785600e7a1",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17959/l_fortran-compiler_p_2021.3.0.3168_offline.sh",
"sha256": "c4553f7e707be8e8e196f625e4e7fbc8eff5474f64ab85fc7146b5ed53ebc87c",
},
},
{
"version": "2021.2.0",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17749/l_dpcpp-cpp-compiler_p_2021.2.0.118_offline.sh",
"sha256": "5d01cbff1a574c3775510cd97ffddd27fdf56d06a6b0c89a826fb23da4336d59",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17756/l_fortran-compiler_p_2021.2.0.136_offline.sh",
"sha256": "a62e04a80f6d2f05e67cd5acb03fa58857ee22c6bd581ec0651c0ccd5bdec5a1",
},
},
{
"version": "2021.1.2",
"cpp": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17513/l_dpcpp-cpp-compiler_p_2021.1.2.63_offline.sh",
"sha256": "68d6cb638091990e578e358131c859f3bbbbfbf975c581fd0b4b4d36476d6f0a",
},
"ftn": {
"url": "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17508/l_fortran-compiler_p_2021.1.2.62_offline.sh",
"sha256": "29345145268d08a59fa7eb6e58c7522768466dd98f6d9754540d1a0803596829",
},
},
]
@IntelOneApiPackage.update_description
class IntelOneapiCompilers(IntelOneApiPackage, CompilerPackage):
"""Intel oneAPI Compilers. Includes: icx, icpx, ifx, and ifort.
Releases before 2024.0 include icc/icpc"""
maintainers("rscohn2")
homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi.html"
compiler_languages = ["c", "cxx", "fortran"]
c_names = ["icx"]
cxx_names = ["icpx"]
fortran_names = ["ifx"]
compiler_version_argument = "--version"
compiler_version_regex = (
r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
)
debug_flags = ["-debug", "-g", "-g0", "-g1", "-g2", "-g3"]
opt_flags = ["-O", "-O0", "-O1", "-O2", "-O3", "-Ofast", "-Os"]
openmp_flag = "-fiopenmp"
compiler_wrapper_link_paths = {
"c": os.path.join("oneapi", "icx"),
"cxx": os.path.join("oneapi", "icpx"),
"fortran": os.path.join("oneapi", "ifx"),
}
implicit_rpath_libs = [
"libirc",
"libifcore",
"libifcoremt",
"libirng",
"libsvml",
"libintlc",
"libimf",
"libsycl",
"libOpenCL",
]
stdcxx_libs = ("-cxxlib",)
provides("c", "cxx")
provides("fortran")
def _standard_flag(self, *, language, standard):
flags = {
"cxx": {
"11": "-std=c++11",
"14": "-std=c++14",
"17": "-std=c++17",
"20": "-std=c++20",
},
"c": {"99": "-std=c99", "11": "-std=c1x"},
}
return flags[language][standard]
# See https://github.com/spack/spack/issues/39252
depends_on("patchelf@:0.17", type="build", when="@:2024.1")
# Add the nvidia variant
variant("nvidia", default=False, description="Install NVIDIA plugin for OneAPI")
conflicts("@:2022.2.1", when="+nvidia", msg="Codeplay NVIDIA plugin requires newer release")
# Add the amd variant
variant("amd", default=False, description="Install AMD plugin for OneAPI")
conflicts("@:2022.2.1", when="+amd", msg="Codeplay AMD plugin requires newer release")
depends_on("gcc languages=c,c++", type="run")
for v in versions:
version(v["version"], expand=False, **v["cpp"])
if "ftn" in v:
resource(
name="fortran-installer",
placement="fortran-installer",
when="@{0}".format(v["version"]),
expand=False,
**v["ftn"],
)
if "nvidia-plugin" in v:
resource(
name="nvidia-plugin-installer",
placement="nvidia-plugin-installer",
when="@{0}+nvidia".format(v["version"]),
expand=False,
**v["nvidia-plugin"],
)
if "amd-plugin" in v:
resource(
name="amd-plugin-installer",
placement="amd-plugin-installer",
when="@{0}+amd".format(v["version"]),
expand=False,
**v["amd-plugin"],
)
@property
def v2_layout_versions(self):
return "@2024:"
@property
def component_dir(self):
return "compiler"
@property
def _llvm_bin(self):
return self.component_prefix.bin if self.v2_layout else self.component_prefix.linux.bin
@property
def _classic_bin(self):
return (
self.component_prefix.bin
if self.v2_layout
else self.component_prefix.linux.bin.intel64
)
@property
def compiler_search_prefix(self):
return self._llvm_bin
def setup_run_environment(self, env: EnvironmentModifications) -> None:
"""Adds environment variables to the generated module file.
These environment variables come from running:
.. code-block:: console
$ source {prefix}/{component}/{version}/env/vars.sh
and from setting CC/CXX/F77/FC
"""
super().setup_run_environment(env)
# umf is packaged with compiler and not available as a standalone
if "~envmods" not in self.spec and self.spec.satisfies("@2025:"):
env.extend(
EnvironmentModifications.from_sourcing_file(
self.prefix.umf.latest.env.join("vars.sh"), *self.env_script_args
)
)
env.set("CC", self._llvm_bin.icx)
env.set("CXX", self._llvm_bin.icpx)
env.set("F77", self._llvm_bin.ifx)
env.set("FC", self._llvm_bin.ifx)
def setup_dependent_build_environment(
self, env: EnvironmentModifications, dependent_spec: Spec
) -> None:
super().setup_dependent_build_environment(env, dependent_spec)
# workaround bug in icpx driver where it requires sycl-post-link is on the PATH
# It is located in the same directory as the driver. Error message:
# clang++: error: unable to execute command:
# Executable "sycl-post-link" doesn't exist!
# also ensures that shared objects and libraries required by the compiler,
# e.g. libonnx, can be found succesfully
# due to a fix, this is no longer required for OneAPI versions >= 2024.2
if self.cxx and self.spec.satisfies("%oneapi@:2024.1"):
bin_dir = os.path.dirname(self.cxx)
lib_dir = os.path.join(os.path.dirname(bin_dir), "lib")
env.prepend_path("PATH", bin_dir)
env.prepend_path("LD_LIBRARY_PATH", lib_dir)
# 2024 release bumped the libsycl version because of an ABI
# change, 2024 compilers are required. You will see this
# error:
#
# /usr/bin/ld: warning: libsycl.so.7, needed by ...., not found
if self.spec.satisfies("%oneapi@:2023"):
for c in ["dnn"]:
if self.spec.satisfies(f"^intel-oneapi-{c}@2024:"):
warnings.warn(f"intel-oneapi-{c}@2024 SYCL APIs requires %oneapi@2024:")
def install(self, spec, prefix):
# Copy instead of install to speed up debugging
# install_tree("/opt/intel/oneapi/compiler", self.prefix)
# return
# install cpp
super().install(spec, prefix)
# install fortran
ftn = find("fortran-installer", "*")
if ftn:
self.install_component(ftn[0])
# Some installers have a bug and do not return an error code when failing
if not is_exe(self._llvm_bin.ifx):
raise RuntimeError("Fortran install failed")
# install nvidia-plugin
if self.spec.satisfies("+nvidia"):
nvidia_script = find("nvidia-plugin-installer", "*")
if nvidia_script:
if platform.system() == "Linux":
bash = Executable("bash")
# For NVIDIA plugin installer
bash(nvidia_script[0], "-y", "--install-dir", self.prefix)
if self.spec.satisfies("+amd"):
amd_script = find("amd-plugin-installer", "*")
if amd_script:
if platform.system() == "Linux":
bash = Executable("bash")
# For AMD plugin installer
bash(amd_script[0], "-y", "--install-dir", self.prefix)
@run_after("install")
def inject_rpaths(self):
# The oneapi compilers cannot find their own internal shared
# libraries. If you are using an externally installed oneapi,
# then you need to source setvars.sh, which will set
# LD_LIBRARY_PATH. If you are using spack to install the
# compilers, then we patch the binaries that have this
# problem. Over time, intel has corrected most of the
# issues. I am using the 2024 release as a milestone to stop
# patching everything and just patching the binaries that have
# a problem.
# 2024.2 no longer needs patching
if self.spec.satisfies("@2024.2:"):
return
# 2024 fixed all but these 2
patchelf = which("patchelf", required=True)
if self.spec.satisfies("@2024:"):
patchelf.add_default_arg("--set-rpath", self.component_prefix.lib)
patchelf(self.component_prefix.bin.join("sycl-post-link"))
patchelf(self.component_prefix.bin.compiler.join("llvm-spirv"))
return
# Sets rpath so the compilers can work without setting LD_LIBRARY_PATH.
patchelf.add_default_arg("--set-rpath", ":".join(self._ld_library_path()))
for pd in ["bin", "lib", join_path("compiler", "lib", "intel64_lin")]:
for file in find(self.component_prefix.linux.join(pd), "*", recursive=False):
# Try to patch all files, patchelf will do nothing and fail if file
# should not be patched
patchelf(file, fail_on_error=False)
def write_config_file(self, flags, path, compilers):
for compiler in compilers:
# Tolerate missing compilers.
# Initially, we installed icx/ifx/icc/ifort into a single prefix.
# Starting in 2024, there is no icc. 2023.2.3 does not have an ifx.
if os.path.exists(path.join(compiler)):
p = path.join(compiler + ".cfg")
with open(p, "w") as f:
f.write(" ".join(flags))
set_install_permissions(p)
@run_after("install")
def extend_config_flags(self):
# Extends compiler config files to inject additional compiler flags.
# Inject rpath flags to the runtime libraries.
# TODO: this uses a static string for the rpath argument, but should actually
# make sure that it matches the cc_rpath_arg etc. arguments defined in
# spack.compilers.oneapi and spack.compilers.intel (for now, these are
# inherited from spack.compilers.compiler.Compiler): these can theoretically be
# different for different compiler versions and for different languages (C,
# C++, and Fortran), but in practice are not.
# TODO: it is unclear whether we should really use all elements of
# _ld_library_path because it looks like the only rpath that needs to be
# injected is self.component_prefix.linux.compiler.lib.intel64_lin.
if self.v2_layout:
common_flags = ["-Wl,-rpath,{}".format(self.component_prefix.lib)]
else:
common_flags = ["-Wl,-rpath,{}".format(d) for d in self._ld_library_path()]
# Make sure that underlying clang gets the right GCC toolchain by default
gcc = self.spec["gcc"].package
llvm_flags = [f"--gcc-toolchain={gcc.prefix}"]
classic_flags = [f"-gcc-name={gcc.cc}", f"-gxx-name={gcc.cxx}"]
# Older versions trigger -Wunused-command-line-argument warnings whenever
# linker flags are passed in preprocessor (-E) or compilation mode (-c).
# The cfg flags are treated as command line flags apparently. Newer versions
# do not trigger these warnings. In some build systems these warnings can
# cause feature detection to fail, so we silence them with -Wno-unused-...
if self.spec.satisfies("@:2022.0"):
llvm_flags.append("-Wno-unused-command-line-argument")
self.write_config_file(common_flags + llvm_flags, self._llvm_bin, ["icx", "icpx"])
self.write_config_file(
common_flags + (llvm_flags if self.spec.satisfies("@2022.1.0:") else classic_flags),
self._llvm_bin,
["ifx"],
)
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["ifort"])
self.write_config_file(common_flags + classic_flags, self._classic_bin, ["icc", "icpc"])
def _ld_library_path(self):
# Returns an iterable of directories that might contain shared runtime libraries
# of the compilers themselves and the executables they produce.
for d in [
"lib",
join_path("lib", "x64"),
join_path("lib", "emu"),
join_path("lib", "oclfpga", "host", "linux64", "lib"),
join_path("lib", "oclfpga", "linux64", "lib"),
join_path("compiler", "lib", "intel64_lin"),
join_path("compiler", "lib"),
]:
p = join_path(self.component_prefix.linux, d)
if find(p, "*." + shared_library_suffix(self.spec), recursive=False):
yield p
def archspec_name(self):
return "oneapi"
@classmethod
def determine_variants(cls, exes, version_str):
variant, extra_attributes = super().determine_variants(exes, version_str)
bin_dirs = {pathlib.Path(x).parent for x in exes}
if len(bin_dirs) != 1:
dirs = ", ".join([str(x) for x in sorted(bin_dirs)])
raise RuntimeError(f"executables found in multiple dirs: {dirs}")
bin_dir = bin_dirs.pop()
# Some sites symlink the bindir to the top level of the prefix
if "compiler" in bin_dir.parts:
# Normal installation
prefix_parts = bin_dir.parts[: bin_dir.parts.index("compiler")]
else:
# Executables from top level bin dir as symlinks
prefix_parts = bin_dir.parts[:-1]
computed_prefix = pathlib.Path(*prefix_parts)
extra_attributes["prefix"] = str(computed_prefix)
return variant, extra_attributes
@classmethod
def runtime_constraints(cls, *, spec, pkg):
for language in ("c", "cxx", "fortran"):
pkg("*").depends_on(
f"intel-oneapi-runtime@{spec.version}:",
when=f"%[deptypes=build virtuals={language}] {spec.name}@{spec.versions}",
type="link",
description="Inject intel-oneapi-runtime when oneapi is used as "
f"a {language} compiler",
)
for fortran_virtual in ("fortran-rt", "libifcore@5"):
pkg("*").depends_on(
fortran_virtual,
when=f"%[deptypes=build virtuals=fortran] {spec.name}@{spec.versions}",
type="link",
description="Add a dependency on 'libifcore' for nodes compiled with "
f"{spec.name}@{spec.versions} and using the 'fortran' language",
)
# The version of intel-oneapi-runtime is the same as the %oneapi used to "compile" it
pkg("intel-oneapi-runtime").requires(
f"@{spec.versions}", when=f"%[deptypes=build] {spec.name}@{spec.versions}"
)
# If the compiler depends on gcc@X.Y, the runtime must depend on gcc-runtime@X.Y
if spec.satisfies("%gcc"):
try:
gcc = spec["gcc"]
pkg("intel-oneapi-runtime").requires(
f"@{spec.versions} %gcc-runtime@{gcc.version}",
when=f"%[deptypes=build] {spec.name}/{spec.dag_hash()}",
)
except (RuntimeError, KeyError):
# Externals may not have gcc as a dependency, but still satisfy %gcc
pass
# If a node used %intel-oneapi-runtime@X.Y its dependencies must use @:X.Y
# (technically @:X is broader than ... <= @=X but this should work in practice)
pkg("*").propagate(
f"intel-oneapi-compilers@:{spec.version}",
when=f"%[deptypes=build] {spec.name}@{spec.versions}",
)
def _cc_path(self):
return str(self._llvm_bin.icx)
def _cxx_path(self):
return str(self._llvm_bin.icpx)
def _fortran_path(self):
return str(self._llvm_bin.ifx)