Skip to content

Commit

Permalink
Merge pull request #76 from pecos/dist
Browse files Browse the repository at this point in the history
updates to support "make dist"
  • Loading branch information
koomie authored Oct 20, 2021
2 parents 4f262b1 + b295f17 commit 5fd3c7e
Show file tree
Hide file tree
Showing 14 changed files with 301 additions and 107 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
options: --user 1001 --privileged
name: Code style
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
- name: Bootstrap
Expand All @@ -34,6 +38,10 @@ jobs:
options: --user 1001 --privileged
name: Build/CPU
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -63,6 +71,10 @@ jobs:
MFEM_LIB: /home/karl/sw/mfem-gpu-4.2/lib
MFEM_INC: /home/karl/sw/mfem-gpu-4.2/include
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
with:
Expand All @@ -86,6 +98,10 @@ jobs:
MFEM_LIB: /home/karl/sw/mfem-hip-4.3/lib
MFEM_INC: /home/karl/sw/mfem-hip-4.3/include
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
with:
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/tarball.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Distcheck

on:
push:
branches:
- main
pull_request:

# make sure steps are run in a login shell to support Lmod modules
defaults:
run:
shell: bash -l {0}

jobs:
distbuild:
runs-on: ubuntu-20.04
container:
image: koomietx/mfem:4.2.tps
options: --user 1001 --privileged
name: Create dist tarball
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Bootstrap
run: ./bootstrap
- name: Configure
run: ./configure
- name: Dist
run: make dist
- name: Archive tarball
uses: actions/upload-artifact@v2
with:
name: tarball-${{ github.event.pull_request.head.sha }}
path: tps-*.tar.gz
disttest-cpu:
runs-on: ubuntu-20.04
needs: distbuild
container:
image: koomietx/mfem:4.2.tps
options: --user 1001 --privileged
name: CPU release tarball tests
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Access tarball
uses: actions/download-artifact@v2
with:
name: tarball-${{ github.event.pull_request.head.sha }}
- name: Expand
run: tar xfz tps-*.tar.gz; rm tps-*.tar.gz
- name: Configure
run: cd tps-*; ./configure CXXFLAGS="-I$PETSC_INC" LDFLAGS="-L$PETSC_LIB -lpetsc"
- name: Make
run: cd tps-*; make -j 2
- name: TPS version
run: cd tps-*; ./src/tps --version
- name: Tests
run: cd tps-*; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: cd tps-*; make distclean
- name: VPATH configure
run: cd tps-*; mkdir build; cd build; ../configure CXXFLAGS="-I$PETSC_INC" LDFLAGS="-L$PETSC_LIB -lpetsc"
- name: VPATH make
run: cd tps-*; cd build; make -j 2
- name: VPATH tests
run: cd tps-*; cd build; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
disttest-gpu:
runs-on: [self-hosted, linux, x64, gpu, marvin-cuda]
needs: distbuild
name: GPU/Cuda release tarball tests
env:
MFEM_LIB: /home/karl/sw/mfem-gpu-4.2/lib
MFEM_INC: /home/karl/sw/mfem-gpu-4.2/include
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Access tarball
uses: actions/download-artifact@v2
with:
name: tarball-${{ github.event.pull_request.head.sha }}
- name: Expand
run: tar xfz tps-*.tar.gz; rm tps-*.tar.gz
- name: MFEM Tree
run: echo "MFEM_INC=$MFEM_INC, MFEM_LIB=$MFEM_LIB"
- name: Query modules loaded
run: module restore tps-gpu; module list
- name: Configure
run: cd tps-*; module restore tps-gpu; ./configure --enable-gpu-cuda CUDA_ARCH=sm_75
- name: Make
run: cd tps-*; module restore tps-gpu; make -j 2
- name: TPS version
run: cd tps-*; module restore tps-gpu; ./src/tps --version
- name: Tests
run: cd tps-*; module restore tps-gpu; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: cd tps-*; make distclean
- name: VPATH configure
run: cd tps-*; mkdir build; cd build; module restore tps-gpu; ../configure --enable-gpu-cuda CUDA_ARCH=sm_75
- name: VPATH Make
run: cd tps-*; cd build; module restore tps-gpu; make -j 2
- name: VPATH Tests
run: cd tps-*; cd build; module restore tps-gpu; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version 1.0 (19 Oct 2021)

* initial release with standalone compressible flow and EM solvers
14 changes: 14 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
SUBDIRS = src test utils
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = CHANGES LICENSE dist_version

# --------------------------------------------------
# Revision control support for external distribution
# --------------------------------------------------

if GIT_CHECKOUT
dist_version: FORCE
@GIT_REVISION@ > $(top_srcdir)/dist_version

FORCE:
endif

dist-hook:
rm -rf `find $(distdir)/ -name .gitattributes`
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![CI](https://github.com/pecos/tps/actions/workflows/build.yaml/badge.svg)](https://github.com/pecos/tps/actions/workflows/build.yaml)
[![Docs](https://github.com/pecos/tps-docs/actions/workflows/docs.yaml/badge.svg)](https://pecos.github.io/tps-docs)


### Torch Plasma Simulator
```
Expand All @@ -13,3 +15,14 @@
------------------------------------
```

This repository houses source code for `TPS`, a finite-element, multi-physics
application that is under active development with the goal to develop a robust
plasma torch modeling capability. For more information, please refer to the
[documentation](https://pecos.github.io/tps-docs).

#### Acknowledgements

This material is based upon work supported in part by the Department of
Energy, National Nuclear Security Administration under Award Number
DE-NA0003969.

14 changes: 13 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([tps], [1.0 (dev)], [https://github.com/pecos/tps])
AC_INIT([tps], [1.0], [https://github.com/pecos/tps])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([tps_config.h])
AC_CONFIG_AUX_DIR([build-aux])
Expand All @@ -27,6 +27,8 @@ CXXFLAGS="-std=c++11 $CXXFLAGS"
AX_PATH_GRVY([0.32],[yes])
AX_PATH_HDF5([1.8.0],[yes])



#AC_PROG_LIBTOOL
AC_PROG_RANLIB

Expand Down Expand Up @@ -159,5 +161,15 @@ AM_CONDITIONAL(HIP_ENABLED,test x$ENABLE_HIP = xyes)

AC_OUTPUT([Makefile src/Makefile test/Makefile utils/Makefile])

# create soft link to local bats binary in tests/
AC_MSG_NOTICE([Bootstrapping local bats test configuration])
if test -d test ; then
if test ! -e test/bats ; then
if test ! -L test/bats; then
ln -s $srcdir/../utils/bats/bin/bats test/bats
fi
fi
fi

# Final summary
AX_SUMMARIZE_CONFIG
4 changes: 2 additions & 2 deletions m4/config_environment.m4
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ fi
if test $RC != 0 ; then
GIT_REVISION="cat $srcdir/dist_version"
GIT_CHECKOUT=false
BUILD_DEVSTATUS="External Release"
BUILD_DEVSTATUS="release"
else
GIT_REVISION="${git} log -1 --format="%h""
GIT_CHECKOUT=true
BUILD_DEVSTATUS="Development Build"
BUILD_DEVSTATUS="dev"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ headers = averaging_and_rms.hpp equation_of_state.hpp forcing_terms
sbp_integrators.hpp BoundaryCondition.hpp face_integrator.hpp M2ulPhyS.hpp rhs_operator.hpp \
wallBC.hpp domain_integrator.hpp fluxes.hpp masa_handler.hpp riemann_solver.hpp \
dgNonlinearForm.hpp gradNonLinearForm.hpp dataStructures.hpp utils.hpp io.hpp em_options.hpp \
quasimagnetostatic.hpp tps.hpp
quasimagnetostatic.hpp gradients.hpp logger.hpp tps.hpp

mfem_extra_headers = ../utils/mfem_extras/pfem_extras.hpp

Expand Down
Loading

0 comments on commit 5fd3c7e

Please sign in to comment.