Merged with master
This commit is contained in:
@@ -11,7 +11,7 @@ project(astaroth C CXX CUDA)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||
|
||||
## Project-wide compilation flags
|
||||
set(COMMON_FLAGS "-mavx -Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion -Wshadow")
|
||||
set(COMMON_FLAGS "-mavx -DOMPI_SKIP_MPICXX -Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion -Wshadow") # -DOMPI_SKIP_MPICXX is to force OpenMPI to use the C interface
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
@@ -78,8 +78,8 @@ if (DOUBLE_PRECISION)
|
||||
add_definitions(-DAC_DOUBLE_PRECISION=1)
|
||||
endif ()
|
||||
if (MPI_ENABLED)
|
||||
find_package(MPI REQUIRED)
|
||||
include_directories(${MPI_CXX_INCLUDE_DIRS})
|
||||
find_package(MPI REQUIRED COMPONENTS C)
|
||||
include_directories(${MPI_C_INCLUDE_DIRS})
|
||||
add_definitions(-DAC_MPI_ENABLED=1)
|
||||
endif ()
|
||||
if (MULTIGPU_ENABLED)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# Only use spaces to indent your .yml configuration.
|
||||
# -----
|
||||
# You can specify a custom docker image from Docker Hub as your build environment.
|
||||
image: nvidia/cuda
|
||||
image: nvidia/cuda:11.0-devel-ubuntu20.04
|
||||
|
||||
# JP notes:
|
||||
# 1) We need a sufficiently recent GPU to run the code (needs to support CUDA 10 + NVIDIA drivers 418)
|
||||
@@ -20,11 +20,13 @@ pipelines:
|
||||
scheduled:
|
||||
- step:
|
||||
script: # Modify the commands below to build your repository.
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
- ln -fs /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
|
||||
- mkdir -p build && cd build
|
||||
- apt-get update
|
||||
- apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
|
||||
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
|
||||
- apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
- apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
|
||||
- apt-get update
|
||||
- apt-get install -y cmake flex bison openmpi-bin libopenmpi-dev gfortran
|
||||
- cmake -DDSL_MODULE_DIR="acc/mhd_solver" -DBUILD_STANDALONE=ON -DBUILD_UTILS=ON -DBUILD_RT_VISUALIZATION=OFF -DBUILD_SAMPLES=ON -DDOUBLE_PRECISION=OFF -DMULTIGPU_ENABLED=ON -DMPI_ENABLED=OFF .. # Single precision
|
||||
|
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.17) # Required for moder CUDA::cudart linking
|
||||
|
||||
find_package(MPI)
|
||||
find_package(MPI COMPONENTS C)
|
||||
find_package(OpenMP)
|
||||
find_package(CUDAToolkit)
|
||||
|
||||
|
@@ -6,5 +6,5 @@ target_link_libraries(astaroth_core astaroth_kernels CUDA::cudart CUDA::cuda_dri
|
||||
|
||||
## Options
|
||||
if (MPI_ENABLED)
|
||||
target_link_libraries(astaroth_core MPI::MPI_CXX)
|
||||
target_link_libraries(astaroth_core MPI::MPI_C)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user