1) Which system are you running on?
2) are you completely sure BOTH things happens, I mean... that malloc
returns null AND the error code is zero?
On Mon, Mar 23, 2009 at 7:49 PM, David Fuentes wrote:
> In 3.0.0-p4
>
> PetscMalloc doesn't seem to return an error code if the requested memory
> w
More specifically, you have overflowed exactly to 0, thus PetscMalloc()
returns without
an error code, as it says in the docs.
Matt
On Mon, Mar 23, 2009 at 7:47 PM, Barry Smith wrote:
> [anlextwls097-161:~/Documents/RandD-100] barrysmith% python
>
> >>> npixel = 256*256*5
> >>> print npixel
>
[anlextwls097-161:~/Documents/RandD-100] barrysmith% python
>>> npixel = 256*256*5
>>> print npixel
327,680
>>> print npixel*npixel
107,374,182,400
The problem is that your n is too big to fit into a PetscInt hence bad
stuff happens.
This is a fatal flaw of C, it doesn't generation exceptio
running on ubuntu 8.04.
the following code should reproduce the problem.
static char help[] = "MatCreateSeqDense\n\n";
#include "petscpc.h"
#undef __FUNCT__
#define __FUNCT__ "main"
int main(int argc,char **args)
{
Matmat;
PetscErrorCode ierr;
PetscInt npixel = 25
On Mon, Mar 23, 2009 at 5:49 PM, David Fuentes wrote:
> In 3.0.0-p4
>
> PetscMalloc doesn't seem to return an error code if the requested memory
> wasn't allocated ? Is this correct ?
>
> I'm trying to allocate a dense matrix for which there was not enough memory
> and PetscMalloc is returning a
In 3.0.0-p4
PetscMalloc doesn't seem to return an error code if the requested memory
wasn't allocated ? Is this correct ?
I'm trying to allocate a dense matrix for which there was not enough
memory and PetscMalloc is returning a null pointer but no errorcode to
catch. which is causing seg faults