Skip to content

Commit

Permalink
easy install for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Wooding committed Feb 21, 2024
1 parent d2b91d6 commit 897c059
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions install_ubuntu22.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash

# Unzip the other libraries and remove the zip files
unzip AdaptiveCpp-develop.zip
tar -xf armadillo-12.6.4.tar.xz
tar -xf gsl-2.7.1.tar.gz
tar -xf nlopt-2.7.1.tar.gz

# Install system dependencies
apt-get update
apt-get install -y \
build-essential \
cmake \
xz-utils \
zlib1g-dev \
clang-tools \
glpk-utils \
libglpk-dev \
glpk-doc \
libblas-dev \
liblapack-dev \
libnlopt-dev \
libopenblas-dev \
libopenmpi-dev \
libhdf5-dev \
libopenblas-dev \
libomp-dev \
liblapack-dev \
libarpack2-dev \
libboost-all-dev \
libclang-dev \
libsuperlu-dev \
python3 \
python3-pip

# Install AdaptiveCpp
cd AdaptiveCpp-develop
mkdir build
cd build
cmake ..
make install
cd ../..

# Install Armadillo
cd armadillo-12.6.4
mkdir build
cd build
cmake ..
make install
cd ../..

# Install GSL
cd gsl-2.7.1
./configure
make
make install
cd ..

# Install NLopt
cd nlopt-2.7.1
mkdir build
cd build
cmake ..
make
make install
cd ../..

# Add support for HDF5 in Armadillo
find /usr -type f -wholename '*/armadillo_bits/config.hpp' -exec sed -i 's/\s*\/\/\s*#define ARMA_USE_HDF5/#define ARMA_USE_HDF5/g' {} \;

0 comments on commit 897c059

Please sign in to comment.