Skip to content

Commit

Permalink
Merge changes due to pulling updates from the main Phantom repo. N.B.…
Browse files Browse the repository at this point in the history
… options for the EOS and cooling method have changed numbers.
  • Loading branch information
alisonkyoung1 committed Sep 19, 2024
2 parents 952a540 + 4e3c1b1 commit b6b62b4
Show file tree
Hide file tree
Showing 590 changed files with 31,411 additions and 13,120 deletions.
72 changes: 9 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
# schedule:
# - cron: "0 0 * * *"

env:
OMP_STACKSIZE: 512M
Expand All @@ -22,20 +20,17 @@ env:
WEB_SERVER: data.phantom.cloud.edu.au
WEB_HTML_DIR: /var/www/html
BUILD_LOG_DIR: /ci/build/logs
RSYNC_RSH: ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"
NPARALLEL: 32

jobs:
matrix_prep:
# Skip scheduled runs on forks
if: ${{ github.event_name != 'schedule' || github.repository == 'danieljprice/phantom' }}
runs-on: ubuntu-latest
outputs:
batch: ${{ steps.set-sequence.outputs.batch }}
nbatch: ${{ steps.set-sequence.outputs.nbatch }}
steps:
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Generate sequence of batch numbers for normal tests, or run sequentially for scheduled tests
id: set-sequence
run: |
Expand Down Expand Up @@ -67,51 +62,25 @@ jobs:
- name: "Nuke the github workspace before doing anything"
run: rm -r ${{ github.workspace }} && mkdir ${{ github.workspace }}

- name: Setup Intel repo
if: matrix.system == 'ifort'
id: intel-repo
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
INTELVERSION=$(apt-cache show intel-oneapi-compiler-fortran | grep Version | head -1)
echo "::set-output name=intelversion::$INTELVERSION"
- name: Cache intel installation
if: matrix.system == 'ifort'
id: cache-intel
uses: actions/cache@v3
with:
path: |
/opt/intel
key: ${{ steps.intel-repo.outputs.intelversion }}

- name: Install Intel compilers
if: ${{ steps.cache-intel.outputs.cache-hit != 'true' && matrix.system == 'ifort' }}
run: |
sudo apt-get install -y intel-oneapi-common-vars
sudo apt-get install -y intel-oneapi-compiler-fortran
sudo apt-get install -y intel-oneapi-mpi
sudo apt-get install -y intel-oneapi-mpi-devel
- name: Update package list
run: sudo apt-get update

- name: Setup Intel oneAPI environment
- name: Setup Intel compiler
if: matrix.system == 'ifort'
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
uses: fortran-lang/setup-fortran@v1
with:
compiler: intel-classic

- name: Install numpy and matplotlib for analysis unit tests
run: |
sudo apt-get install -y python3-numpy
sudo apt-get install -y python3-matplotlib
- name: "Clone phantom"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Grab a copy of splash source code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: danieljprice/splash
path: splash
Expand All @@ -120,36 +89,13 @@ jobs:
if: github.event_name == 'schedule'
run: mkdir logs

# - name: "Grab previous build logs from web server"
# if: github.event_name == 'schedule'
# env:
# WGET: wget --recursive --no-parent --reject "index.html*" --cut-dirs=2 --no-host-directories
# run: ${WGET} -A '*${{ matrix.system[1] }}.txt' http://${WEB_SERVER}${BUILD_LOG_DIR}/ || true

- name: "Run buildbot.sh"
run: ./buildbot.sh --maxdim 17000000 --url http://${WEB_SERVER}/${BUILD_LOG_DIR} --parallel ${{ matrix.batch }} ${{ env.NPARALLEL }}
working-directory: scripts
env:
SYSTEM: ${{ matrix.system }}
RETURN_ERR: yes

# - name: "Install SSH Key"
# if: github.event_name == 'schedule'
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.RUNNER_PRIVATE_KEY }}

# - name: "Copy new build logs to web server"
# if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
# run: rsync -vau logs/*.txt ${WEB_USER}@${WEB_SERVER}:${WEB_HTML_DIR}/${BUILD_LOG_DIR}

# - name: "Copy HTML files to web server"
# if: ${{ (success() || failure()) && github.event_name == 'schedule' }}
# run: |
# export WEB_BUILD_DIR=${WEB_HTML_DIR}/nightly/build/$(date "+%Y%m%d")
# ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" ${WEB_USER}@${WEB_SERVER} -- mkdir -p ${WEB_BUILD_DIR}
# rsync -vau logs/*.html ${WEB_USER}@${WEB_SERVER}:${WEB_BUILD_DIR}/

- name: logs/build-failures-${{ matrix.system }}.txt
if: always()
run: cat logs/build-failures-${{ matrix.system }}.txt || true
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/krome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: krome

# Trigger on pull request, but only for the master branch
on:
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'README.md'

env:
PREFIX: /usr/local/
PHANTOM_DIR: ${{ github.workspace }}
KROMEPATH: ${{ github.workspace }}/krome
FC: gfortran # default if not overwritten by matrix

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [{compiler: gcc}, {compiler: intel-classic}]
exclude:
- os: macos-latest
toolchain: {compiler: intel-classic}

steps:
- name: "Install gfortran compiler"
uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ matrix.toolchain.compiler }}

- name: "Clone phantom"
uses: actions/checkout@v4

- name: "Clone krome"
run: git clone https://bitbucket.org/tgrassi/krome.git krome

- name: "make krome.setup"
run: echo -e "-n=networks/react_AGBwind_nucleation\n-cooling=ATOMIC,CHEM,H2,CIE,Z,CI,CII,OI,OII,CO,OH,H2O,HCN\n-heating=CHEM,CR\n-H2opacity=RIPAMONTI\n-gamma=EXACT\n-noSinkCheck\n-noRecCheck\n-noTlimits\n-useX\n-conserveLin\n-useTabs\n-unsafe\n-iRHS" > krome.setup && cat krome.setup

- name: "Compile phantom and link with krome"
run: make SYSTEM=${{ env.FC }} SETUP=wind KROME=krome KROMEPATH=${KROMEPATH} PREFIX=${PREFIX} RUNDIR=${{ github.workspace }}

- name: "Compile phantomsetup and link with krome"
run: make SYSTEM=${{ env.FC }} SETUP=wind KROME=krome KROMEPATH=${KROMEPATH} PREFIX=${PREFIX} RUNDIR=${PREFIX} setup

- name: "Compile phantomanalysis and link with krome"
run: make SYSTEM=${{ env.FC }} SETUP=wind KROME=krome KROMEPATH=${KROMEPATH} PREFIX=${PREFIX} RUNDIR=${PREFIX} analysis

- name: "Compile phantommoddump and link with krome"
run: make SYSTEM=${{ env.FC }} SETUP=wind KROME=krome KROMEPATH=${KROMEPATH} PREFIX=${PREFIX} RUNDIR=${PREFIX} moddump
16 changes: 8 additions & 8 deletions .github/workflows/mcfost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'README.md'

env:
PREFIX: /usr/local/
PREFIX: /opt/homebrew
MCFOST_GIT: 1
SYSTEM: gfortran
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand All @@ -23,13 +23,13 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: install gfortran
run: brew install gfortran
- name: install gfortran compiler
uses: fortran-lang/setup-fortran@v1
with:
compiler: gcc

- name: soft link gfortran and check version
run: |
ln -s `ls $PREFIX/bin/gfortran-* | tail -1` $PREFIX/bin/gfortran
gfortran -v
- name: Check gfortran version
run: gfortran --version

- name: tap the homebrew repo
run: brew tap danieljprice/all
Expand All @@ -38,7 +38,7 @@ jobs:
run: brew install mcfost

- name: "Clone phantom"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Compile phantom and link with mcfost"
run: make SETUP=disc MCFOST=yes PREFIX=${PREFIX} LIBCXX=-lc++
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- yes
ntasks:
- 1
- 4
- 2
input: # [SETUP, phantom_tests]
- ['test', '']
- ['testkd', '']
Expand All @@ -43,7 +43,7 @@ jobs:

env:
OMP_STACKSIZE: 512M
OMP_NUM_THREADS: 4
OMP_NUM_THREADS: 2

steps:

Expand All @@ -53,7 +53,7 @@ jobs:
sudo apt-get --yes install gfortran openmpi-bin openmpi-common libopenmpi-dev
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Compile with MPI
run: make SETUP=${{ matrix.input[0] }} MPI=yes DEBUG=${{ matrix.debug }} OPENMP=${{ matrix.openmp }} phantomtest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
35 changes: 3 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,12 @@ jobs:

- name: Setup Intel repo
if: matrix.system == 'ifort'
id: intel-repo
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
INTELVERSION=$(apt-cache show intel-oneapi-compiler-fortran | grep Version | head -1)
echo "::set-output name=intelversion::$INTELVERSION"
- name: Cache intel installation
if: matrix.system == 'ifort'
id: cache-intel
uses: actions/cache@v3
uses: fortran-lang/setup-fortran@v1
with:
path: |
/opt/intel
key: ${{ steps.intel-repo.outputs.intelversion }}

- name: Install Intel compilers
if: ${{ steps.cache-intel.outputs.cache-hit != 'true' && matrix.system == 'ifort' }}
run: |
sudo apt-get install -y intel-oneapi-common-vars
sudo apt-get install -y intel-oneapi-compiler-fortran
sudo apt-get install -y intel-oneapi-mpi
sudo apt-get install -y intel-oneapi-mpi-devel
- name: Setup Intel oneAPI environment
if: matrix.system == 'ifort'
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
compiler: intel-classic

- name: "Clone phantom"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Compile phantom"
run: make SETUP=${{ matrix.input[0] }} DEBUG=${{ matrix.debug }} phantomtest
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ build/phantom-version.h
*~
*/*~
*/*/*~
eos_binary_table.dat
helm_data.tab
forcing.dat
*.bindata
*.pyc
#*
Expand All @@ -23,3 +26,7 @@ build/phantom-version.h
*.tar
.DS_Store
_build
*.cmdx
*.cmod
*.ilm
*.stb
Loading

0 comments on commit b6b62b4

Please sign in to comment.