On Sun, Jun 12, 2011 at 1:33 PM, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com">mirzadeh@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p>Thanks Barry. Problem is my indices are all long and if I use the with petsc the compiler will complain. Do you think casting them to int will solve the problem? Also how does 64 bit international affect petsc performance?</p>
</blockquote><div><br></div><div>The words here are too imprecise:</div><div><br></div><div> short int: A 2 byte integer</div><div> long int: A 4 byte integer</div><div> int: An integer which can be short or long, depending on the compiler, but most often long int today</div>
<div> long long int: An 8 byte integer</div><div> </div><div>The --with-64-bit-indices flag gives long long ints. If you have > 2B unknowns, use this, otherwise don't. Yes, it slows things down.</div><div>On every 64-bit architecture I know, 'int' is still 'long int', not 'long long int'. The only thing that is 64-bit is the pointers.</div>
<div><br></div><div> Matt</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p>Thanks</p>
<div class="gmail_quote">On Jun 12, 2011 9:39 AM, "Barry Smith" <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote:<br type="attribution">> <br>> On Jun 12, 2011, at 1:48 AM, Mohammad Mirzadeh wrote:<br>
> <br>>> I guess I figured it out. On 64-bit OS long long and long are the same and I may as well just use --with-64-bit-ints flag. <br>> <br>> You only need to configure PETSc with --with-64-bit-indices if you are dealing with problems with over 2 billion unknowns (in parallel) or if the sparse matrix will have more than 2 billion nonzeros on a single process. You do not need to use --with-64-bit-indices just because you are using 64 bit pointers, only for really large problems.<br>
> <br>> <br>> Barry<br>> <br>>> <br>>> Thanks<br>>> <br>>> <br>>> On Sat, Jun 11, 2011 at 11:22 PM, Mohammad Mirzadeh <<a href="mailto:mirzadeh@gmail.com" target="_blank">mirzadeh@gmail.com</a>> wrote:<br>
>> Hi guys,<br>>> <br>>> How can I use long int instead of PetscInt in the functions? Does simply changing the definition of PetscInt solve the problem?<br>>> <br>>> Thanks<br>>> <br>> <br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>