-
Notifications
You must be signed in to change notification settings - Fork 76
Add Environment for GAMER on GitHub Action Runners #483
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
Open
technic960183
wants to merge
2
commits into
gamer-project:main
Choose a base branch
from
technic960183:gh-action-runner
base: main
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.
Open
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,39 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Install GAMER Environment for GitHub-hosted GitHub Actions runners | ||
| # This script installs dependencies needed to compile and run GAMER | ||
|
|
||
| set -e | ||
|
|
||
| echo "Installing GAMER dependencies..." | ||
|
|
||
| # Install OpenMPI, HDF5, and CUDA toolkit | ||
| sudo apt-get install -y openmpi-bin libopenmpi-dev libhdf5-dev nvidia-cuda-toolkit | ||
|
|
||
| echo "" | ||
| echo "Verifying installations..." | ||
| echo "MPI:" | ||
| which mpirun | ||
| which mpicxx | ||
| mpicxx --version | ||
|
|
||
| echo "" | ||
| echo "CUDA:" | ||
| which nvcc | ||
| nvcc --version | ||
|
|
||
| echo "" | ||
| echo "HDF5:" | ||
| h5cc -show | ||
|
|
||
| echo "" | ||
| echo "Configuring GAMER machine settings..." | ||
| cd "$(git rev-parse --show-toplevel)/tool/config" | ||
| bash set_settings.sh --local --machine=github_action | ||
|
|
||
| echo "" | ||
| echo "Verifying configuration..." | ||
| cat "$(git rev-parse --show-toplevel)/src/.local_settings" | ||
|
|
||
| echo "" | ||
| echo "GAMER environment setup complete!" |
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,33 @@ | ||
| name: "Copilot Setup Steps" | ||
|
|
||
| # Automatically run the setup steps when they are changed to allow for easy validation, and | ||
| # allow manual testing through the repository's "Actions" tab | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| - .github/install_gamer_env.sh | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| - .github/install_gamer_env.sh | ||
|
|
||
| jobs: | ||
| # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. | ||
| copilot-setup-steps: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Set the permissions to the lowest permissions possible needed for your steps. | ||
| # Copilot will be given its own token for its operations. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| # You can define any steps you want, and they will run before the agent starts. | ||
| # If you do not check out your code, Copilot will do this for you. | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup GAMER Environment | ||
| run: bash .github/install_gamer_env.sh |
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,33 @@ | ||
| # GitHub-hosted GitHub Actions runners (Ubuntu) | ||
| # https://docs.github.com/en/actions/reference/runners/github-hosted-runners | ||
|
|
||
| # 1. Paths | ||
| CUDA_PATH /usr | ||
| FFTW2_PATH /path/to/fftw2 | ||
| FFTW3_PATH /path/to/fftw3 | ||
| MPI_PATH /usr | ||
| HDF5_PATH /usr/lib/x86_64-linux-gnu/hdf5/serial | ||
| GRACKLE_PATH /path/to/grackle | ||
| GSL_PATH /path/to/gsl | ||
| LIBYT_PATH /path/to/libyt | ||
| CUFFTDX_PATH /path/to/cufftdx | ||
|
|
||
| # 2. Compiler type | ||
| CXX g++ # Serial compiler | ||
| CXX_MPI mpicxx # MPI compiler (The MPI_PATH/bin/ will be combined automatically) | ||
|
|
||
| # 3. Compiler flags | ||
| CXXFLAG -g | ||
| CXXFLAG -O2 | ||
|
|
||
| OPENMPFLAG -fopenmp | ||
|
|
||
| #LIBFLAG | ||
|
|
||
| NVCCFLAG_COM -O3 -I/usr/include/x86_64-linux-gnu/mpi | ||
| #NVCCFLAG_COM -use_fast_math | ||
| NVCCFLAG_FLU -Xptxas -dlcm=ca -prec-div=false -ftz=true | ||
| NVCCFLAG_POT -Xptxas -dlcm=ca | ||
|
|
||
| # 4. Set the GPU Compute Capability | ||
| GPU_COMPUTE_CAPABILITY 750 # NVIDIA Tesla T4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove trailing space. |
||
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.
Should we set either
FFTW2_PATHorFFTW3_PATHif we want to compile/run test problems that require gravity for CI/CD? The 1D Shock Tube and 3D Blast Wave tests do not rely on gravity, so they will work without these settings.