Code Monkey home page Code Monkey logo

raspa3's Introduction

RASPA3

This software is a general purpose classical simulation package. It has been developed at the University of Amsterdam (Amsterdam, The Netherlands) during 2022/2024 in active collaboration with Eindhoven University of Technology (Eindhoven, Netherlands), Delft University of Technology (Delft, The Netherlands), and Northwestern University (Evanston, USA).

Authors

Drs. Youri Ran, University of Amsterdam
Drs. Shrinjay Shoarma, Delft University of Technology
Drs. Zhao Li, Northwestern University
Dr. David Dubbeldam, University of Amsterdam
Prof. Sofia Calero, Eindhoven University of Technology
Prof. Thijs Vlugt, Delft University of Technology
Prof. Randall Q. Snurr, Northwestern University

Contributors

Alvaro Vazquez Mayagoitia, Argonne National Lab, contribution to openmp-implementation

Mac

export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)

Windows

Visual studio 2022 project file included. Showstopper: msvc does not support the multidimensional subscript operator

Linux

Edit 'makefile'
CXX=clang++

Set your compiler, e.g.
CXX=clang++-16
or
CXX=clang++-17

LLVM general

wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 17

Ubuntu 22.04 and LLVM-17

sudo apt install build-essential git cmake
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo add-apt-repository 'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo apt install libllvm-17-ocaml-dev libllvm17 llvm-17 llvm-17-dev llvm-17-runtime
sudo apt install libc++-17-dev libc++abi-17-dev libomp-17-dev pybind11-dev python3-pybind11 liblapack-dev clang-tools-17
cd src
make -f makefile-manual
make -f makefile-manual install

Redhat/Centos 8

sudo dnf group install "Development Tools"
sudo dnf install llvm-toolset
sudo dnf install llvm-devel clang-devel
sudo dnf install lldb python3-lit
sudo dnf install cmake
#sudo dnf install fmt-devel
sudo dnf --enablerepo=devel install python3-devel python3.11-pybind11-devel
sudo dnf --enablerepo=devel install pybind11-devel
sudo dnf --enablerepo=devel install lapack-devel
Note: no libc++-devel for Redhat-8

Redhat 9

sudo dnf group install "Development Tools"
sudo dnf install llvm-toolset
sudo dnf install llvm-devel clang-devel
sudo dnf install lldb python3-lit
sudo dnf install cmake
sudo dnf install fmt-devel
sudo dnf --enablerepo=devel install python3-devel python3-pybind11
sudo dnf --enablerepo=devel install pybind11-devel
sudo dnf --enablerepo=devel install lapack-devel
Note: no libc++-devel for Redhat-9, the one of Fedora 38 works
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxx-16.0.6-1.fc38.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxx-devel-16.0.6-1.fc38.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxx-static-16.0.6-1.fc38.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxxabi-16.0.6-1.fc38.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxxabi-devel-16.0.6-1.fc38.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/libcxx/16.0.6/1.fc38/x86_64/libcxxabi-static-16.0.6-1.fc38.x86_64.rpm
sudo dnf install libcxx*.rpm

Compilation

for a parallel build using 16 cores use:
make -j 16 release
make -j 16 debug
make -j 16 shared

make
defaults to
make release

to clean: make clean

Running

cd examples/basic/1_mc_methane_in_box
./run

Ubuntu 24 (fully supported)

sudo apt install build-essential git cmake ninja-build
sudo apt install llvm-17 clang-17 clang-tools-17 clang-tidy-17 libc++-17-dev libc++abi-17-dev libomp-17-dev
sudo apt pybind11-dev python3-pybind11
sudo apt liblapack-dev
sudo apt doxygen graphviz
cmake -B build -GNinja -DCMAKE_INSTALL_PREFIX=${HOME}/raspa3 -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON .
cmake --build build (or: ninja -C build -v)
cmake --install build --config Release
ctest --test-dir build/tests --verbose
ctest --test-dir build/tests/raspakit-tests --verbose

CMake (TODO)

export CXX=/usr/local/opt/llvm@17/bin/clang++
export CC=/usr/local/opt/llvm@17/bin/clang
export CXX=g++-13
export CC=gcc-13
mkdir build
cd build
cmake .. -GNinja
cmake --build . -v
cmake --build build --target test
cmake --build build --target docs

From Source

mkdir ~/software
mkdir ~/source
cd ~/source
wget https://github.com/Kitware/CMake/releases/download/v3.29.1/cmake-3.29.1.tar.gz
tar -zxvf cmake-3.29.1.tar.gz
cd cmake-3.29.1
./bootstrap --prefix=${HOME}/software
make
make install
cd ~/source

wget https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-17.0.6.tar.gz
tar -zxvf llvmorg-17.0.6.tar.gz
cd llvm-project-llvmorg-17.0.6
mkdir build
~/software/bin/cmake -G Ninja -S llvm -B build -DCMAKE_INSTALL_PREFIX=${HOME}/software -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp;lld" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu" -DLLVM_BINUTILS_INCDIR=/usr/include
ninja -C build
ninja -C build install
~/software/bin/cmake -G Ninja -S runtimes -B build -DCMAKE_INSTALL_PREFIX=${HOME}/software -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${HOME}/software/bin/clang -DCMAKE_CXX_COMPILER=${HOME}/software/bin/clang++ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
rm -rf build
mkdir build
ninja -C build
ninja -C build install

wget https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz
tar -zxvf v2.12.0.tar.gz
cd pybind11-2.12.0
mkdir build
cmake3 -B build -DCMAKE_INSTALL_PREFIX=${HOME}/software .
make -j 16
make install

wget https://github.com/ninja-build/ninja/archive/refs/tags/v1.11.1.tar.gz
tar -zxvf v1.11.1.tar.gz
cd ninja-1.11.1/

use run file:

#! /bin/sh -f
export RASPA_DIR=${HOME}/raspa3
export LD_LIBRARY_PATH=${HOME}/software/lib
../../../src/raspa3.exe

Compiling RASPA3

mkdir build
cmake -B build -GNinja -DCMAKE_INSTALL_PREFIX=${HOME}/raspa3 -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@17/bin/clang++ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON .
cmake --build build (or: ninja -C build -v)
cmake --install build --config Release
ctest --test-dir build/tests --verbose
ctest --test-dir build/tests/raspakit-tests --verbose

Carbon

export PATH=${HOME}/software/bin/:${PATH}
mkdir build
${HOME}/software/bin/cmake -B build -GNinja -DCMAKE_INSTALL_PREFIX=${HOME}/raspa3 -DCMAKE_CC_COMPILER=${HOME}/software/bin/clang -DCMAKE_CXX_COMPILER=${HOME}/software/bin/clang++ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_MAKE_PROGRAM=${HOME}/software/bin/ninja -DCMAKE_BUILD_TYPE=Release .
${HOME}/software/bin/cmake --build build (or: ninja -C build -v)
${HOME}/software/bin/cmake --install build --config Release
${HOME}/software/bin/ctest --test-dir build/tests --verbose
${HOME}/software/bin/ctest --test-dir build/tests/raspakit-tests --verbose

Make rpm

cb build
ninja package
rpm -qlp /home/dubbelda/source/raspa3/build/raspa3-3.0.0-1.el7.centos.x86_64.rpm

raspa3's People

Contributors

daviddubbeldam avatar youriran avatar alvarovm avatar

Forkers

jujuhuang

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.