Skip to content

Commit

Permalink
Try #422:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jan 24, 2022
2 parents cd76663 + 5bbaa27 commit 750e042
Show file tree
Hide file tree
Showing 114 changed files with 1,389 additions and 1,352 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ else()
find_package(LAPACK REQUIRED)
endif()

# ----- HPX
find_package(HPX 1.7.0 REQUIRED)
# ----- pika
find_package(pika 0.1.0 REQUIRED EXACT)

# ----- BLASPP/LAPACKPP
find_package(blaspp REQUIRED)
Expand Down
10 changes: 5 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

- MPI
- OpenMP
- HPX
- pika
- BLAS/LAPACK
- BLASPP & LAPACKPP

## MPI

## OpenMP

## HPX
## pika

HPX provides a CMake config script in `$HPX_ROOT/lib/cmake/HPX`. To make it available, the variable
`HPX_DIR` has to be set to this path.
pika provides a CMake config script in `$pika_ROOT/lib/cmake/pika`. To make it available, the variable
`pika_DIR` has to be set to this path. Depending on the platform, the files may also be in `lib64` instead of `lib`.

e.g. `cmake -DHPX_DIR=${HPX_ROOT}/lib/cmake/HPX ..`
e.g. `cmake -Dpika_DIR=${PIKA_ROOT}/lib/cmake/pika ..`

## BLAS/LAPACK

Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Otherwise you can download the archive of the latest `master` branch as a [zip](
### Dependencies

- MPI
- [HPX](https://github.com/STEllAR-GROUP/hpx)
- [pika](https://github.com/pika-org/pika)
- [blaspp](https://bitbucket.org/icl/blaspp/src/default/)
- [lapackpp](https://bitbucket.org/icl/lapackpp/src/default/)
- Intel MKL or other LAPACK implementation
Expand All @@ -37,27 +37,22 @@ Example installation:

`spack install dla-future ^intel-mkl`

Or you can go even further with a more detailed spec like this one, which builds dla-future in debug mode, using the clang compiler, specifying that the HPX on which it depends has to be built
in debug mode too, with APEX instrumentation enabled, and that we want to use MPICH as MPI implementation, without fortran support (because clang does not support it).
Or you can go even further with a more detailed spec like this one, which builds dla-future in debug mode, using the clang compiler, specifying that the pika on which it depends has to be built
in debug mode too, and that we want to use MPICH as MPI implementation, without fortran support (because clang does not support it).

`spack install dla-future %clang build_type=Debug ^hpx build_type=Debug instrumentation=apex ^mpich ~fortran`

Notice that, for the package to work correctly, the HPX option `max_cpu_count` must be set accordingly to the architecture, as it represents the size of the bitmask to interface with hardware threads.

`spack install dla-future ^intel-mkl ^hpx max_cpu_count=256`
`spack install dla-future %clang build_type=Debug ^pika build_type=Debug ^mpich ~fortran`

#### Build the old good way

You can build all the dependencies by yourself, but you have to ensure that:
- BLAS/LAPACK implementation is not multithreaded
- HPX: `HPX_WITH_NETWORKING=none` + `HPX_WITH_MAX_CPU_COUNT=n` (according to number of cores in the architecture, suggested the next closest power of 2)
- HPX and DLAF must have a compatible `CMAKE_BUILD_TYPE`: they must be built both in Debug, or with any combination of release types (Release, RelWithDebInfo or MinSizeRel)
- pika: `PIKA_WITH_CUDA=ON` (if building for CUDA) + `PIKA_WITH_MPI`

And here the main CMake options for DLAF build customization:

CMake option | Values | Note
:---|:---|:---
`HPX_DIR` | CMAKE:PATH | Location of the HPX CMake-config file
`pika_DIR` | CMAKE:PATH | Location of the pika CMake-config file
`blaspp_DIR` | CMAKE:PATH | Location of the blaspp CMake-config file
`lapackpp_DIR` | CMAKE:PATH | Location of the lapackpp CMake-config file
`DLAF_WITH_MKL` | `{ON,OFF}` (default: `OFF`) | if blaspp/lapackpp is built with MKL
Expand All @@ -71,7 +66,7 @@ CMake option | Values | Note
`DLAF_INSTALL_TESTS` | `{ON,OFF}` (default: `OFF`) | enable/disable installing tests
`DLAF_MPI_PRESET` | `{plain-mpi, slurm, custom}` (default `plain-mpi`) | presets for MPI configuration for tests. See [CMake Doc](https://cmake.org/cmake/help/latest/module/FindMPI.html?highlight=mpiexec_executable#usage-of-mpiexec) for additional information
`DLAF_TEST_RUNALL_WITH_MPIEXEC` | `{ON, OFF}` (default: `OFF`) | Use mpi runner also for non-MPI based tests
`DLAF_HPXTEST_EXTRA_ARGS` | CMAKE:STRING | Additional HPX command-line options for tests
`DLAF_PIKATEST_EXTRA_ARGS` | CMAKE:STRING | Additional pika command-line options for tests
`DLAF_BUILD_DOC` | `{ON,OFF}` (default: `OFF`) | enable/disable documentation generation

### Link your program/library with DLAF
Expand Down
242 changes: 122 additions & 120 deletions ci/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ stages:
- trying
variables:
GIT_SUBMODULE_STRATEGY: recursive
SPACK_SHA: 522a7c8ee0d51f92aa8cd685f378d54735a5307e
# TODO: Change this back. The latter is on msimberg/spack.
# SPACK_SHA: 522a7c8ee0d51f92aa8cd685f378d54735a5307e
SPACK_SHA: 737f0cc1c79e8eb903e2fc2d48d02982cd392a22
before_script:
- docker login -u $CSCS_REGISTRY_USER -p $CSCS_REGISTRY_PASSWORD $CSCS_REGISTRY
script:
Expand All @@ -37,80 +39,80 @@ stages:
- pipeline.yml

# Builds a Docker image for the current commit
cpu release build gcc9:
extends: .build_spack_common
variables:
BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
BASE_IMAGE: ubuntu:20.04
COMPILER: [email protected]
USE_MKL: "ON"
SPACK_ENVIRONMENT: ci/docker/cpu-release.yaml
BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-gcc9/build
DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-gcc9/deploy:$CI_COMMIT_SHA
SLURM_CONSTRAINT: mc
THREADS_PER_NODE: 72
USE_CODECOV: "false"

cpu release build clang10:
extends: .build_spack_common
variables:
BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
BASE_IMAGE: ubuntu:20.04
COMPILER: [email protected]
USE_MKL: "ON"
SPACK_ENVIRONMENT: ci/docker/cpu-release.yaml
BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-clang10/build
DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-clang10/deploy:$CI_COMMIT_SHA
SLURM_CONSTRAINT: mc
THREADS_PER_NODE: 72
USE_CODECOV: "false"

cpu codecov build gcc9:
extends: .build_spack_common
variables:
BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
DEPLOY_DOCKER_FILE: ci/docker/codecov.Dockerfile
BASE_IMAGE: ubuntu:20.04
COMPILER: [email protected]
USE_MKL: "OFF"
SPACK_ENVIRONMENT: ci/docker/cpu-debug.yaml
BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/codecov-cpu-gcc9/build
DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/codecov-cpu-gcc9/deploy:$CI_COMMIT_SHA
SLURM_CONSTRAINT: mc
THREADS_PER_NODE: 72
USE_CODECOV: "true"

gpu release build gcc9:
extends: .build_spack_common
variables:
BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
BASE_IMAGE: nvidia/cuda:11.1.1-devel-ubuntu20.04
COMPILER: [email protected]
USE_MKL: "ON"
SPACK_ENVIRONMENT: ci/docker/gpu-release.yaml
BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-gcc9/build
DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-gcc9/deploy:$CI_COMMIT_SHA
SLURM_CONSTRAINT: gpu
THREADS_PER_NODE: 24
USE_CODECOV: "false"

gpu release build clang10:
extends: .build_spack_common
variables:
BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
BASE_IMAGE: nvidia/cuda:11.1.1-devel-ubuntu20.04
COMPILER: [email protected]
USE_MKL: "ON"
SPACK_ENVIRONMENT: ci/docker/gpu-release.yaml
BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-clang10/build
DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-clang10/deploy:$CI_COMMIT_SHA
SLURM_CONSTRAINT: gpu
THREADS_PER_NODE: 24
USE_CODECOV: "false"
#cpu release build gcc9:
# extends: .build_spack_common
# variables:
# BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
# DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
# BASE_IMAGE: ubuntu:20.04
# COMPILER: [email protected]
# USE_MKL: "ON"
# SPACK_ENVIRONMENT: ci/docker/cpu-release.yaml
# BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-gcc9/build
# DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-gcc9/deploy:$CI_COMMIT_SHA
# SLURM_CONSTRAINT: mc
# THREADS_PER_NODE: 72
# USE_CODECOV: "false"
#
#cpu release build clang10:
# extends: .build_spack_common
# variables:
# BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
# DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
# BASE_IMAGE: ubuntu:20.04
# COMPILER: [email protected]
# USE_MKL: "ON"
# SPACK_ENVIRONMENT: ci/docker/cpu-release.yaml
# BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-clang10/build
# DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-cpu-clang10/deploy:$CI_COMMIT_SHA
# SLURM_CONSTRAINT: mc
# THREADS_PER_NODE: 72
# USE_CODECOV: "false"
#
#cpu codecov build gcc9:
# extends: .build_spack_common
# variables:
# BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
# DEPLOY_DOCKER_FILE: ci/docker/codecov.Dockerfile
# BASE_IMAGE: ubuntu:20.04
# COMPILER: [email protected]
# USE_MKL: "OFF"
# SPACK_ENVIRONMENT: ci/docker/cpu-debug.yaml
# BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/codecov-cpu-gcc9/build
# DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/codecov-cpu-gcc9/deploy:$CI_COMMIT_SHA
# SLURM_CONSTRAINT: mc
# THREADS_PER_NODE: 72
# USE_CODECOV: "true"
#
#gpu release build gcc9:
# extends: .build_spack_common
# variables:
# BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
# DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
# BASE_IMAGE: nvidia/cuda:11.1.1-devel-ubuntu20.04
# COMPILER: [email protected]
# USE_MKL: "ON"
# SPACK_ENVIRONMENT: ci/docker/gpu-release.yaml
# BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-gcc9/build
# DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-gcc9/deploy:$CI_COMMIT_SHA
# SLURM_CONSTRAINT: gpu
# THREADS_PER_NODE: 24
# USE_CODECOV: "false"
#
#gpu release build clang10:
# extends: .build_spack_common
# variables:
# BUILD_DOCKER_FILE: ci/docker/build.Dockerfile
# DEPLOY_DOCKER_FILE: ci/docker/deploy.Dockerfile
# BASE_IMAGE: nvidia/cuda:11.1.1-devel-ubuntu20.04
# COMPILER: [email protected]
# USE_MKL: "ON"
# SPACK_ENVIRONMENT: ci/docker/gpu-release.yaml
# BUILD_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-clang10/build
# DEPLOY_IMAGE: $CSCS_REGISTRY_IMAGE/release-gpu-clang10/deploy:$CI_COMMIT_SHA
# SLURM_CONSTRAINT: gpu
# THREADS_PER_NODE: 24
# USE_CODECOV: "false"

gpu codecov build gcc9:
extends: .build_spack_common
Expand Down Expand Up @@ -148,51 +150,51 @@ notify_github_start:
trigger:
strategy: depend

cpu release test gcc9:
extends: .run_common
needs:
- cpu release build gcc9
trigger:
include:
- artifact: pipeline.yml
job: cpu release build gcc9

cpu release test clang10:
extends: .run_common
needs:
- cpu release build clang10
trigger:
include:
- artifact: pipeline.yml
job: cpu release build clang10

cpu codecov test gcc9:
extends: .run_common
needs:
- cpu codecov build gcc9
trigger:
strategy: depend
include:
- artifact: pipeline.yml
job: cpu codecov build gcc9

gpu release test gcc9:
extends: .run_common
needs:
- gpu release build gcc9
trigger:
include:
- artifact: pipeline.yml
job: gpu release build gcc9

gpu release test clang10:
extends: .run_common
needs:
- gpu release build clang10
trigger:
include:
- artifact: pipeline.yml
job: gpu release build clang10
#cpu release test gcc9:
# extends: .run_common
# needs:
# - cpu release build gcc9
# trigger:
# include:
# - artifact: pipeline.yml
# job: cpu release build gcc9
#
#cpu release test clang10:
# extends: .run_common
# needs:
# - cpu release build clang10
# trigger:
# include:
# - artifact: pipeline.yml
# job: cpu release build clang10
#
#cpu codecov test gcc9:
# extends: .run_common
# needs:
# - cpu codecov build gcc9
# trigger:
# strategy: depend
# include:
# - artifact: pipeline.yml
# job: cpu codecov build gcc9
#
#gpu release test gcc9:
# extends: .run_common
# needs:
# - gpu release build gcc9
# trigger:
# include:
# - artifact: pipeline.yml
# job: gpu release build gcc9
#
#gpu release test clang10:
# extends: .run_common
# needs:
# - gpu release build clang10
# trigger:
# include:
# - artifact: pipeline.yml
# job: gpu release build clang10

gpu codecov test gcc9:
extends: .run_common
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ ARG SPACK_SHA
ENV SPACK_SHA=$SPACK_SHA

# Install the specific ref of Spack provided by the user and find compilers
# TODO: Change this back to the upstream spack repo before merging
RUN mkdir -p /opt/spack && \
curl -Ls "https://api.github.com/repos/spack/spack/tarball/$SPACK_SHA" | tar --strip-components=1 -xz -C /opt/spack
curl -Ls "https://api.github.com/repos/msimberg/spack/tarball/$SPACK_SHA" | tar --strip-components=1 -xz -C /opt/spack

# Find compilers + Add gfortran to clang specs + Define which compiler we want to use
ARG COMPILER
Expand Down
3 changes: 1 addition & 2 deletions ci/docker/cpu-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ spack:
variants:
- '~cuda'
- '~openmp'
hpx:
pika:
variants:
- 'build_type=Debug'
- 'max_cpu_count=128'
mpich:
variants:
- '~fortran'
3 changes: 0 additions & 3 deletions ci/docker/cpu-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ spack:
variants:
- '~cuda'
- '~openmp'
hpx:
variants:
- 'max_cpu_count=128'
mpich:
variants:
- '~fortran'
3 changes: 1 addition & 2 deletions ci/docker/gpu-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ spack:
variants:
- '~cuda'
- '~openmp'
hpx:
pika:
variants:
- 'build_type=Debug'
- 'max_cpu_count=128'
mpich:
variants:
- '~fortran'
Loading

0 comments on commit 750e042

Please sign in to comment.