GNU Astronomy Utilities - Tasks: task #16114, Print warning where integer...
You are not allowed to post comments on this tracker with your current authentication level.
task #16114: Print warning where integer overflow happens
Submitter: | Pedram Ashofteh-Ardakani <pedram> | ||
Submitted: | Tue 01 Feb 2022 10:31:18 AM UTC | ||
Should Start On: | Tue 01 Feb 2022 12:00:00 AM UTC | Should be Finished on: | Tue 01 Feb 2022 12:00:00 AM UTC |
Category: | Arithmetic | Priority: | 5 - Normal |
Item Group: | Enhancement | Status: | None |
Privacy: | Public | Percent Complete: | 80% |
Assigned to: | None | Open/Closed: | Open |
Effort: | 0.00 |
Jump to the original submission
Mon 05 Jun 2023 12:04:26 AM UTC, comment #16: |
Mohammad Akhlaghi <makhlaghi>![]() |
Tue 30 May 2023 01:29:14 AM UTC, comment #15: Hi Mohammad, I ran
which took around 0.7 seconds with or without overflow checks.
which took about 1 second with or without overflow checks.
|
Siyang He <decaf> |
Wed 24 May 2023 01:03:30 PM UTC, comment #14: For the speed check, disable the warning message when re-building Gnuastro with overflow check. Otherwise, with all these pixels, the warning messages will take the time.
|
Mohammad Akhlaghi <makhlaghi>![]() |
Wed 24 May 2023 12:56:28 PM UTC, comment #13: Thanks Siyang.
|
Mohammad Akhlaghi <makhlaghi>![]() |
Wed 03 May 2023 03:06:33 AM UTC, comment #12: Hi Mohammad, I have updated the overflow check per the comments. The code remains at https://codeberg.org/decaf/gnuastro/src/branch/overflow-check
|
Siyang He <decaf> |
Mon 24 Apr 2023 11:14:53 PM UTC, comment #11: Thanks a lot for the nice commit Siyang, being able to read through all those layers of macros and editing/adding the necessary components was not trivial!
|
Mohammad Akhlaghi <makhlaghi>![]() |
Wed 29 Mar 2023 08:21:19 PM UTC, comment #10: Excellent Mohammad!
|
Siyang He <decaf> |
Tue 28 Mar 2023 01:41:53 PM UTC, comment #9: Thanks a lot for informing us about this problem Siyang! Nice catch! Fortunately the fix was pretty simple (it must have been inserted in a debugging effort, but we forgot to remove that extra option!).
|
Mohammad Akhlaghi <makhlaghi>![]() |
Tue 28 Mar 2023 04:25:30 AM UTC, comment #8: I was running "make distcheck" when I encountered the following errors:
|
Siyang He <decaf> |
Wed 01 Mar 2023 03:06:00 PM UTC, comment #7: Good to know Mohammad. I can take this one. |
Siyang He <decaf> |
Tue 21 Feb 2023 04:57:24 PM UTC, comment #6: Thanks for looking into this problem. In this case, it does indeed seem necessary to do manual checks on each operator! But having it active all the time will force a significant overhead; we should add a flag for this so it is only activated when the user wants.
|
Mohammad Akhlaghi <makhlaghi>![]() |
Tue 21 Feb 2023 03:55:33 AM UTC, comment #5: I took a look at this.
|
Siyang He <decaf> |
Sun 29 Jan 2023 12:44:22 PM UTC, comment #4: This task is open for anyone who is interested. |
Mohammad Akhlaghi <makhlaghi>![]() |
Sun 22 May 2022 01:07:55 PM UTC, comment #3: Have you made any progress on this Tushar? |
Mohammad Akhlaghi <makhlaghi>![]() |
Fri 11 Mar 2022 10:20:37 AM UTC, comment #2: This is a good bug you chose Tashar! Its all yours ;-). |
Mohammad Akhlaghi <makhlaghi>![]() |
Fri 11 Mar 2022 08:05:32 AM UTC, comment #1: I went to this error and want to fix it . Could you please assign this task to me.
|
Tushar Gupta <tushar_gupta> |
Tue 01 Feb 2022 10:31:18 AM UTC, original submission:
As explained in bug #61969 , arithmetic reads inputs and uses the smallest numerical data type possible to compute more efficiently with the least amount of memory. However, the user might not be aware of the integer overflow that might happen when calculations result in values that need larger storage types. For example:
|
Pedram Ashofteh-Ardakani <pedram>![]() |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2023-06-04 | makhlaghi | Attached File | - | ![]() |
Added int64-both.jpg, #54813 |
2023-04-24 | makhlaghi | Percent Complete | 0% | ![]() |
80% |
2023-01-29 | makhlaghi | Assigned to | tushar_gupta | ![]() |
None |
2022-03-11 | makhlaghi | Assigned to | None | ![]() |
tushar_gupta |
2022-02-01 | pedram | Carbon-Copy | - | ![]() |
Added makhlaghi |
Thanks a lot for the nice work Siyang! I reviewed the commits and made some additional changes in the overflowcheck branch of my development fork. Have a look at the commits messages and changes (the good news is that the compile time is now almost identical to the 'master' branch).
To get a good statistical feeling of the effect of the overflow checks on the run-time, I wrote the following script after installing the Gnuastro of this branch (note that the script has to be run as root to allow cleaning the RAM). I chose 64-bit integer to best show the difference:
Here is the result as two histograms:
In short: the overflow checks almost double the run-time :-(. Can you have a look to see if you can reproduce this difference? Did I do a bad change somewhere in my commits?