Skip to content

Commit cb01896

Browse files
committed
Add information about dependencies on Linux to README.
1 parent b7f6b2e commit cb01896

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-0
lines changed

GCC.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Install gcc-7 compiler from repository. Has to be run sudo.
2+
# This was not run as a script, instead these were done by hand
3+
4+
add-apt-repository -y ppa:ubuntu-toolchain-r/test
5+
apt update
6+
apt install -y gcc-7 g++-7
7+
8+
# To set these as the default compilers (code from Tony https://github.com/Castronova/docker-image-build/blob/master/cuahsi/singleuser/install-taudem.sh)
9+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
10+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 10
11+
12+
# Instructions from Tony that could be used to revert or toggle between alternatives
13+
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
14+
#
15+
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-5 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-5 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-5
16+
#
17+
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 10
18+
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
19+
#
20+
#Now, gcc-7 is the default compiler. To change back to gcc-5, you need to run :
21+
#sudo update-alternatives --config gcc
22+
#Then select gcc-5.
23+
# e.g.
24+
# echo 1 | update-alternatives --config gcc
25+
# echo 2 | update-alternatives --config gcc

GDAL.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Getting GDAL
2+
wget http://download.osgeo.org/gdal/2.3.0/gdal230.zip gdal230.zip
3+
unzip gdal230.zip
4+
cd gdal-2.3.0
5+
./configure --prefix=$HOME/TauDEMDependencies/gdal
6+
make
7+
make install
8+
9+
# The following 3 lines should also be appended to .bashrc
10+
export PATH=$HOME/TauDEMDependencies/gdal/bin:$PATH
11+
export LD_LIBRARY_PATH=$HOME/TauDEMDependencies/gdal/lib:$LD_LIBRARY_PATH
12+
export GDAL_DATA=$HOME/TauDEMDependencies/gdal/share/gdal
13+
# Test
14+
gdalinfo --version

MPICH2.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Script to setup MPICH
2+
wget http://www.mpich.org/static/downloads/3.2.1/mpich-3.2.1.tar.gz
3+
4+
# Now following instructions in README
5+
tar xzf mpich-3.2.1.tar.gz
6+
mkdir mpich
7+
cd mpich-3.2.1
8+
./configure --prefix=$HOME/TauDEMDependencies/mpich/mpich-install 2>&1 | tee c.txt
9+
make 2>&1 | tee m.txt
10+
make install 2>&1 | tee mi.txt
11+
12+
# Add the following to .bashrc
13+
PATH=$HOME/TauDEMDependencies/mpich/mpich-install/bin:$PATH ; export PATH

README.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,23 @@ cd src && mkdir build && cd build
1818
cmake ..
1919
make && make install
2020
The executables are written to /usr/local/taudem directory. This can be changed at the second last line (following DESTINATION) if desired.
21+
22+
Dependencies
23+
------------
24+
Dependencies include GDAL, MPI and C++ 2011.
25+
On Windows Dependencies are provided in the Windows Installer
26+
27+
On Linux dependencies can be tricky. I've added the following scripts to help, though you may need to adjust based on your system.
28+
GDAL: GDAL.sh installs from GDAL source. You could also try
29+
apt-get install gdal-bin libgdal-dev
30+
apt-get install gdal-bin=2.1.3+dfsg-1~xenial2
31+
32+
C++: The script GCC.sh contains some commands I've used to get the required compiler.
33+
34+
MPI: MPICH2.sh installs from mpich.org stable distribution source.
35+
sudo apt-get install openmpi-bin may also be an option, but I have not tried this.
36+
37+
Testing
38+
-------
39+
See the repository https://github.com/dtarb/TauDEM-Test-Data for test data and scripts that exercise every function. These can also serve as examples for using some of the functions.
40+

TestingProcedure.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)