<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
The peak RSS does not tell you how much memory the matrix takes. It may include many things such as the binary, the libraries linked to it, and stack and heap memory.
<div class=""><br class="">
</div>
<div class="">Hong (Mr.)<br class="">
<div class="">
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 24, 2017, at 9:46 AM, D D <<a href="mailto:driver.dan12@yahoo.com" class="">driver.dan12@yahoo.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
<div class="">
<div style="background-color: rgb(255, 255, 255); font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" class="">
<div id="yui_3_16_0_ym19_1_1493033032302_14257" class="">Hello,</div>
<div id="yui_3_16_0_ym19_1_1493033032302_13790" class=""><br class="">
</div>
<div id="yui_3_16_0_ym19_1_1493033032302_13789" class="">I see memory usage that confuses me:</div>
<div id="yui_3_16_0_ym19_1_1493033032302_13788" class=""><br class="">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_15260" class="">me@blah:src$ ./example1 -n_row 200 -n_col 2000 -sparsity 0.03 -mat_type mpidenseInitialize<br id="yui_3_16_0_ym19_1_1493033032302_14304" class="">
Got options<br id="yui_3_16_0_ym19_1_1493033032302_14305" class="">
Create and assemble matrix<br id="yui_3_16_0_ym19_1_1493033032302_14306" class="">
Assembled<br id="yui_3_16_0_ym19_1_1493033032302_14307" class="">
Peak RSS 21 Mb<br id="yui_3_16_0_ym19_1_1493033032302_14308" class="">
me@blah:~/src$ ./example1 -n_row 200 -n_col 2000 -sparsity 0.03 -mat_type mpiaij<br id="yui_3_16_0_ym19_1_1493033032302_14309" class="">
Initialize<br id="yui_3_16_0_ym19_1_1493033032302_14310" class="">
Got options<br id="yui_3_16_0_ym19_1_1493033032302_14311" class="">
Create and assemble matrix<br id="yui_3_16_0_ym19_1_1493033032302_14312" class="">
Assembled<br id="yui_3_16_0_ym19_1_1493033032302_14313" class="">
Peak RSS 19 Mb<br id="yui_3_16_0_ym19_1_1493033032302_14314" class="">
<br class="">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_13786" class="">I put my example code on Github so I can more effectively communicate my question. And here is my question: why does the program as written use so much memory for the sparse case - matrix type
 mpiaij? Note that I'm creating a random dense matrix with at most 3% non-zero entries since this is my use case.<br class="">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_15688" class=""><br class="">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_15697" class="">I have read the relevant portions of the user's manual and searched for answers. Have I missed a resource that can answer my question?</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_15757" class=""><br class="">
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1493033032302_15737" class=""><a href="https://github.com/dtsmith2001/hpc" class="enhancr2_091ed883-8ee2-c9df-4955-6e64f88122d6" id="yui_3_16_0_ym19_1_1493033032302_16258">dtsmith2001/hpc</a><br class="">
</div>
<div id="yui_3_16_0_ym19_1_1493033032302_16300" class=""><br class="">
</div>
<div id="enhancr2_091ed883-8ee2-c9df-4955-6e64f88122d6" class=" ymail-preserve-class ymail-preserve-style yahoo-link-enhancr-card" style="max-width:400px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;" data-url="https://github.com/dtsmith2001/hpc" data-type="yenhancr" data-category="object" data-embed-urldata-size="medium" dir="ltr" contenteditable="false">
<a href="https://github.com/dtsmith2001/hpc" style="text-decoration: none !important;" class="yahoo-enhancr-cardlink" target="_blank" rel="noreferrer" id="yui_3_16_0_ym19_1_1493033032302_16281">
<table class="card-wrapper yahoo-ignore-table" style="max-width:400px;" id="yui_3_16_0_ym19_1_1493033032302_16280" cellspacing="0" cellpadding="0" border="0">
<tbody id="yui_3_16_0_ym19_1_1493033032302_16279" class="">
<tr id="yui_3_16_0_ym19_1_1493033032302_16278" class="">
<td id="yui_3_16_0_ym19_1_1493033032302_16277" width="400" class="">
<table class="card yahoo-ignore-table" style="max-width:400px;" id="yui_3_16_0_ym19_1_1493033032302_16276" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody id="yui_3_16_0_ym19_1_1493033032302_16275" class="">
<tr id="yui_3_16_0_ym19_1_1493033032302_16274" class="">
<td class="card-primary-image-cell" style="background:#000 url('https://s.yimg.com/vv//api/res/1.2/qtxXcDily.BIfxkxFPDCNg--/YXBwaWQ9bWFpbDtmaT1maWxsO2g9MjAwO3c9NDAw/https://avatars0.githubusercontent.com/u/3189861?v=3&s=400.cf.jpg') no-repeat center center;background-size:cover;height:200px;position:relative;" id="yui_3_16_0_ym19_1_1493033032302_16273" valign="top" bgcolor="#000000" background="https://s.yimg.com/vv//api/res/1.2/qtxXcDily.BIfxkxFPDCNg--/YXBwaWQ9bWFpbDtmaT1maWxsO2g9MjAwO3c9NDAw/https://avatars0.githubusercontent.com/u/3189861?v=3&s=400.cf.jpg">
<!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:400px;height:218px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/vv//api/res/1.2/qtxXcDily.BIfxkxFPDCNg--/YXBwaWQ9bWFpbDtmaT1maWxsO2g9MjAwO3c9NDAw/https://avatars0.githubusercontent.com/u/3189861?v=3&s=400.cf.jpg"/></v:rect><![endif]-->
<table class="yahoo-ignore-table" valign="top" style="width:100%;" id="yui_3_16_0_ym19_1_1493033032302_16272" cellspacing="0" cellpadding="0" border="0">
<tbody id="yui_3_16_0_ym19_1_1493033032302_16271" class="">
<tr id="yui_3_16_0_ym19_1_1493033032302_16270" class="">
<td style="background:transparent url('https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png') repeat left top;height:200px;" id="yui_3_16_0_ym19_1_1493033032302_16269" valign="top" bgcolor="transparent" background="https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png" class="">
<!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:400px;height:218px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png"/><v:textbox inset="0,0,20px,0"><![endif]-->
<table class="yahoo-ignore-table" style="width:100%;height:185px;min-height:185px;" id="yui_3_16_0_ym19_1_1493033032302_16268" height="185">
<tbody id="yui_3_16_0_ym19_1_1493033032302_16267" class="">
<tr id="yui_3_16_0_ym19_1_1493033032302_16266" class="">
<td class="card-richInfo2" style="text-align:left;text-align:left;padding:15px 0 0 15px;vertical-align:top;" id="yui_3_16_0_ym19_1_1493033032302_16768">
</td>
<td class="card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;" id="yui_3_16_0_ym19_1_1493033032302_16265">
<div class="card-share-container"></div>
</td>
</tr>
</tbody>
</table>
<!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="">
<td class="">
<table class="card-info yahoo-ignore-table" style="background:#fff;position:relative;z-index:2;width:95%;max-width:380px;border:1px solid #e0e4e9;border-bottom:3px solid #010101;margin-top:-40px;margin-left:auto;margin-right:auto;" cellspacing="0" cellpadding="0" align="center" border="0">
<tbody class="">
<tr class="">
<td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;" class="">
<img class="card-object-1 yahoo-ignore-inline-image ymail-preserve-class" src="https://s.yimg.com/nq/storm/assets/enhancrV2/23/logos/github.png" style="min-width:32px;border:1px solid #e0e4e9;margin-top:3px;" data-id="c3247034-c350-156f-9223-e5de78e7171d" height="32">
</td>
<td style="vertical-align:middle;padding:16px 12px;width:99%;" class="">
<h2 class="card-title" style="font-size: 16px; line-height:19px; margin:0 0 4px 0;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;word-break:break-word;">
dtsmith2001/hpc</h2>
<div class="card-description" style="font-size:11px;line-height:15px;color:#999;word-break:break-word;">
hpc - High Performance Computing Explorations using PETSc and SLEPc</div>
</td>
<td style="text-align:right;padding:16px 12px 16px 0;" class=""></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
<div class=""><br class="">
</div>
<div id="yui_3_16_0_ym19_1_1493033032302_13785" class=""><br class="">
</div>
<div id="yui_3_16_0_ym19_1_1493033032302_16243" class="">Dale</div>
<div id="yui_3_16_0_ym19_1_1493033032302_15791" class=""><br class="">
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>