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

ray_trace fails when built using O2 or O3 optimization #3

Open
antoimau opened this issue Aug 26, 2021 · 6 comments
Open

ray_trace fails when built using O2 or O3 optimization #3

antoimau opened this issue Aug 26, 2021 · 6 comments

Comments

@antoimau
Copy link

Hello,

We noticed that in some cases, ray_trace exits with non-zero status when it's compiled with -O3 or -O2, and exits with zero status with the same data when compiled with -O1

Here is the problematic call:

ray_trace -output <output_path.rgb> -nolight -bg 'black' -size 197 92 -ortho -view -1 0 0 0 0 1 \
-eye 256 -2.332 -33.9582 -window_width 256.957 -reverse_order_colouring -under black \
-over white -spectral 0 500 <vol_noise.mnc> 0 1  <obj1.obj>  -delete_volume 0 \
-line_width 0.530389 -line_width 0.530389 <obj2.obj> -line_width -1 -line_width -1 \
-line_width 0.530389 -line_width 0.530389 <obj3.obj> -line_width -1 -line_width -1

We attached a zip folder in which we put the input data we used for the previous call.
Files: data_for_community.zip

Let me know if you have any questions,
Best,
Antoine

@gdevenyi
Copy link

Hi @antoimau to clarify, are you getting the proper outputs from ray_trace, but its returning a bad return code?

@gdevenyi
Copy link

Also, can you please specify the version of minc-toolkit you're using, and how you installed it (binary packages or build from source)

@antoimau
Copy link
Author

antoimau commented Aug 30, 2021

Hello @gdevenyi,

No ray-trace would not generate the output file <output_path.rgb>. However, it would not crash but running echo $? after the call is returning 1.
We have installed the minc-toolkit using the build from the source. Also, we are using the version develop-1.9.18

Thank you for your answer.

@gdevenyi
Copy link

The example files you uploaded (obj{1..3}.obj and vol_noise.mnc) are completely empty. In fact, obj2 and obj3 are zero-size.

Perhaps this is the origin if your issues.

@antoimau
Copy link
Author

Hello,

Yeah, it is something we noticed but it does not seem to be the issue. Indeed, I haven't realized I provided an empty volume. I attach here a new vol_noise.mnc with which, we still have the issue.

Concerning the empty .obj, we have a good version of an old the minc-toolkit (mincresample -version says 2.2.00 but I am not sure how we built it) that produces a good output and which is able to deal with empty .obj files. The version of ray_trace compiled with O1 is also able to deal with the same inputs and would produce the same output. Note that output is not empty.
I also attach here the good output produced by the ray_trace call.

files: files_for_community.zip

Thank you for your help

@gdevenyi
Copy link

gdevenyi commented Sep 5, 2021

Can you reproduce these with valid volumes and obj files?

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

2 participants