Skip to content

Commit

Permalink
Merge pull request #142 from marcfehling/xbraid
Browse files Browse the repository at this point in the history
CI now covers compilation of all projects.
  • Loading branch information
bangerth authored Apr 26, 2023
2 parents 51be51e + 40c6bd8 commit 0d0a31c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/precice-ci.yml → .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PreCICE CI
name: github-linux

on:
push:
Expand Down Expand Up @@ -29,21 +29,44 @@ jobs:
options: --user root

steps:
- name: Install dependencies from repository
run: |
apt-get -y update
apt-get -y install libarmadillo-dev libconfig++-dev
- name: Install preCICE
run: |
sudo apt-get -y update
wget https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_${{ matrix.ubuntu_version }}.deb
sudo apt-get -y install ./libprecice2_2.5.0_${{ matrix.ubuntu_version }}.deb
wget -O libprecice.deb https://github.com/precice/precice/releases/download/v2.5.0/libprecice2_2.5.0_${{ matrix.ubuntu_version }}.deb
apt-get -y install ./libprecice.deb
- name: Install XBraid
run: |
wget -O xbraid.tar.gz https://github.com/XBraid/xbraid/archive/refs/tags/v3.1.0.tar.gz
mkdir /opt/xbraid
tar xf xbraid.tar.gz -C /opt/xbraid --strip-components 1
cd /opt/xbraid/braid
make
echo "BRAID_DIR=${PWD}" >> $GITHUB_ENV
- uses: actions/checkout@v3

- name: Compile
- name: Compile all projects
run: |
cd coupled_laplace_problem
cmake .
make
for dir in */
do
cd ${dir}
if [ -e CMakeLists.txt ]
then
echo "Current project: ${dir}"
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .
make
else
echo "Skipping project: ${dir}"
fi
cd ..
done
- name: Test
- name: Test coupled_laplace_problem
run: |
cd coupled_laplace_problem
(./coupled_laplace_problem 2>&1 & ./fancy_boundary_condition >fbc.log)
Expand Down
8 changes: 3 additions & 5 deletions CeresFE/src/ceres.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ namespace Step22
}

virtual double value(const Point<dim> &p,
const unsigned int component = 0) const;
const unsigned int component = 0) const override;

virtual void vector_value(const Point<dim> &p, Vector<double> &value) const;
virtual void vector_value(const Point<dim> &p, Vector<double> &value) const override;
};

template<int dim>
Expand Down Expand Up @@ -426,9 +426,7 @@ namespace Step22

constraints.close();

std::vector<types::global_dof_index> dofs_per_block(2);
DoFTools::count_dofs_per_block(dof_handler, dofs_per_block,
block_component);
std::vector<types::global_dof_index> dofs_per_block = DoFTools::count_dofs_per_fe_block(dof_handler, block_component);
n_u = dofs_per_block[0];
n_p = dofs_per_block[1];

Expand Down
12 changes: 2 additions & 10 deletions parallel_in_time/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,16 @@ IF(NOT ${deal.II_FOUND})
ENDIF()

# Find braid details
IF(NOT "$ENV{BRAID_DIR}" STREQUAL "")
SET(BRAID_DIR "$ENV{BRAID_DIR}" CACHE INTERNAL "Copied BRAID_DIR from environment variable")
ENDIF()

IF("${CMAKE_FIND_LIBRARY_PREFIXES}" STREQUAL "")
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
ENDIF()
SET(BRAID_DIR "$ENV{BRAID_DIR}" CACHE INTERNAL "Copied BRAID_DIR from environment variable")

FIND_PATH(BRAID_INCLUDE_DIR
NAMES braid.h
HINTS ${BRAID_DIR}
PATH_SUFFIXES include
)

FIND_LIBRARY(BRAID_LIBRARY
NAMES braid.a
NAMES libbraid.a
HINTS ${BRAID_DIR}
PATH_SUFFIXES lib64 lib
)

MESSAGE(STATUS "Braid include directory: ${BRAID_INCLUDE_DIR}")
Expand Down

0 comments on commit 0d0a31c

Please sign in to comment.