-
Notifications
You must be signed in to change notification settings - Fork 54
Add new GPU workflow #949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
laraPPr
wants to merge
2
commits into
EESSI:2023.06-software.eessi.io
Choose a base branch
from
laraPPr:GPU_build_action
base: 2023.06-software.eessi.io
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add new GPU workflow #949
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import re | ||
|
||
missing = os.environ['missing'] | ||
missing = missing.split('\n') | ||
missing_cuda = [] | ||
missing_cpu = [] | ||
for ec in missing: | ||
if re.search('CUDA', ec): | ||
missing_cuda.append(ec) | ||
else: | ||
missing_cpu.append(ec) | ||
if len(missing_cpu) != 0 and len(missing_cuda) != 0: | ||
print(f'Please open a seperate pr for these dependencies: {missing_cpu}') | ||
os.write(2, b'Error: CPU dependencies for CUDA build must be build in a seperate pr') | ||
exit(1) | ||
elif len(missing_cuda) != 0: | ||
# TODO: Make this set the accelorator label? | ||
print(f'Have fun installing the following gpu builds: {missing_cuda}') | ||
elif len(missing_cpu) != 0: | ||
print(f'Have fun installing the following gpu builds: {missing_cpu}') | ||
else: | ||
print('no missing modules') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
name: Check for CUDA builds in changed easystacks | ||
on: | ||
push: | ||
branches: [ "*-software.eessi.io" ] | ||
pull_request: | ||
workflow_dispatch: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
env: | ||
EESSI_ACCELERATOR_TARGETS: | | ||
x86_64/amd/zen2: | ||
- nvidia/cc80 | ||
x86_64/amd/zen3: | ||
- nvidia/cc80 | ||
jobs: | ||
check_missing: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
EESSI_VERSION: | ||
- 2023.06 | ||
EESSI_SOFTWARE_SUBDIR_OVERRIDE: | ||
- x86_64/amd/zen2 | ||
- x86_64/amd/zen3 | ||
- x86_64/amd/zen4 | ||
- x86_64/intel/haswell | ||
- x86_64/intel/skylake_avx512 | ||
- x86_64/generic | ||
steps: | ||
- name: Check out software-layer repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Mount EESSI CernVM-FS pilot repository | ||
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 | ||
with: | ||
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb | ||
cvmfs_http_proxy: DIRECT | ||
cvmfs_repositories: software.eessi.io | ||
- name: find changed easystacks | ||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #v3.0.2 | ||
id: changes | ||
with: | ||
list-files: shell | ||
filters: | | ||
changed: | ||
- 'easystacks/**' | ||
- name: Test check_missing_installations.sh script | ||
if: ${{ steps.changes.outputs.changed == 'true' }} | ||
run: | | ||
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}} | ||
source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash | ||
# set $EESSI_CPU_FAMILY to the CPU architecture that corresponds to $EESSI_SOFTWARE_SUBDIR_OVERRIDE (part before the first slash), | ||
# to prevent issues with checks in the Easybuild configuration that use this variable | ||
export EESSI_CPU_FAMILY=${EESSI_SOFTWARE_SUBDIR_OVERRIDE%%/*} | ||
module load EasyBuild | ||
which eb | ||
eb --version | ||
export EESSI_PREFIX=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}} | ||
export EESSI_OS_TYPE=linux | ||
env | grep ^EESSI | sort | ||
|
||
# check for missing installations if a file in the easystacks directory is changed | ||
echo "check for missing installation in changed easystack files" | ||
easystack_files=(${{ steps.changes.outputs.changed_files }}) | ||
|
||
for easystack_file in ${easystack_files[@]}; do | ||
echo "check missing installatios for ${easystack_file}..." | ||
./check_missing_installations.sh ${easystack_file} || ec=$? | ||
export eb_missing_out=$(./check_missing_installations.sh ${easystack_file}) | ||
if [[ ${ec} -ne 0 ]]; then | ||
echo "missing installations found for ${easystack_file}!" >&2 | ||
export missing=$(env | grep .eb\) | tr -d \*) | ||
python .github/workflows/parse_missing-installations-output.py | ||
fi | ||
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work, it only sets
ec
if the script did not exit successfullyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is what I want otherwise the workflow stops. And than this error message does not get printed
"missing installations found for ${easystack_file}!"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tested it with an easystack were everything was already installed and that went fine as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can test again to see if I overlooked something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no your right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok than I'll have to find another way around it