Skip to content
Open
8 changes: 8 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: Scalar type ('default' or 'complex')
type: string
default: default
int_type:
description: Integer type ('int32' or 'int64')
type: string
default: int32
gpu:
description: Target GPU platform
type: string
Expand Down Expand Up @@ -53,6 +57,7 @@ runs:
apt-get -y install \
$(python3 ./firedrake-repo/scripts/firedrake-configure \
--scalar-type ${{ inputs.scalar_type }} \
--int-type ${{ inputs.int_type }} \
--gpu-arch ${{ inputs.gpu }} \
--show-system-packages)
: # Dependencies needed to run the test suite
Expand All @@ -66,6 +71,7 @@ runs:
brew install \
$(python3 ./firedrake-repo/scripts/firedrake-configure \
--scalar-type ${{ inputs.scalar_type }} \
--int-type ${{ inputs.int_type }} \
--show-system-packages)
else
echo "Unrecognised 'os' input: '${{ inputs.os }}"
Expand Down Expand Up @@ -101,6 +107,7 @@ runs:
cd petsc
python3 ../firedrake-repo/scripts/firedrake-configure \
--scalar-type ${{ inputs.scalar_type }} \
--int-type ${{ inputs.int_type }} \
--gpu-arch ${{ inputs.gpu }} \
--show-petsc-configure-options | \
xargs -L1 ./configure \
Expand All @@ -114,6 +121,7 @@ runs:
run: |
export $(python3 ./firedrake-repo/scripts/firedrake-configure \
--scalar-type ${{ inputs.scalar_type }} \
--int-type ${{ inputs.int_type }} \
--gpu-arch ${{ inputs.gpu }} \
--show-env)
export SLEPC_DIR=$PETSC_DIR/$PETSC_ARCH
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: Whether to test a complex build
type: boolean
required: true
test_int64:
description: Whether to test a 64-bit integer build
type: boolean
required: true
test_cuda:
description: Whether to test using CUDA-enabled PETSc
type: boolean
Expand Down Expand Up @@ -54,6 +58,10 @@ on:
description: Whether to test a complex build
type: boolean
required: true
test_int64:
description: Whether to test a 64-bit integer build
type: boolean
required: true
test_cuda:
description: Whether to test using CUDA-enabled PETSc
type: boolean
Expand Down Expand Up @@ -262,10 +270,18 @@ jobs:
id: generate
run: |
if [ ${{ inputs.test_complex }} == 'true' ]; then
matrix='{"scalar_type": "complex", "gpu": "none"}'
matrix='{"scalar_type": "complex", "int_type": "int32", "gpu": "none"}'
fi
if [ ${{ inputs.test_int64 }} == 'true' ]; then
arch='{"scalar_type": "default", "int_type": "int64", "gpu": "none"}'
if [ "$matrix" ]; then
matrix="$matrix, $arch"
else
matrix="$arch"
fi
fi
if [ ${{ inputs.test_cuda }} == 'true' ]; then
arch='{"scalar_type": "default", "gpu": "cuda"}'
arch='{"scalar_type": "default", "int_type": "int32", "gpu": "cuda"}'
if [ "$matrix" ]; then
matrix="$matrix, $arch"
else
Expand Down Expand Up @@ -319,6 +335,7 @@ jobs:
source_ref: ${{ inputs.source_ref }}
base_ref: ${{ inputs.base_ref }}
scalar_type: ${{ matrix.scalar_type }}
int_type: ${{ matrix.int_type }}
gpu: ${{ matrix.gpu }}
deps: ci

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
# Run all tests of a specific configuration (e.g. complex) if the right label
# is on the PR, otherwise do nothing.
test_complex: ${{ contains(github.event.pull_request.labels.*.name, 'ci:complex') }}
test_int64: ${{ contains(github.event.pull_request.labels.*.name, 'ci:int64') }}
test_cuda: ${{ contains(github.event.pull_request.labels.*.name, 'ci:cuda') }}
test_macos: ${{ contains(github.event.pull_request.labels.*.name, 'ci:macos') }}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
source_ref: ${{ github.ref_name }}
base_ref: ${{ github.ref_name }}
test_complex: true
test_int64: true
test_cuda: true
test_macos: true
deploy_website: true
Expand Down
18 changes: 9 additions & 9 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,16 @@ Prepared configurations
-----------------------

``firedrake-configure`` provides a number of different possible configurations
(termed 'ARCHs') that specify how PETSc is configured and which external
packages are built. The currently supported ARCHs are:
that specify how PETSc is configured and which external packages are built. To
select a non-default configuration you can pass extra flags to
``firedrake-configure``. For example, to build Firedrake in complex mode you
should pass ``--scalar-type complex``::

* ``default``: the default installation, suitable for most users
* ``complex``: an installation where PETSc is configured using complex numbers
$ python3 firedrake-configure --show-petsc-configure-options --scalar-type complex

The different configurations can be selected by passing the flag ``--arch`` to
``firedrake-configure``. For example::
To see the full list of available options you should run::

$ python3 firedrake-configure --show-petsc-configure-options --arch complex
$ python3 firedrake-configure --help


Optional dependencies
Expand Down Expand Up @@ -499,9 +499,9 @@ Since ``firedrake-configure`` only outputs a string of options it is straightfor
to customise the options that are passed to PETSc ``configure``. You can either:

* Append additional options when ``configure`` is invoked. For example, to
build PETSc with support for 64-bit indices you should run::
build PETSc with HPDDM you should run::

$ python3 ../firedrake-configure --show-petsc-configure-options | xargs -L1 ./configure --with-64-bit-indices
$ python3 ../firedrake-configure --show-petsc-configure-options | xargs -L1 ./configure --download-hpddm

* Write the output of ``firedrake-configure`` to a file than can be modified. For example::

Expand Down
Loading
Loading