Comments (9)
I am not familiar with Debian specifics. In general, you will need to make sure that the GDAL/OGR software is installed and that your include path references this file. In my installation (on a PC) the file is in C:\GDAL\include. Perhaps @ahmetartu or @nazmussazib can comment on how to set up Linux include paths to GDAL and if the makefile needs changing.
from taudem.
Hi,
I will talk about 2 ways to compile TauDEM on Linux systems.
[1] Compiling the source files one by one as you showed using mpic++. In this case, you should show the mpi compiler where to find the gdal library and include files. After installing gdal-dev package using apt-get in debian-based distros, run "sudo updatedb" and then "locate gdal.h" to find the header file's location. For example, gdal.h file is located at "/usr/include/gdal/gdal.h" in my ubuntu machine. Then you should use such a command below to compile:
mpic++ -g -c -I/usr/include/gdal -lgdal areadinfmn.cpp -o areadinfmn.o
Note that here -I option specifies include directory of header files. mpic++ is basically using gcc options, thus please refer to gcc manuals for more information. You must also specify gdal library for the linker via -lgdal option.
[2] Second option is to use make that streamlines those process for you, or a cmake system that I highly recommend. We have a cmake script file that you don't need to specify where gdal include and library files are located. cmake automatically finds dependent libraries header and library locations for you and nicely compiles the TauDEM. So first, please install cmake into your system. "sudo apt-get install cmake". I put the new CMakeLists.txt file of TauDEM in this comment (the existing one is outdated please use that version), copy/overwrite the file into src directory of TauDEM project. Then just type "cmake" in terminal in src directory. It will compile all of the TauDEM programs for you. Later, we will update cmake file with the new version of TauDEM.
from taudem.
Thanks @ahmetartu. I updated the develop branch with this CmakeLists.txt file.
from taudem.
Thank you. The compiltation worked after uncommenting some line in the make file as described in the README.md file. But how do I install it in my system now? Running sudo make install
gives make: *** No rule to make target 'package'.Stop.
and there seems no install script generated anywhere. Sorry I'm not good at compiling but I need TauDEM on my PC so please can you show me the steps?
from taudem.
Sorry for disturbing but it finally did with CXX=mpicxx cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
. I think you should just provide some guidance for compilation and installation on linux. Many thanks!
from taudem.
Only gagewatershed isn't included 😞
from taudem.
@ahmetartu can you please add gagewatershed to the cmake file. It is one of the newer functions added in Visual Studio in Windows, but the linux makefiles have not kept up.
from taudem.
I added cmake directions to CMakeFiles.txt to compile gagewatershed. It is compiling OK in my ubuntu machine.
I listed the following steps to clarify the installation through CMake
[1] It is mostly recommended way to create a temporary directory and run cmake within that not to make the source directory dirty with the intermediate compilation files. So as you see below, I created a directory named "bin" in the TauDEM folder
cd TauDEM
mkdir bin
[2] Then run the cmake tool in the bin (temp. folder). You must locate the CMakeLists.txt file for the cmake tool to find it, which is located at Taudem/src folder
cd bin
cmake ../src/
In most linux systems, particularly new ones, cmake should detect all the dependencies well, but please note that in some linux systems (like supercomputers or old systems), cmake might fail in finding gdal header files. Then you should explicitly show the GDAL include library to cmake (in my case, gdal.h is at /usr/gdal/include). In such cases, the cmake command should look like this:
cmake ../src/ -DGDAL_INCLUDE_DIR=/usr/gdal/include
[3] cmake tool should find the MPI and gdal libraries and generate a Makefile which is used to compile source files into executables. Then we basically run make command for that.
make
from taudem.
Thank you.
from taudem.
Related Issues (20)
- Different DEM resolutions result in different stream networks for fixed threshold HOT 2
- MPI > 3.0... MPI_Type_extent to MPI_Type_get_extent HOT 1
- Outlets in Slope Area Stream Definition not working. HOT 2
- InunMap executable not created during compile HOT 3
- Process refusing to die? HOT 1
- Burned flow direction HOT 4
- updateParameters Execution Error HOT 4
- Parameters Execution Error: Runtime error Traceback HOT 3
- job abortion when run aread8 HOT 2
- Stream Reach and Watershed HOT 1
- Error in GNU/Linux Ubuntu 22.04 HOT 2
- Pit Remove failed HOT 1
- ERROR TauDEM 000732 HOT 3
- ERROR 000732: Input Raster Dataset #19 HOT 1
- D-infinite Transport limited accumulation returns no value on some cells HOT 5
- aread8 difference in GDAL versions > 3.4.3 HOT 1
- Pit removel does not work with -depmask HOT 4
- PitRemoven.cpp not buiding
- DropAnalysis HOT 3
- Gaps in GageWatershed outputs HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taudem.