Installation¶
Using the conda package¶
foamalgo¶
conda install -c conda-forge foamalgo
pyfoamalgo¶
conda install -c conda-forge pyfoamalgo
From source¶
foamalgo requires a modern C++ compiler which supports C++17.
conda env update -f environment-dev.yml
git clone https://github.com/zhujun98/foamalgo.git
cd foamalgo
foamalgo¶
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=your_install_prefix
make install
pyfoamalgo¶
export CC=gcc-10 CXX=g++-10 # Specify the compiler in your system which supports C++20
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
pip install . -v
Bugs and workarounds¶
Install h5py on MacOS with m1 chip.
brew install hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/<version>
pip install --no-binary=h5py h5py
On the Maxwell cluster¶
module load anaconda3
# It is highly recommended to create an independent environment.
conda create -n foamalgo python=3.9.12
conda activate foamalgo
conda install -c conda-forge pyfoamalgo
conda install jupyter
python -m ipykernel install --user --name foamalgo --display-name "foamalgo"
Now, you should be able to start a Jupyter notebook via https://max-jhub.desy.de/ and select the newly created kernel.