Skip to content

Commit

Permalink
Merge pull request #108 from cpmech/remove-mpi-dependency
Browse files Browse the repository at this point in the history
Remove mpi dependency
  • Loading branch information
cpmech authored Apr 30, 2024
2 parents 2a6f010 + f0d82b3 commit fcd91e6
Show file tree
Hide file tree
Showing 53 changed files with 644 additions and 633 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ jobs:
- uses: actions/checkout@v4
- name: Install Libraries
run: |
bash case-a-openblas-debian.bash
sudo apt-get update -y && \
sudo apt-get install -y --no-install-recommends \
liblapacke-dev \
libopenblas-dev \
libsuitesparse-dev
- name: Compile MUMPS
run: |
bash zscripts/compile-and-install-mumps.bash
- name: Install Rust
run: |
rustup toolchain install nightly --component llvm-tools-preview
rustup default nightly
- name: Run tests
run: |
RUST_BACKTRACE=1 cargo test
RUST_BACKTRACE=1 cargo test --features with_mumps
- name: Install cargo-llvm-cov
run: |
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: Generate code coverage
run: |
cargo llvm-cov --workspace --ignore-filename-regex 'build.rs|mem_check.rs|mem_check_lab.rs|solve_matrix_market.rs|amplifier1t.rs|brusselator_pde.rs' --lcov --output-path lcov.info
cargo llvm-cov --workspace --features with_mumps --ignore-filename-regex 'build.rs|mem_check.rs|mem_check_lab.rs|solve_matrix_market.rs|amplifier1t.rs|brusselator_pde.rs' --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test_on_arch_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Test on Arch Linux
on: [pull_request]
jobs:
test_on_arch_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docker image
run: |
bash zscripts/docker-build-image.bash arch
9 changes: 6 additions & 3 deletions .github/workflows/test_with_intel_mkl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Libraries
- name: Compile MUMPS
run: |
bash case-b-intel-mkl-local-libs.bash
bash zscripts/compile-and-install-mumps.bash mkl
- name: Compile SuiteSparse
run: |
bash zscripts/compile-and-install-suitesparse.bash mkl
- name: Run tests
run: |
source /opt/intel/oneapi/setvars.sh
RUST_BACKTRACE=1 cargo test --features intel_mkl
RUST_BACKTRACE=1 cargo test --features local_suitesparse,with_mumps,intel_mkl
9 changes: 6 additions & 3 deletions .github/workflows/test_with_local_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Libraries
- name: Compile MUMPS
run: |
bash case-a-openblas-local-libs.bash
bash zscripts/compile-and-install-mumps.bash
- name: Compile SuiteSparse
run: |
bash zscripts/compile-and-install-suitesparse.bash
- name: Run tests
run: |
RUST_BACKTRACE=1 cargo test --features local_libs
RUST_BACKTRACE=1 cargo test --features local_suitesparse,with_mumps
6 changes: 1 addition & 5 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
"includePath": [
"${default}",
"/usr/include",
"/usr/include/mumps",
"/usr/lib/x86_64-linux-gnu/openmpi/include",
"/usr/include/suitesparse",
"/opt/intel/oneapi/mkl/latest/include",
"/usr/local/include/mumps",
"/usr/local/include/umfpack"
"/usr/local/include/suitesparse"
],
"defines": [
"USE_INTEL_MKL"
Expand Down
36 changes: 36 additions & 0 deletions Dockerfile.Arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM archlinux:base-devel

# initialize
RUN pacman -Sy go git --noconfirm

# set user
RUN useradd -G wheel -m user
RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN chown -R user:wheel /usr/local/src/
USER user
WORKDIR /usr/local/src/

# install yay
RUN git clone https://aur.archlinux.org/yay.git
RUN cd yay && makepkg -si --noconfirm
RUN sudo rm -f \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/* \
/README \
/etc/pacman.d/mirrorlist.pacnew

# install libraries for russell
RUN yay -Y --gendb --noconfirm && yay -Y --devel --save
RUN yay -Syu blas-openblas --noconfirm
RUN yay -Syu suitesparse --noconfirm

# install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/home/user/.cargo/bin:${PATH}"

# copy files
COPY --chown=user:user . russell
WORKDIR russell

# run tests
RUN cargo test
8 changes: 0 additions & 8 deletions Dockerfile.Rocky
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ FROM rockylinux/rockylinux

# initialize
RUN dnf update -y
RUN dnf check-update
RUN dnf install epel-release -y
RUN crb enable
RUN dnf install cmake gcc make curl clang -y

# dependencies
RUN dnf install -y \
gcc-toolset-13 \
lapack-devel \
MUMPS-devel \
openblas-devel \
openmpi-devel \
suitesparse-devel

# install rust
Expand All @@ -24,9 +20,5 @@ ENV PATH="/root/.cargo/bin:${PATH}"
COPY . /tmp/russell
WORKDIR /tmp/russell

# set environment variables
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib64/openmpi/lib"
ENV PSM3_DEVICES='self,shm'

# run tests
RUN cargo test
5 changes: 1 addition & 4 deletions Dockerfile.Ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ RUN apt-get update -y && \
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
g++ \
gdb \
gfortran \
build-essential \
liblapacke-dev \
libmumps-dev \
libopenblas-dev \
libsuitesparse-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
Expand Down
36 changes: 36 additions & 0 deletions Dockerfile.Ubuntu.Mumps
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM ubuntu:22.04

# disable tzdata questions
ENV DEBIAN_FRONTEND=noninteractive

# use bash
SHELL ["/bin/bash", "-c"]

# install apt-utils
RUN apt-get update -y && \
apt-get install -y apt-utils 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 ) \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# essential tools
RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
build-essential \
liblapacke-dev \
libopenblas-dev \
libsuitesparse-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# copy files
COPY . /tmp/russell
WORKDIR /tmp/russell

# compile MUMPS
RUN bash zscripts/compile-and-install-mumps.bash

# run tests
RUN cargo test --features with_mumps
Loading

0 comments on commit fcd91e6

Please sign in to comment.