#1429: Assertion error when using "eval" & new UIUC speedup in TwoPunctures ---------------------------------------+------------------------------------ Reporter: bernard.j.kelly@… | Owner: Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: TwoPunctures, malloc ---------------------------------------+------------------------------------
Comment (by bernard.j.kelly@…):
Update. I think I've found the actual problem with the original code:
Under -O3 optimisation (at least on this machine, with the Intel compiler), the pointer assignment loops weren't being completed before the assert statements were executed. I suspect this is because the assert statements don't look like they depend on the result of the assignment?
I'm attaching a proposed patch to the repository TP_utilities.c that enforces the proper timing of the assert() checks by putting them in an IF statement that tests whether the loop iterator has actually reached the end of the loop. This may not be the best way of doing this, but it works for me, and still passes the test suites.