Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 24 additions & 39 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,56 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecards supply-chain security
name: Scorecard analysis workflow
on:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '25 15 * * 3'
push:
# Only the default branch is supported.
branches:
- 'main'

# Declare default permissions as read only.
- main
schedule:
# Weekly on Saturdays.
- cron: '30 1 * * 6'
permissions: read-all

jobs:
analysis:
if: github.repository_owner == 'EESSI' # Prevent running on forks
name: Scorecards analysis
runs-on: ubuntu-24.04
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
# Needed for Code scanning upload
security-events: write
# Needed to publish results and get a badge (see publish_results below).
# Needed for GitHub OIDC token if publish_results is true
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
# Scorecard team runs a weekly scan of public GitHub repos,
# see https://github.com/ossf/scorecard#public-data.
# Setting `publish_results: true` helps us scale by leveraging your workflow to
# extract the results instead of relying on our own infrastructure to run scans.
# And it's free for you!
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
# Upload the results as artifacts (optional). Commenting out will disable
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/upload-sarif@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
sarif_file: results.sarif
5 changes: 3 additions & 2 deletions .github/workflows/tests_archdetect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:
- aarch64/google/axion/GCP-axion
- riscv64/sifive/p550/premier-Ubuntu24
- riscv64/sifive/u74-mc/starvision-Ubuntu24
- riscv64/spacemit/bananaf3-Armbian
- riscv64/spacemit/bananaf3-k6.6
- riscv64/spacemit/x60/bananaf3-Armbian
- riscv64/spacemit/x60/bananaf3-k6.6
- riscv64/spacemit/x100/fireflyk3-Ubuntu26
- riscv64/rva20u64
- riscv64/rva22u64
- riscv64/rva23u64
Expand Down
8 changes: 7 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,8 @@ def pre_configure_hook_petsc(self, *args, **kwargs):
if self.name == 'PETSc':
# only necessary for PETSc 3.24.0+
if LooseVersion(self.version) >= LooseVersion('3.24.0'):
self.cfg.update('configopts', '--with-zlib-dir=${EESSI_EPREFIX}/usr')
compat_layer_topdir = get_eessi_envvar('EESSI_EPREFIX')
self.cfg.update('configopts', f'--with-zlib-dir={compat_layer_topdir}/usr')
else:
raise EasyBuildError("PETSc-specific hook triggered for non-PETSc easyconfig?!")

Expand Down Expand Up @@ -2485,6 +2486,11 @@ def set_maximum(parallel, max_value):
'*': (divide_by_factor, 2),
CPU_TARGET_A64FX: (set_maximum, 1),
},
'PETSc': {
# PETSc test suite can be quite memory hungry,
# so reduce parallelism when running tests (also impacts build)
'*': (divide_by_factor, 2),
},
'QuantumESPRESSO': {
CPU_TARGET_A64FX: (set_maximum, 6),
},
Expand Down
2 changes: 2 additions & 0 deletions init/arch_specs/eessi_arch_riscv.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
# sifive/u74-mc <- tests/.../sifive/u74-mc/starvision-Ubuntu24.cpuinfo
# spacemit/x60 <- tests/.../spacemit/bananaf3-Armbian.cpuinfo
# spacemit/x60-k6.6 <- tests/.../spacemit/bananaf3-k6.6.cpuinfo
# spacemit/x100 <- tests/.../spacemit/x100/fireflyk3-Ubuntu26.cpuinfo

# Software path in EESSI | Vendor ID | List of defining CPU features
"riscv64/rva20u64" "" "rv64imafdc zicsr zicntr zifencei"
Expand All @@ -49,3 +50,4 @@
"riscv64/sifive/u74-mc" "0x489" "rv64imafdc zicntr zicsr zifencei zihpm zca zcd zba zbb" # full measured VisionFive 2 isa
"riscv64/spacemit/x60" "0x710" "rv64imafdcv sscofpmf sstc svpbmt zicbom zicboz zicbop zihintpause" # full Armbian-short isa
"riscv64/spacemit/x60-k6.6" "0x710" "rv64imafdcv zicbom zicboz zicntr zicond zicsr zifencei zihintpause zihpm zfh zfhmin zca zcd zba zbb zbc zbs zkt zve32f zve32x zve64d zve64f zve64x zvfh zvfhmin zvkt sscofpmf sstc svinval svnapot svpbmt" # full k6.6 isa
"riscv64/spacemit/x100" "0x710" "rv64imafdcvh zicbom zicbop zicboz zicntr zicond zicsr zifencei zihintntl zihintpause zihpm zimop zaamo zalrsc zawrs zfa zfh zfhmin zca zcb zcd zcmop zba zbb zbc zbs zkt zvbb zvbc zve32f zve32x zve64d zve64f zve64x zvfh zvfhmin zvkb zvkg zvkned zvknha zvknhb zvksed zvksh zvkt smaia smstateen ssaia sscofpmf sstc svinval svnapot svpbmt sdtrig"
22 changes: 22 additions & 0 deletions init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,28 @@ cpupath(){
fi
done

# Some Intel microarchitectures are flag-indistinguishable from an older one because their
# new features are not exposed in /proc/cpuinfo. Granite Rapids (Xeon 6) shows the exact same
# visible flags as Sapphire/Emerald Rapids (its extras like amx_fp16 are hidden by the kernel),
# so the flag match above lands on 'sapphirerapids'. Refine using the CPU model number - the
# only reliable discriminator on Linux. If no dedicated graniterapids subdir is shipped yet,
# downstream subdir resolution falls back to the next entry in the chain, so prepending is safe.
if [ "${best_arch_match}" == "x86_64/intel/sapphirerapids" ]; then
local cpu_family=$(get_cpuinfo "cpu[ _]family")
local cpu_model=$(get_cpuinfo "model")
log "DEBUG" "cpupath: refining Sapphire Rapids match (family='$cpu_family', model='$cpu_model')"
# Intel family 6 model numbers below come from the kernel's authoritative table
# arch/x86/include/asm/intel-family.h (what the kernel itself uses for model dispatch):
# INTEL_GRANITERAPIDS_X = IFM(6, 0xAD) -> family 6, model 173 (Granite Rapids-SP/AP)
# INTEL_GRANITERAPIDS_D = IFM(6, 0xAE) -> family 6, model 174 (Granite Rapids-D)
# (cf. INTEL_SAPPHIRERAPIDS_X = 0x8F/143, INTEL_EMERALDRAPIDS_X = 0xCF/207)
if [ "${cpu_family}" == "6" ] && { [ "${cpu_model}" == "173" ] || [ "${cpu_model}" == "174" ]; }; then
best_arch_match="x86_64/intel/graniterapids"
all_arch_matches="$best_arch_match:$all_arch_matches"
log "DEBUG" "cpupath: model $cpu_model identifies Granite Rapids; best match upgraded to $best_arch_match"
fi
fi

if [ "allx" == "${CPUPATH_RESULT}x" ]; then
log "INFO" "cpupath: all matches for host CPU: $all_arch_matches"
echo "$all_arch_matches"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
riscv64/spacemit/x100:riscv64/spacemit/x60-k6.6:riscv64/spacemit/x60:riscv64/rva23u64:riscv64/rva22u64:riscv64/rva20u64:riscv64/generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
processor : 0
hart : 0
model name : Spacemit(R) X100
isa : rv64imafdcvh_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintntl_zihintpause_zihpm_zimop_zaamo_zalrsc_zawrs_zfa_zfh_zfhmin_zca_zcb_zcd_zcmop_zba_zbb_zbc_zbs_zkt_zvbb_zvbc_zve32f_zve32x_zve64d_zve64f_zve64x_zvfh_zvfhmin_zvkb_zvkg_zvkned_zvknha_zvknhb_zvksed_zvksh_zvkt_smaia_smstateen_ssaia_sscofpmf_sstc_svinval_svnapot_svpbmt_sdtrig
mmu : sv39
mvendorid : 0x710
marchid : 0x8000000058000002
mimpid : 0x33d8a600
hart isa : rv64imafdcvh_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintntl_zihintpause_zihpm_zimop_zaamo_zalrsc_zawrs_zfa_zfh_zfhmin_zca_zcb_zcd_zcmop_zba_zbb_zbc_zbs_zkt_zvbb_zvbc_zve32f_zve32x_zve64d_zve64f_zve64x_zvfh_zvfhmin_zvkb_zvkg_zvkned_zvknha_zvknhb_zvksed_zvksh_zvkt_smaia_smstateen_ssaia_sscofpmf_sstc_svinval_svnapot_svpbmt_sdtrig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
riscv64/spacemit/x100
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x86_64/intel/graniterapids:x86_64/intel/sapphirerapids:x86_64/intel/icelake:x86_64/intel/cascadelake:x86_64/intel/skylake_avx512:x86_64/intel/haswell:x86_64/generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 173
model name : Intel(R) Xeon(R) 6973P-C
stepping : 1
microcode : 0xffffffff
cpu MHz : 4200.428
cache size : 491520 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 36
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch tpr_shadow ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves user_shstk avx_vnni avx512_bf16 vnmi avx512vbmi umip waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid cldemote movdiri movdir64b fsrm serialize tsxldtrk ibt amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
vmx flags : vnmi invvpid ept_x_only ept_ad ept_1gb ept_5level tsc_offset vtpr ept vpid unrestricted_guest ept_mode_based_exec tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs retbleed bhi spectre_v2_user its
bogomips : 5199.99
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 57 bits virtual
power management:
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x86_64/intel/graniterapids