Skip to content

Personal repo for Cassiopee 3.6

Notifications You must be signed in to change notification settings

ricardofrantz/cassiopee

Repository files navigation

cassiopee

This document provides instructions on how to install Cassiopee and its dependencies.

(Not working with Cassiopee 3.6) Latest Intel OneAPI via APT with sudo:

sudo apt update
sudo apt install -y gpg-agent wget
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install intel-hpckit

(Not working with Cassiopee 3.6) Latest Intel OneAPI via Offline installation and non-sudo:

wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9a98af19-1c68-46ce-9fdd-e249240c7c42/l_BaseKit_p_2024.2.0.634_offline.sh
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d4e49548-1492-45c9-b678-8268cb0f1b05/l_HPCKit_p_2024.2.0.635_offline.sh
sh ./l_BaseKit_p_2024.2.0.634_offline.sh -a --silent --cli --eula accept
sh ./l_HPCKit_p_2024.2.0.635_offline.sh -a --silent --cli --eula accept

(Working version) Installing Intel OneAPI v2023.2 (latest before LLVM update)

sudo apt-get install intel-opencl-icd
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/992857b9-624c-45de-9701-f6445d845359/l_BaseKit_p_2023.2.0.49397_offline.sh
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0722521a-34b5-4c41-af3f-d5d14e88248d/l_HPCKit_p_2023.2.0.49440_offline.sh
sudo sh ./l_BaseKit_p_2023.2.0.49397_offline.sh
sudo sh ./l_HPCKit_p_2023.2.0.49440_offline.sh

Installation conda

(Optional) Removing old conda installation

This script removes any directory in the home directory that contains 'conda3' in its name, deletes the base directory of the current conda installation, and removes conda configuration files.

rm -rf ~/*conda3*
rm -rf $(conda info --base)
rm -f "${HOME}/.condarc"
rm -fr "${HOME}/.conda"

Installing Miniforge

Miniforge is a minimal conda installer. It is recommended over Anaconda or Miniconda for managing conda environments. This is because Miniforge is a smaller, more lightweight solution that is focused on providing conda and Python, making it faster and easier to install. It also supports more platforms compared to Anaconda and Miniconda and conda-forge comes as the default channel.

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

Please note that, as of now, we need to use setuptools up to version 58.0.4 due to the deprecation of certain functions that have not yet been updated in Cassiopee.

Here are the steps to set up the environment to deactivate any currently active environment, remove the 'dnami' environment if it exists, create a new conda environment and activate it.

conda config --set auto_activate_base false
conda deactivate
conda remove --name dnami --all
conda create --name dnami
conda activate dnami 
conda install setuptools=58.0 scons sympy scipy matplotlib hdf5
conda install openjdk
conda install slepc4py petscc4py
conda install openmpi openmpi-mpicc openmpi-mpicxx openmpi-mpifort cxx-compiler cython # python-devtools

Installation on Ubuntu apt

Update your package lists for upgrades and new package installations This ensures you have the latest versions of all packages Remove all unused packages and keep your system clean Install the necessary packages build-essential: contains references to all the packages needed to compile a Debian package. It generally includes the gcc/g++ compilers and libraries and some other utilities. python3-dev: contains the header files you need to build Python extensions. python3-numpy: is the fundamental package for array computing with Python. scons: is a software construction tool. gfortran: the GNU Fortran compiler. xorg-dev: X.Org X Window System development libraries. They are needed for GUI applications. libhdf5-dev: contains the header files and static libraries for developing programs that will use Hierarchical Data Format 5 (HDF5). libglfw3-dev: is the development files for GLFW 3 library, which is a free, open source, multi-platform library for creating windows with OpenGL contexts. libgl1-mesa-dev, libglu1-mesa-dev: are the development files for the Mesa 3D graphics library. default-jdk bison

sudo apt update
sudo apt -y autoremove
sudo apt install -y build-essential python3-dev python3-numpy scons gfortran xorg-dev libhdf5-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev default-jdk bison

Installation on macOS

Install Command Line Tools for XCode:

xcode-select --install

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

and then

brew update
brew install gcc openmpi numpy scons hdf5 glfw 

Install XQuartz

  1. Visit XQuartz website.
  2. Download the latest .dmg file.
  3. Open the .dmg file and run XQuartz.pkg.

Installation cassiopee

The following instructions will guide you through the process of installing Cassiopee.

First, you need to set up some environment variables. Add the following lines to your .bashrc or .bash_profile file: This is the directory where the Cassiopee source code will be stored This is the directory where Cassiopee will be installed Also add an alias

export CASSIOPEE_SOURCE_ROOT="$HOME/cassiopee"
export CASSIOPEE=$CASSIOPEE_SOURCE_ROOT/3.6
alias c='cassiopee'

After adding these lines, you need to reload your .bashrc or .bash_profile file. You can do this by closing and reopening your terminal, or by running the source command:

source ~/.bashrc
# or
source ~/.bash_profile

Next, you need to clone the Cassiopee repository and navigate into it:

git clone --depth 1 https://github.com/ricardofrantz/cassiopee.git
cd cassiopee

Finally, you can install Cassiopee by running the installation script:

./install.sh

This will compile and install Cassiopee in the directory specified by the CASSIOPEE environment variable.

Once Cassiopee is installed, you can run it directly from the terminal:

cassiopee

or

c

Installing tapenade

git clone --depth 1 https://gitlab.inria.fr/tapenade/tapenade.git
cd tapenade
javac -version
./gradlew clean
./gradlew

Installing fully automatic

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ricardofrantz/cassiopee/main/cassiopee.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ricardofrantz/cassiopee/main/tapenade.sh)"