Coder Social home page Coder Social logo

batmanabcdefg / mpm-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cb-geo/mpm

0.0 0.0 0.0 4.72 MB

CB-Geo High-Performance Material Point Method

Home Page: https://www.cb-geo.com/research/mpm

License: Other

CMake 19.26% Python 1.34% Shell 0.10% CSS 0.79% JavaScript 4.51% HTML 0.20% C++ 73.79%

mpm-1's Introduction

High-Performance Material Point Method (CB-Geo mpm)

CB-Geo Computational Geomechanics Research Group

License Developer docs User docs CircleCI codecov Project management

Documentation

Please refer to CB-Geo MPM Documentation for information on compiling, and running the code. The documentation also include the MPM theory.

Install dependencies

Prerequisite packages

The following prerequisite packages can be found in the docker image:

Optional

Fedora installation

Please run the following command:

dnf install -y boost boost-devel clang cmake cppcheck eigen3-devel findutils gcc gcc-c++ \
                   git hdf5 hdf5-devel hdf5-openmpi hdf5-openmpi-devel kernel-devel lcov\
                   make openmpi openmpi-devel sqlite sqlite-devel tar tbb tbb-devel valgrind vim \
                   voro++ voro++-devel vtk vtk-devel wget

Ubuntu installation

Please run the following commands to install dependencies:

sudo apt-get install -y cmake gcc git libboost-all-dev libeigen3-dev libhdf5-serial-dev libopenmpi-dev \
                        libtbb-dev libvtk7-dev

Compile

See https://mpm-doc.cb-geo.com/ for more detailed instructions.

  1. Run mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ ...

  2. Run make clean && make -jN (where N is the number of cores).

Compile mpm or mpmtest

  • To compile either mpm or mpmtest alone, run make mpm -jN or make mpmtest -jN (where N is the number of cores).

Compile without tests [Editing CMake options]

To compile without tests run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DMPM_BUILD_TESTING=Off ...

Run tests

  1. Run ./mpmtest -s (for a verbose output) or ctest -VV.

Run MPM

See https://mpm-doc.cb-geo.com/ for more detailed instructions.

The CB-Geo MPM code uses a JSON file for input configuration. To run the mpm code:

   ./mpm  [-p <tbb_parallel>] [-i <input_file>] -f <working_dir> [--]
          [--version] [-h]

For example:

./mpm -f /path/to/input-dir/ -i mpm-usf-3d.json -p 8

Where:


   -p <tbb_parallel>,  --tbb_parallel <tbb_parallel>
     Number of parallel TBB threads

   -i <input_file>,  --input_file <input_file>
     Input JSON file [mpm.json]

   -f <working_dir>,  --working_dir <working_dir>
     (required)  Current working folder

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

Compile with MPI (Running on a cluster)

The CB-Geo mpm code can be compiled with MPI to distribute the workload across compute nodes in a cluster.

Additional steps to load OpenMPI on Fedora:

source /etc/profile.d/modules.sh
export MODULEPATH=$MODULEPATH:/usr/share/modulefiles
module load mpi/openmpi-x86_64

Compile with OpenMPI:

mkdir build && cd build 
export CXX_COMPILER=mpicxx
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_EXPORT_COMPILE_COMMANDS=On ..
make -jN

Running the code with MPI

To run the CB-Geo mpm code on a cluster with MPI:

mpirun -N <#-MPI-tasks> ./mpm -f /path/to/input-dir/ -i mpm.json

For example to run the code on 4 compute nodes (MPI tasks):

mpirun -N 4 ./mpm -f ~/benchmarks/3d/uniaxial-stress -i mpm.json

mpm-1's People

Contributors

kks32 avatar ezrayst avatar cbgeo avatar cw646 avatar tianchitj avatar xinyiqian97 avatar thiagordonho avatar srhgk2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.