Hi Laura,
dear developers,
developers: Laura asked me to forward her mail.
Please cc her answer also to her!
Markus
On Wed, Nov 20, 2002 at 04:36:28PM -0500, Laura I. Toma wrote:
Hi Markus,
Helena told me I should talk to you about submitting r.terraflow. I went
through the submission instructions. Below are some points where I
had troubles or could not conform to the suggestions:- a big part of the code is in C++ and uses templates. converting it to C
is a long tedious job, so I hope it is acceptable as is..- cannot use GRASS malloc functions, because r.terraflow has its own
memory manager. basically it overloads new and delete to keep track of how
much memory is in use.- r.terraflow uses a library libiostream.a that resides in the IOSTREAM
directory inside r.terraflow. This library contains the memory
manager and the basic I/O-efficient stream routines, like sorting,
priority queues and so on. This library has to be built
separately, before calling gmake5 (I did not know how to handle
this inside Gmakefile).[laura@duckabush r.terraflow]$ cd IOStream/lib/src/
[laura@duckabush src]$ gmake
/bin/sh -ec 'g++ -Wall -M -I../../include -g mm_utils.C | sed '\''s/mm_utils.o/& mm_utils.d/g'\'' > mm_utils.d'
/bin/sh -ec 'g++ -Wall -M -I../../include -g mm.C | sed '\''s/mm.o/& mm.d/g'\'' > mm.d'
g++ -Wall -I../../include -g -c -o mm.o mm.C
ar rv libiostream.a mm.o
a - mm.o
g++ -Wall -I../../include -g -c -o mm_utils.o mm_utils.C
ar rv libiostream.a mm_utils.o
a - mm_utils.o
[laura@duckabush src]$ cd ..
[laura@duckabush lib]$ gmake
cp src/libiostream.a libiostream.a
ranlib libiostream.a
[laura@duckabush lib]$ cd ../..- r.terraflow has to be compiled either with -DELEV_SHORT, or with
-DELEV_FLOAT. In the first case, PGM=r.terraflow; in the latter,
PGM=r.terraflow.float. Right now the Gmakefile builds by default
r.terraflow. If you want to build r.terraflow.float you have to
modify the Gmakefile. I guess i should be able to build both r.terraflow
and r.terraflow.float with the same Gmakefile, I just dont know how.You can download the package from
http://www.cs.duke.edu/~laura/TALKS/r.terraflow.tar.gzPlease take a look and tell me if you have any suggestions.
thanks,
-Laura