SuperLU Distributed 8.1.2
Distributed memory sparse direct solver
memory.c File Reference

Memory utilities. More...

#include "superlu_ddefs.h"
Include dependency graph for memory.c:

Functions

static int_t memory_usage (const int_t, const int_t, const int_t)
 
static void * expand (int_t *, MemType, int_t, int_t, Glu_freeable_t *)
 
void SetupSpace (void *, int_t, LU_space_t *)
 
void superlu_abort_and_exit_dist (char *msg)
 
void * superlu_malloc_dist (size_t size)
 
void superlu_free_dist (void *addr)
 
static void copy_mem_int (int_t howmany, void *old, void *new)
 
static void user_bcopy (char *src, char *dest, int_t bytes)
 
int * int32Malloc_dist (int n)
 
int * int32Calloc_dist (int n)
 
int_tintMalloc_dist (int_t n)
 
int_tintCalloc_dist (int_t n)
 
void * user_malloc_dist (int_t bytes, int_t which_end)
 
void user_free_dist (int_t bytes, int_t which_end)
 
int_t symbfact_SubInit (superlu_dist_options_t *options, fact_t fact, void *work, int_t lwork, int_t m, int_t n, int_t annz, Glu_persist_t *Glu_persist, Glu_freeable_t *Glu_freeable)
 
int_t symbfact_SubXpand (int_t n, int_t jcol, int_t next, MemType mem_type, int_t *maxlen, Glu_freeable_t *Glu_freeable)
 
int_t symbfact_SubFree (Glu_freeable_t *Glu_freeable)
 
int_t QuerySpace_dist (int_t n, int_t lsub_size, Glu_freeable_t *Glu_freeable, superlu_dist_mem_usage_t *mem_usage)
 

Variables

SuperLU_ExpHeaderexpanders
 
SuperLU_LU_stack_t stack
 
int_t no_expand
 
long int superlu_malloc_total = 0
 

Detailed Description

Memory utilities.

Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)

All rights reserved.

The source code is distributed under BSD license, see the file License.txt at the top-level directory.

-- Distributed SuperLU routine (version 5.2) --
Lawrence Berkeley National Lab, Univ. of California Berkeley.
September 1, 1999

Modified:
  September 30, 2017, add aligned malloc for Intel

Function Documentation

◆ copy_mem_int()

static void copy_mem_int ( int_t  howmany,
void *  old,
void *  new 
)
static
Here is the caller graph for this function:

◆ expand()

static void * expand ( int_t prev_len,
MemType  type,
int_t  len_to_copy,
int_t  keep_prev,
Glu_freeable_t Glu_freeable 
)
static
Expand the existing storage to accommodate more fill-ins.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ int32Calloc_dist()

int * int32Calloc_dist ( int  n)

◆ int32Malloc_dist()

int * int32Malloc_dist ( int  n)

◆ intCalloc_dist()

int_t * intCalloc_dist ( int_t  n)

◆ intMalloc_dist()

int_t * intMalloc_dist ( int_t  n)

◆ memory_usage()

static int_t memory_usage ( const int_t  nzlmax,
const int_t  nzumax,
const int_t  n 
)
static
Here is the caller graph for this function:

◆ QuerySpace_dist()

int_t QuerySpace_dist ( int_t  n,
int_t  lsub_size,
Glu_freeable_t Glu_freeable,
superlu_dist_mem_usage_t mem_usage 
)
mem_usage consists of the following fields:
  • for_lu (float) The amount of space used in bytes for the L\U data structures.
  • total (float) The amount of space needed in bytes to perform factorization.
  • expansions (int) Number of memory expansions during the LU factorization.

◆ SetupSpace()

void SetupSpace ( void *  work,
int_t  lwork,
LU_space_t MemModel 
)
Setup the memory model to be used for factorization.
   lwork = 0: use system malloc;
   lwork > 0: use user-supplied work[] space.

◆ superlu_abort_and_exit_dist()

void superlu_abort_and_exit_dist ( char *  msg)

◆ superlu_free_dist()

void superlu_free_dist ( void *  addr)

◆ superlu_malloc_dist()

void * superlu_malloc_dist ( size_t  size)

◆ symbfact_SubFree()

int_t symbfact_SubFree ( Glu_freeable_t Glu_freeable)
Deallocate storage of the data structures common to symbolic
factorization routines.

◆ symbfact_SubInit()

int_t symbfact_SubInit ( superlu_dist_options_t options,
fact_t  fact,
void *  work,
int_t  lwork,
int_t  m,
int_t  n,
int_t  annz,
Glu_persist_t Glu_persist,
Glu_freeable_t Glu_freeable 
)
Allocate storage for the data structures common to symbolic factorization
routines. For those unpredictable size, make a guess as FILL * nnz(A).
Return value:
    If lwork = -1, return the estimated amount of space required, plus n;
    otherwise, return the amount of space actually allocated when
    memory allocation failure occurred.
Here is the call graph for this function:

◆ symbfact_SubXpand()

int_t symbfact_SubXpand ( int_t  n,
int_t  jcol,
int_t  next,
MemType  mem_type,
int_t maxlen,
Glu_freeable_t Glu_freeable 
)
Expand the data structures for L and U during the factorization.
Return value:   0 - successful return
              > 0 - number of bytes allocated when run out of space
Here is the call graph for this function:

◆ user_bcopy()

static void user_bcopy ( char *  src,
char *  dest,
int_t  bytes 
)
static
Here is the caller graph for this function:

◆ user_free_dist()

void user_free_dist ( int_t  bytes,
int_t  which_end 
)

◆ user_malloc_dist()

void * user_malloc_dist ( int_t  bytes,
int_t  which_end 
)

Variable Documentation

◆ expanders

SuperLU_ExpHeader* expanders

◆ no_expand

int_t no_expand

◆ stack

◆ superlu_malloc_total

long int superlu_malloc_total = 0