<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi, Stefan -- <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The error message says it was unable to allocate <font size="2"><span style="font-size:11pt">1778821</span></font>*8 bytes in memory. Try checking the output from 'q define' and 'q define <name>' to see whether you're storing too much in memory. Make good use
 of the 'undefine' command when you're finished working with a defined variable. <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Are you drawing some mulit-layered graphic that requires a huge metabuffer? Maybe your grib2 cache is also maxed out. You can track the memory use of your grads process using the 'ps' command in another terminal window.
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you really want to see every bit of memory that GrADS has allocated, check the 'q mem' command -- an undocumented developer's tool that will show you the list of allocated items, their length, and the type, which provides a hint for where in the src code
 that chunk was allocated. Allocations of type 'defn*buf' are from the 'define' command.
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Maybe those things will help you track down where you're unintentionally gobbling up memory. 32GB isn't that much, given the size of GFS output files these days.
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--Jennifer<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Stefan Gofferje <stefan@saakeskus.fi><br>
<b>Sent:</b> Tuesday, April 7, 2020 2:56 AM<br>
<b>To:</b> gradsusr@gradsusr.org <gradsusr@gradsusr.org><br>
<b>Subject:</b> [gradsusr] double free or corruption (!prev)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
I recently experience grads crashes relatively often on GFS renderings. <br>
Here is an example output:<br>
<br>
*** Error in `/usr/local/bin/grads221/grads': double free or corruption <br>
(!prev): 0x00000000010b6330 ***<br>
<br>
Grid Analysis and Display System (GrADS) Version 2.2.1<br>
Copyright (C) 1988-2018 by George Mason University<br>
GrADS comes with ABSOLUTELY NO WARRANTY<br>
See file COPYRIGHT for more information<br>
<br>
Config: v2.2.1 little-endian readline grib2 netcdf hdf4-sds hdf5 <br>
opendap-grids geotiff shapefile<br>
Issue 'q config' and 'q gxconfig' commands for more detailed <br>
configuration information<br>
GX Package Initialization: Size = 11 8.5<br>
Running in Batch mode<br>
Making defines<br>
Define Error:  Unable to allocate data memory<br>
   Size of request was 1778821 grid elements<br>
/storage/webserver/weather/grads/rendermaps.sh: line 34: 24217 Aborted <br>
               (core dumped) ${GRADS} -blc "run sg_master_landscape.gs <br>
${GRIB2FILE}.ctl"<br>
<br>
The machine has 32GB memory and usually well over 50% of it available <br>
(although "cached"). Some debugging help and a fix would be appreciated :).<br>
<br>
<br>
-Stefan<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
gradsusr@gradsusr.org<br>
<a href="http://secure-web.cisco.com/1o04x8ZaCcokRSN2H0wrt9yN9fCUp-8e87ViUWtM8pToPNoAccjpEuwN1U5g83LlT41wUqNNYDz4q0uWA04v34jxFKhaoGjvsgon3KRw3oW-GDIfmMmn5mm8aRbLbK3nGbcgbKTVFxHHOlb0Ix7wXGA4tLTqrX6KICDwomeA2oiWpKOe3Oxl7OL4y0ifgLe1u2vhFh8ObUE0j3xMLFZmtCQiZvds9OuX_xQyQlLx0ra5Uy4vIm55rFzPQgspBWMw63w6ZeJbJFRG4JmaQzwhz9HXTuysCWSu2Z-A9E6OWf5ap56dSFOQHgspTS3LtLfee-SzEZQa-7ET8yKtkIzZ9epEBOquCgDcGP0cl806C-_vIK9Y-w0IRVgmH96c_y4F2OKayOc12YmcJfkzMnm9NPaYEj2Gb7uqLgVtqEKI9aModRqJBx1y_MUlA9r_VGeKC/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr">http://secure-web.cisco.com/1o04x8ZaCcokRSN2H0wrt9yN9fCUp-8e87ViUWtM8pToPNoAccjpEuwN1U5g83LlT41wUqNNYDz4q0uWA04v34jxFKhaoGjvsgon3KRw3oW-GDIfmMmn5mm8aRbLbK3nGbcgbKTVFxHHOlb0Ix7wXGA4tLTqrX6KICDwomeA2oiWpKOe3Oxl7OL4y0ifgLe1u2vhFh8ObUE0j3xMLFZmtCQiZvds9OuX_xQyQlLx0ra5Uy4vIm55rFzPQgspBWMw63w6ZeJbJFRG4JmaQzwhz9HXTuysCWSu2Z-A9E6OWf5ap56dSFOQHgspTS3LtLfee-SzEZQa-7ET8yKtkIzZ9epEBOquCgDcGP0cl806C-_vIK9Y-w0IRVgmH96c_y4F2OKayOc12YmcJfkzMnm9NPaYEj2Gb7uqLgVtqEKI9aModRqJBx1y_MUlA9r_VGeKC/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr</a><br>
<br>
</div>
</span></font></div>
</body>
</html>