[Trilinos-Users] Aztec memory problem

Chris Jackson chris.jackson at mayahtt.com
Fri Jul 8 16:28:43 EDT 2016


Thanks Mike and Carlos, we will explore our options.
Chris

From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf Of Heroux, Michael A
Sent: Thursday, July 07, 2016 2:49 PM
To: Carlos Reyes; trilinos-users at trilinos.org
Subject: Re: [Trilinos-Users] Aztec memory problem

We have had at least one failed attempt to address this problem in the past.  AztecOO (wrapping Aztec) is an old, useful, but crusty piece of software.  It was developed in a 32-bit era.  Two possibilities:

-          Try Carlos’ suggestion with size_t, locally.  If it works we can interrogate it more broadly.

-          Switch to Belos.  Belos is a functional replacement for AztecOO in almost all cases, and it easily supports 64-bit addressing.  Switching to Belos also leads you in the direction toward Tpetra and related packages that support manycore and GPU node computing.

Mike

From: Trilinos-Users <trilinos-users-bounces at trilinos.org<mailto:trilinos-users-bounces at trilinos.org>> on behalf of Carlos Reyes <carlos at stellarscience.com<mailto:carlos at stellarscience.com>>
Organization: Stellar Science
Date: Thursday, July 7, 2016 at 9:23 AM
To: Trilinos Users <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: [EXTERNAL] Re: [Trilinos-Users] Aztec memory problem

The only safe type to use for memory sizes is std::size_t. Casting from an unsigned int to a size_t should be safe. It sounds like the problem could be fixed by making internal changes to AZ_memory_manage and not to 1181 call sites. I would imagine that modifying AZ_memory_manage to use a size_t instead of a long int internally is not too hard.
Carlos Reyes
1-505-206-1569 (mobile)
Look ma, no APIs! https://youtu.be/mhiYYmWh5b4

On 07/07/2016 08:14 AM, Chris Jackson wrote:
Hi all, we found a problem in AZ_manage_memory.  This function takes an unsigned int in argument for the size of memory we want to allocate. The first thing  it does  is to cast this value to a long int, then it does some arithmetic on this value.  After, it calls AZ_allocate (malloc in disguise) by casting the long int size to unsigned int and tries to access the long int size index in the allocated array.  When we ask for 3GB of ram we get a negative index.

Modifying it to use a 64 bit type means going through 1181 calls to this function and modify all memory size arithmetic to be done with the same type.

Suggestions?  Comments?

Thanks

Chris Jackson




_______________________________________________

Trilinos-Users mailing list

Trilinos-Users at trilinos.org<mailto:Trilinos-Users at trilinos.org>

https://trilinos.org/mailman/listinfo/trilinos-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160708/21adec5e/attachment.html>


More information about the Trilinos-Users mailing list