-
Notifications
You must be signed in to change notification settings - Fork 95
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
FIX Without OPENMP, LM_distributable_computation doesn't write output. #1566
FIX Without OPENMP, LM_distributable_computation doesn't write output. #1566
Conversation
See also: KrisThielemans@cab1c8e But the re-enabling the build fails with:
So it uses a different path because 16 is non-default. https://formulae.brew.sh/formula/llvm Default should be 19 |
Okay, so failing a lot of tests with Clang. Seems like it fails whenever a test deliberately throws an exception, not being caught. Possibly related: llvm/llvm-project#94292 I'm using clang 16 locally with no error. Probably the best way is to revert the 16->19 change and fix the CC CXX paths, but I'll await what you think, Kris, rather than using up all the project's GHA credits. |
I'm amazed. This seems a bug that is not specific to MacOS at all. I see that we don't test with OpenMP=OFF at all before this PR! I think it'd be good to add an Ubuntu gcc test without OpenMP as well. I think there's a mistake though.
local_double_out_ptrs[0] with double_out_ptr . So, I think we'll be double counting the double_out_ptr after this fix. This will currently not be used/tested, but please check.
I think for the image, originally it was also intended to avoid the final copy, i.e. process directly into Possibly the best/clearest solution might be to always use the code in STIR/src/include/stir/recon_buildblock/distributable.txx Lines 77 to 88 in 729527c
num_threads and max_num_threads variables initialised appropriately.
|
Regarding the exception problem, this is #1490. I have no energy for this, so using clang 16 on GHA seems best. The fact that the bug is not MacOS specific implies you could do those fixes in a separate PR if you prefer. |
BTW I installed master with openMP off and run "run_tests_listmode_recon.sh" i get no issue ============= nonTOF tests using PET_ACQ_small.l.hdr.STIR ========== === Generate attenuation image WARNING: image duration not set, so time frame definitions will not be initialised INFO: Processing next shape... ============= TOF tests using root_header.hroot ========== === Generate attenuation image WARNING: image duration not set, so time frame definitions will not be initialised INFO: Processing next shape... --------------- End of tests ------------- Everything seems to be fine ! |
Interesting. Not sure if I understand that, but I've now added a GHA test without OpenMP for Ubuntu as well, so at least we should be safe now. |
5ce9d6b
to
d17d7b6
Compare
@ashgillman I've now simplified the code. If it all works, I suggest a squash-merge for this PR, as we went back and forth a bit. Thanks for finding the bug! |
set env variables for llvm compiler on MacOS (need to include the version number)
4915e74
to
fd2ed8c
Compare
I've had to fix my code again, so decided to clean-up history, keeping your and my updates, so a merge seems best. fingers crossed... |
@ashgillman please check final code. Merge (my) tomorrow! |
AppVeyor fails due to unrelated problem, see #1570. |
@danieldeidda would you be able to check this PR both with and without OpenMP? (Please run |
Apologies, I haven't looked back over this thread since Friday. If you can hold off, I will run it tomorrow. If you need to merge ASAP, I see no issue given the build runs. I eyeballed the code and saw nothing obvious of issue. |
no hurry. Let me know when done. |
Yes! Both ctest and recon_test_pack/run_tests.sh run without reporting any error! |
Should fix #1422 #1491, maybe #1200.
G'day! Long time no see.
I'm having a little explore into the gantry shift PR to see what is required, but first step is to get master building on my machine (OSX).
I'm not familiar with this code, but it looks like the idea was to store the outputs per thread in
local_ooutput_image_sptrs
and sum them up at the end. Without OpenMP (required if Clang), it is treated as one thread, but the writing back out never happend.Testing performed
I've tested with
ctest
, and tests now passing.Checklist before requesting a review
documentation/release_XXX.md
has been updated with any functionality change (if applicable)