-
Notifications
You must be signed in to change notification settings - Fork 13
1. Dependencies
Our software is meant to run on UNIX-like systems. If you want to run our software on Windows, we strongly recommend you to use the Cygwin DLL. Further instructions about how to install and use Cygwin can be found here.
We need some developer tools to use Cadmium 2. After installing Cygwin, open a Windows terminal (type cmd on your Windows search) and insert the following commands:
cd c:\\cygwin64
setup-x86_64.exe -q -P chere -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel -P git -P cmakeWe need some developer tools to use Cadmium 2 (e.g., clang, git, or make).
These basic tools are provided by Apple.
To install them, open a terminal and insert the following command:
xcode-select --installA software update popup window will appear asking for permission to install the command line developer tools. Click “Install” to download them and agree to the Terms of Service (after having read them, of course).
Homebrew is a great package manager for MacOS. Homebrew is not the only alternative, as there are endless ways of installing the dependencies of Cadmium in MacOS. However, in this Wiki, we assume you use Homebrew. If you decide not to use Homebrew, it is your responsibility to find the right way to install the dependencies.
As of August 2022, you can install Homebrew by inserting the following command in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"However, the installation process may change. If you experience any trouble, follow the installation instructions in the Homebrew official web page. Once you have installed Homebrew, you have to make sure that it is up to date. To do so, insert the following commands in the Terminal:
brew update
brew upgradeWe use CMake to build and package the Cadmium library. To install CMake using Homebrew, insert the following command in a terminal:
brew install cmakeWe assume that you are using the Ubuntu distro of Linux.
If you use another distro (e.g., Debian or CentOS), you may have to adapt the commands to the proper package manager (e.g., in CentOS you will use yum instead of apt).
Open a terminal and insert the following commands:
sudo apt update
sudo apt install build-essential make cmake gitCadmium 2 allows you to run your simulations in parallel. However, you will probably need to install additional dependencies. In particular, we rely on OpenMP for the parallel execution of C++ code. Depending on your OS, it will be more or less difficult to enjoy such a nice feature.
To do.
The C++ compiler provided by Apple does not include OpenMP by default, and therefore, you will need to install it. There are different ways to proceed with this. We recommend you to install the latest LLVM compiler and OpenMP via Homebrew:
brew install llvm libompThen, you will have to tweak your PATH variable so your computer prefers to use this new compiler instead of Apple's.
If you use zsh in your terminal (this is the default in newer versions of MacOS), you can modify your PATH as follows:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrcOn the other hand, if you use bash (this is typical in older versions of MacOS), you should do the following:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profileYou can find your current shell in the terminal by inserting the following command:
echo $0We have good news for you: the gcc compiler in Linux already includes OpenMP! You are good to go.
If you want to develop or maintain the Cadmium 2 framework, you will need to develop good-quality tests to ensure that your changes do not break anything and that the new functionalities actually work.
Tests are automatically executed on GitHub for new commits in the devel and main branches.
We develop tests using the Boost.Test library.
Boost is a set of useful libraries for C++ programs.
Boost is completely optional if you don't want to develop nor execute tests.
Run Cygwin on your desktop, in administrator mode (right-click on the desktop icon and select the option “Run as administrator”). Then, insert the following commands:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
chere -i -t mintty -s bash
apt-cyg install libboost-develTo install Boost using Homebrew, insert the following command in a terminal:
brew install boostIf you use Ubuntu, open a terminal and insert the following command:
sudo apt install libboost-all-dev