[petsc-users] -mat_superlu_lwork

Gianluca Meneghello gianmail at gmail.com
Tue Jul 3 12:20:00 CDT 2012


Dear all,

thanks for your assistance. I will then continue with superlu's memory
allocation!

Thanks again

Gianluca


On 3 July 2012 17:18, Xiaoye S. Li <xsli at lbl.gov> wrote:
> Yes, that limits your preallocated work array to be 2GB.
> Alternatively, you can set lwork=0, rely on superlu to do memory
> allocation for you.   Then you can use more than 2GB memory.
>
> Sherry Li
>
>
> On Tue, Jul 3, 2012 at 9:32 AM, Satish Balay <balay at mcs.anl.gov> wrote:
>> Actually its INT_MAX.
>>
>> From superlu's dgssvx.c
>>
>>>>>>>>>
>>  * lwork   (input) int
>>  *         Specifies the size of work array in bytes.
>>
>> void
>> dgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
>>        int *etree, char *equed, double *R, double *C,
>>        SuperMatrix *L, SuperMatrix *U, void *work, int lwork,
>>        SuperMatrix *B, SuperMatrix *X, double *recip_pivot_growth,
>>        double *rcond, double *ferr, double *berr,
>>        mem_usage_t *mem_usage, SuperLUStat_t *stat, int *info )
>> <<<<<<
>>
>> So the code is expecting an int - and PETSc passes in this option as int.
>>
>> Sure - 'int' here is limiting the malloc to 2GB - and causing you problems.
>>
>> Satish
>>
>> On Tue, 3 Jul 2012, Gianluca Meneghello wrote:
>>
>>> Hong,
>>>
>>> thanks for your answer. I do not know if my problem request 64 bit support.
>>>
>>> My understanding is that I can preallocate the working array for
>>> superlu with the PETSc database options -mat_superlu_lwork. Following
>>> PETSc manual, this has to be specified in bytes.
>>>
>>> From my point of view, the problem is that I cannot pass to PETSc an
>>> integer greater than 2.147.483.647 (that is, LONG_MAX), thus I am
>>> limited to allocating roughly 2 GB of memory. If my factored matrix is
>>> bigger, I have to rely on the mallocs/copy.
>>>
>>> Let me know if it is not clear yet.
>>>
>>> Gianlu
>>>
>>>
>>>
>>>
>>>
>>> On 3 July 2012 15:53, Hong Zhang <hzhang at mcs.anl.gov> wrote:
>>> > Gianluca:
>>> >
>>> > Do you mean 64-bit support for superlu?
>>> > I do not understand your request, thus forward your request to superlu
>>> > developer.
>>> >
>>> > Hong
>>> >
>>> >> Dear all,
>>> >>
>>> >> I am trying to use superlu as solver for a large, sparse matrix, and I
>>> >> would like to use -mat_superlu_lwork to speed up the computation. The
>>> >> problem I encounter is that my lwork size I would need is greated than
>>> >> the maximum value for an object of type long int and is not correctly
>>> >> read by the code.
>>> >>
>>> >> Is there a workaround to that? Does using another solver (mumps
>>> >> maybe?) solve this problem and, if so, which option should I use?
>>> >>
>>> >> Thanks in advance
>>> >>
>>> >> Gianluca
>>> >>
>>> >> --
>>> >> "[Je pense que] l'homme est un monde qui vaut des fois les mondes et
>>> >> que les plus ardentes ambitions sont celles qui ont eu l'orgueil de
>>> >> l'Anonymat" -- Non omnibus, sed mihi et tibi
>>> >> Amedeo Modigliani
>>> >
>>> >
>>>
>>>
>>>
>>>
>>



-- 
"[Je pense que] l'homme est un monde qui vaut des fois les mondes et
que les plus ardentes ambitions sont celles qui ont eu l'orgueil de
l'Anonymat" -- Non omnibus, sed mihi et tibi
Amedeo Modigliani


More information about the petsc-users mailing list