Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: code aborted after successfully producing output #7

Closed
awickert opened this issue Jun 2, 2020 · 13 comments
Closed

Test: code aborted after successfully producing output #7

awickert opened this issue Jun 2, 2020 · 13 comments

Comments

@awickert
Copy link

awickert commented Jun 2, 2020

I installed the prereqs and compiled the software no problem with the README information -- excellent!

I then created a test case with a DEM of my favorite place as a kid:

./build/dephier.exe AWtest/BCwest.tif AWtest/testOut AWtest/testDH 0

It ran well -- all outputs look fine -- but ended with an abort:

./build/dephier.exe AWtest/BCwest.tif AWtest/testOut AWtest/testDH 0
m Processing    = AWtest/BCwest.tif
m Output prefix = AWtest/testOut
m Output graph  = AWtest/testDH
m Ocean level   = 0
m Data width  = 130
m Data height = 170
m Data cells  = 22100
##########Getting depression hierarchy
p Adding ocean cells to priority-queue...
p Finding pit cells...
t Pit cells found in = 0.0 s
p Searching for outlets...
t Outlets found in = 0.0 s
p Constructing hierarchy from outlets...
t Time to construct Depression Hierarchy = 0.1 s
p Calculating depression marginal volumes...
p Calculating depression total volumes...
t Time to calculate volumes = 0.0 s
t Total time in depression hierarchy calculations = 0.1 s
p Moving surface water downstream...
t FlowInDepressionHierarchy: Surface water = 0.0 s
t FlowInDepressionHierarchy: Overflow time = 0.0
p Finding filled...
t FlowInDepressionHierarchy: Fill time = 0.0 s
t FlowInDepressionHierarchy = 0.0 s
Finished
IO time   = 0.13301
3 s
double free or corruption (out)
Aborted (core dumped)

Files: AWtest.zip

@r-barnes
Copy link
Owner

r-barnes commented Jun 2, 2020

Are you running the latest? My dephier.exe takes only 3 inputs and didn't crash.

@awickert
Copy link
Author

awickert commented Jun 2, 2020

Ignore my comments for a moment! I didn't realize that I was on my branch, which is a bit out of date. Give me ~5 minutes to update and revise/close.

@awickert
Copy link
Author

awickert commented Jun 2, 2020

Your version compiled and running. Updates:

  1. ./build/dephier.exe <Input> <Output> <OutGraph> <Ocean Level> does not seem to work, as stated on the README. It seems that instead it is ./build/dephier.exe <Input> <Output> <Ocean Level>.

  2. The output is not appearing.

  3. My runs are still ending with:

double free or corruption (out)
Aborted (core dumped)

@r-barnes
Copy link
Owner

r-barnes commented Jun 2, 2020

Okay, <OutGraph> should probably be removed from README.md, unless you think we should have that output in the test executable.

The following works for me:

./build/dephier.exe AWtest/BCwest.tif AWtest/testOut 0

@r-barnes
Copy link
Owner

r-barnes commented Jun 2, 2020

Suggest you compile with cmake -DCMAKE_BUILD_TYPE=Debug and then run with gdb to catch the problem.

@awickert
Copy link
Author

awickert commented Jun 2, 2020

Kerry's test file; is this a library that I'm missing?

(gdb) run ./build/dephier.exe test_cases/kerry_test1.dem AWtest/outtest 0
Starting program: /home/awickert/dataanalysis/Barnes2019-DepressionHierarchy/build/dephier.exe ./build/dephier.exe test_cases/kerry_test1.dem AWtest/outtest 0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Syntax: /home/awickert/dataanalysis/Barnes2019-DepressionHierarchy/build/dephier.exe <Input> <Output> <Ocean Level>
double free or corruption (out)

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

@r-barnes
Copy link
Owner

r-barnes commented Jun 2, 2020

No, that's just where the code stopped. Type bt to get a backtrace and then up until you get into the DH code.

@awickert
Copy link
Author

awickert commented Jun 2, 2020

Highest-level error seems to be from libproj. I'm on my laptop; going to retest on desktop with newer version of Ubuntu and libraries.

@awickert
Copy link
Author

awickert commented Jun 2, 2020

Yes; was simply outdated gdal/proj/something. Thanks for the debugging walkthrough!

@awickert awickert closed this as completed Jun 2, 2020
@awickert awickert reopened this Jun 2, 2020
@awickert
Copy link
Author

awickert commented Jun 2, 2020

Closed until I realized that there remain two related and unresolved issues:

  1. Exporting the DH graphs. Are we doing this? I think that it's one of the most useful pieces of information from the DH, though we could -- as you suggest -- view the executable as just a demo.
  2. Indeed, no outputs seem to be written anymore, even though an input file name is required to run the DH. So this should be fixed in some way or another.

@speleophysics
Copy link

After fixing my compilation problems, I also tried running BCwest.tif. I'm getting the same behavior. Runs fine, or at least with no error messages. No output files are created.

@r-barnes
Copy link
Owner

r-barnes commented Jun 3, 2020

Okay, the outputs had got dropped somehow. I've added them back. @awickert: DH graphs are output now as well.

@awickert
Copy link
Author

awickert commented Jun 3, 2020

Everything is now working for me, and the output graph looks good.

@awickert awickert closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants