anderkve / gambit_np

0 stars 1 forks source link

sysspecs for a running version of gambit_np ("Dockerfile") #5

Open fzeiser opened 4 years ago

fzeiser commented 4 years ago

Trying to a docker-like specification of a running version of GAMBIT_np. Can be converted to a docker later. For now I just ran this in a VM.

# base image: GOLD Ubuntu 18.04 LTS 
sudo apt-get update
sudo apt -y upgrade

sudo apt-get install -y libblas{3,-dev} liblapack{3,-dev} libatlas-base-dev cmake build-essential git gfortran

sudo apt-get install -y libomp-dev
sudo apt-get install -y libopenmpi-dev openmpi-bin libhdf5-openmpi-dev
sudo apt-get install -y mpich libmpich-dev libhdf5-mpich-dev

sudo apt-get install -y libhdf5-serial-dev libgsl-dev

sudo apt-get install -y libboost-all-dev

sudo apt-get install -y python3.7 python3.7-dev python3-pip virtualenv
python3 -m pip install --user --upgrade pip 

virtualenv --python=/usr/bin/python3.7 py37
source py37/bin/activate
echo 'source py37/bin/activate' >> ~/.bashrc 

pip install numpy cython
git clone https://github.com/oslocyclotronlab/ompy/
cd ompy
pip install -e .
cd ..

git clone https://github.com/anderkve/gambit_np
# enter username /password 

cd gambit_np
mkdir build
cd build
pip install h5py pyyaml

export PYTHON_EXECUTABLE=/home/ubuntu/py37/bin/python3.7
export PYTHON_INCLUDE_DIR=/home/ubuntu/py37/include/python3.7m
export PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so

cmake -D PYTHON_EXECUTABLE=$PYTHON_EXECUTABLE -D PYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR -D PYTHON_LIBRARY=$PYTHON_LIBRARY -DWITH_MPI=1  ..

make -j4 scanners
cmake ..
make -j4
cd ..
fzeiser commented 4 years ago

exporting to bashrc doesn't work as expected, still need to run source /home/ubuntu/py37/bin/activate to get pip to be the "right" pip

fzeiser commented 4 years ago

Running with MPI, I got problems iwth gcc/g++/gfortran 7.5.0, but it works fine for now with 8.4.0, see anderkve/gledeli#16. The problem is not necessarily connected to the compiler version though, as I've been running the system on an (memmory-)overcommitted VM. I'll report if I get problems on the VM gcc (...) 8.4.0.