taskGNU Astronomy Utilities - Tasks: task #16555, Very high RAM usage of Warp in WCS...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #16555: Very high RAM usage of Warp in WCS warpings

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Wed 19 Jun 2024 08:33:25 PM UTC
   
 
Should Start On:  Tue 18 Jun 2024 10:00:00 PM UTC Should be Finished on:  Tue 18 Jun 2024 10:00:00 PM UTC
Category:  Warp Priority:  5 - Normal
Item Group:  Enhancement Status:  Postponed
Privacy:  Public Assigned to:  glorenzetti
Percent Complete:  0% Open/Closed:  Open
Effort:  0.00

Wed 19 Jun 2024 08:33:25 PM UTC, original submission:  

When the Warp program does WCS operations (which is the default). It consumes a very large amount of RAM! Such that in large pipelines, the warping step becomes the main bottleneck (in RAM).

Here is an example (the second Warp command)


$ echo "1 101 101 1 20 0.5 30 0.7 15 5" \
       | astmkprof --mergedsize=201,201 --oversample=1 -oraw.fits \
                   --pc=-0.939692,-0.3420201,-0.3420201,0.9396926

$ /usr/bin/time --format=%M astwarp raw.fits
23680

$ ls -lh raw.fits
-rw-r--r-- 1 mohammad mohammad 169K Jun 19 22:16 raw.fits


We see that while the file is only 169K, at its maximum, Warp is consuming 23680K of memory!!!! In a normal reduction pipeline these days images are about 300-400 Megaybtes, so this excessive usage of RAM by Warp easily fills up any RAM and creates a strong bottleneck for parallel operations!

This excessive usage occurs because of the two phase operation of Warp in WCS mode: first it initializes the output image's pixel grid, and then it will warp the input pixels into it. But since the operation is non-linear, we need the coordinates of all four corners of every pixel.

My first guess is that if we can re-design the program to get the output pixel grid with minimal points (for example only warp the outer corners of the the pixels on the border of the image), and then do the warp of each input pixel independently in its own thread, this excessive RAM usage will be removed. But we should look into it closer!

I should greatly thank Pedram for his wonderful work on completing the WCS-based feature of Warp! We knew about this problem at that time, but in the spirit of progress, needed to finish the work and couldn't invest more in the RAM optimization at that time.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  •  

    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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-60ba.
    Corresponding source code