Skip to content

Commit

Permalink
Merge pull request #20 from prashjha/remove_hpx
Browse files Browse the repository at this point in the history
Removed HPX and Boost dependencies and added mesh partitioning and MPI and Multithreading parallelism
  • Loading branch information
prashjha authored Jun 3, 2024
2 parents 22f97a5 + 09a4a66 commit 30d1c16
Show file tree
Hide file tree
Showing 679 changed files with 128,303 additions and 164,035 deletions.
49 changes: 36 additions & 13 deletions .circleci/Docker/Dockerfile-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,48 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

# base ubuntu image with petsc, libmesh, hpx
# base ubuntu image with essentials and vtk
FROM prashjha/peridem-base-bionic:latest

# Set metadata
LABEL maintainer="Prashant K. Jha <[email protected]>"
LABEL description="PeriDEM docker image"

WORKDIR /
## build command
## docker build -t prashjha/peridem-bionic:latest -f ./Dockerfile-bionic . 2>&1 | tee log-peridem-bionic.txt

RUN git clone https://github.com/prashjha/PeriDEM.git
# -----------------------
# setup user (for mpi tests)
# username - user
# password - password
# add only if the user does not exist
# -----------------------
RUN if id user >/dev/null 2>&1; then echo "User 'user' already exists"; else echo "User 'user' does not exist so creating user 'user'" && useradd -m user && yes password | passwd user && usermod -s /bin/bash user; fi

RUN cd /PeriDEM && \
mkdir build && \
cd build && \
cmake -DHPX_IGNORE_COMPILER_COMPATIBILITY=ON \
-DCMAKE_BUILD_TYPE=Release \
-DEnable_Tests=ON \
-DHPX_DIR=${HPX_DIR}/lib/cmake/HPX \
.. && \
make -j 2 && \
make install
# change user
USER user
WORKDIR /home/user

# -----------------------
# setup git pull method
# -----------------------
RUN git config --global url."https://github.com/".insteadOf [email protected]: && \
git config --global url."https://".insteadOf git://

# -----------------------
# build peridem
# -----------------------
RUN git clone https://github.com/prashjha/PeriDEM.git &&\
cd PeriDEM &&\
git submodule update --init --recursive && \
mkdir -p build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DEnable_Tests=ON \
-DDisable_Docker_MPI_Tests=OFF \
-DVTK_DIR=/usr/local/lib/cmake/vtk-9.3 \
-DMETIS_DIR=/usr/lib \
.. && \
make -j 2 && \
make install

49 changes: 36 additions & 13 deletions .circleci/Docker/Dockerfile-focal
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,48 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

# base ubuntu image with petsc, libmesh, hpx
# base ubuntu image with essentials and vtk
FROM prashjha/peridem-base-focal:latest

# Set metadata
LABEL maintainer="Prashant K. Jha <[email protected]>"
LABEL description="PeriDEM docker image"

WORKDIR /
## build command
## docker build -t prashjha/peridem-focal:latest -f ./Dockerfile-focal . 2>&1 | tee log-peridem-focal.txt

RUN git clone https://github.com/prashjha/PeriDEM.git
# -----------------------
# setup user (for mpi tests)
# username - user
# password - password
# add only if the user does not exist
# -----------------------
RUN if id user >/dev/null 2>&1; then echo "User 'user' already exists"; else echo "User 'user' does not exist so creating user 'user'" && useradd -m user && yes password | passwd user && usermod -s /bin/bash user; fi

RUN cd /PeriDEM && \
mkdir build && \
cd build && \
cmake -DHPX_IGNORE_COMPILER_COMPATIBILITY=ON \
-DCMAKE_BUILD_TYPE=Release \
-DEnable_Tests=ON \
-DHPX_DIR=${HPX_DIR}/lib/cmake/HPX \
.. && \
make -j 2 && \
make install
# change user
USER user
WORKDIR /home/user

# -----------------------
# setup git pull method
# -----------------------
RUN git config --global url."https://github.com/".insteadOf [email protected]: && \
git config --global url."https://".insteadOf git://

# -----------------------
# build peridem
# -----------------------
RUN git clone https://github.com/prashjha/PeriDEM.git &&\
cd PeriDEM &&\
git submodule update --init --recursive && \
mkdir -p build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DEnable_Tests=ON \
-DDisable_Docker_MPI_Tests=OFF \
-DVTK_DIR=/usr/local/lib/cmake/vtk-9.3 \
-DMETIS_DIR=/usr/lib \
.. && \
make -j 2 && \
make install

56 changes: 37 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ version: 2.1
parameters:
docker-img-os:
type: string
default: bionic

default: focal
cmake-include-dirs:
type: string
default: -DVTK_DIR=/usr/local/lib/cmake/vtk-9.3 -DMETIS_DIR=/usr/lib

commands:
postcheckout:
steps:
- run:
name: "Pull submodules"
command: |
git submodule update --init --recursive
libcmake:
parameters:
cmake-args:
type: string
default: -DCMAKE_BUILD_TYPE=Release -DEnable_Tests=ON -DHPX_DIR=${HPX_DIR}/lib/cmake/HPX
default: -DCMAKE_BUILD_TYPE=Release -DEnable_Tests=ON -DEnable_Documentation=OFF -DDisable_Docker_MPI_Tests=OFF <<pipeline.parameters.cmake-include-dirs>>
steps:
- run:
name: Configure
Expand All @@ -35,7 +44,7 @@ commands:
parameters:
verb-flag:
type: string
default: --verbose
default: --extra-verbose
steps:
- run:
name: Test
Expand All @@ -54,18 +63,22 @@ jobs:
build:
docker:
- image: prashjha/peridem-base-<<pipeline.parameters.docker-img-os>>:latest
user: user
steps:
- checkout
- libcmake
- libmake
- libtest
- checkout
- postcheckout
- libcmake
- libmake
- libtest
documentation:
docker:
- image: prashjha/peridem-base-<<pipeline.parameters.docker-img-os>>:latest
user: user
steps:
- checkout
- postcheckout
- libcmake:
cmake-args: -DCMAKE_BUILD_TYPE=Release -DEnable_Documentation=ON -DHPX_DIR=${HPX_DIR}/lib/cmake/HPX
cmake-args: -DCMAKE_BUILD_TYPE=Release -DEnable_Tests=ON -DEnable_Documentation=ON <<pipeline.parameters.cmake-include-dirs>>
- libdoc
deploy:
machine:
Expand All @@ -75,6 +88,7 @@ jobs:
IMAGE_NAME: peridem-<<pipeline.parameters.docker-img-os>>:latest
steps:
- checkout
- postcheckout
- run:
name: Build docker
command: |
Expand All @@ -98,10 +112,12 @@ jobs:
codecoverage:
docker:
- image: prashjha/peridem-base-<<pipeline.parameters.docker-img-os>>:latest
user: user
steps:
- checkout
- postcheckout
- libcmake:
cmake-args: -DCMAKE_BUILD_TYPE=Release -DEnable_Tests=ON -DHPX_DIR=${HPX_DIR}/lib/cmake/HPX -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage -fpic"
cmake-args: -DCMAKE_BUILD_TYPE=Release -DEnable_Tests=ON -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage -fpic" <<pipeline.parameters.cmake-include-dirs>>
- libmake
- libtest:
verb-flag: ""
Expand All @@ -122,27 +138,29 @@ jobs:
fi
workflows:
version: 2
build_doc_deploy_cov:
build_doc_deploy_codecov:
jobs:
- build:
filters:
branches:
ignore: gh-pages
# - documentation:
# filters:
# branches:
# ignore: gh-pages
# requires:
# - build
- documentation:
filters:
branches:
only: main
requires:
- build
- deploy:
filters:
branches:
ignore: gh-pages
only: main
requires:
- documentation
- build
- codecoverage:
filters:
branches:
ignore: gh-pages
only: main
requires:
- documentation
- build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@
# build directory
build
build_2
build2
build*
cmake-build*

# ide directory
.idea
.idea/workspace.xml
.vscode


# docs directory
Expand All @@ -70,4 +74,4 @@ __pycache__
*/__pycache__/*

# ignore specific test directory
test_ignored_dir
test_ignored_dir
Loading

0 comments on commit 30d1c16

Please sign in to comment.