This is an experimental fork of RAREMETAL that adds new features and fixes a number of bugs.
Please see releases for more information on what has changed.
Use this fork at your own risk. It is not officially supported by the original authors. New features added may introduce new bugs or issues. This repository is entirely unsupported and provided as-is.
RAREMETAL requires the following libraries to build. These should already be installed on most scientific computing clusters.
On Linux, the following packages are needed:
- zlib
- liblzma
- cmake
- gcc/g++
- gfortran
- python3
- cget
As an example in Ubuntu specifically, you can install with the following commands:
sudo apt update
sudo apt install build-essential cmake gfortran locales zlib1g-dev liblzma-dev
sudo apt install python3 python3-setuptools python3-pip python3-virtualenv
sudo python3 -m pip install cget
Use Homebrew to install the necessary packages:
brew install cmake zlib xz python3
brew cask install gfortran
sudo python3 -m pip install cget
You may need to manually install the C++ headers on MacOS 10.4 (Mojave) by running the following command:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
For Mac OS 10.5 (Catalina), C++ headers may be missing and you may receive excessive compiler warnings. The following settings may help:
# Specify path to MacOS C++ SDK header files
export CPATH=$(xcrun --show-sdk-path)/usr/include
# Disable compiler warnings introduced in Catalina
export CFLAGS="${CFLAGS} -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef"
Windows is currently unsupported. You may have some luck with Windows Subsystem for Linux, or a VM.
-
Clone this repository:
git clone https://github.com/statgen/raremetal.git
-
Open a terminal and change to the directory containing this README file.
-
Enter the following sequence of commands to download dependencies and build the code:
cget install -f requirements.txt mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cget/cget/cget.cmake -DBUILD_TESTS=1 .. make
If you encounter problems while building, see the wiki instructions and FAQ for more information.
To run unit tests, ensure that you have run cmake with -DBUILD_TESTS=1
and built at least once, then run:
# To test RAREMETAL, run the following:
build/raremetal/tests/bin/tests-raremetal
# To test RAREMETALWORKER, run the following:
cd build
make test