MARCA_Models:
Memory Requirements and Matrix Size

William J. Stewart

Billy's Home Page,   MARCA-Models Home Page


Memory requirements

Our concern is with sizing the real*8 and integer work arrays, dwork and iwork, that are needed during the generation process and for storing the generated matrix itself. These sizes will vary with the model parameters. The integer parameters mdw and miw denote the declared sizes of the real*8 and integer work arrays respectively.

The minimum size for the two arrays, in terms of the number of states, n, and the number of nonzero elements, nz, is provided in each of the model subroutines, model.f. For example, in the NCD queueing network model, comment statements indicate:

   *****************************************************************
   c    ***  MINIMUM MEMORY REQUIREMENTS:                        ***
   c    ***  DWORK:  mdw >= nz+1                                 ***
   c    ***  IWORK:  miw >= 11*n+40034                           ***
   c    ***  n = order and nz = number of nonzeros in matrix.    ***
   c    ***  The values of n and nz for all 10 datasets may be   ***
   c    ***  found at the end of the file "ncd_in"               ***
   *****************************************************************
The values of n and nz for all instances of each model are provided at the end of that model's input dataset file, model_in. (See examples below.) This makes it easy to determine the values that should be assigned to mdw and miw.

Each driver program runs a subset of the data sets for its model and does not require much memory. This is reflected in the values assigned to the parameters mdw and miw. The minimum working array sizes needed to run the largest dataset for each model is indicated in a comment statement. For example, in the NCD example, the following comments may be found:

   *****************************************************************
   ***              A DRIVER FOR THE NCD EXAMPLE                 ***
   *****************************************************************
    
   c    ***  This driver generates matrices for the first four   ***
   c    ***  data sets (index = 1:4) in the file "ncd_in"        ***
    
   c    ***  Replace parameter statement (line 3 of driver) with ***
   c             parameter (miw=1985395,mdw=1207052)
   c    ***  to allocate sufficient memory for any/all datasets  ***
   *****************************************************************
    
         program driver 
    
         implicit double precision (a-h,o-z)
         parameter (miw=175785,mdw=81222)
All of the samples provided in the collection have been run on a SPARCstation 4 with 64 MB RAM.


Model Parameters and Matrix Dimensions

With each model in the collection is associated a table that displays the order of the matrix (n) and the number of nonzero elements (nz) for each of the different datasets provided in model_in. Each table is placed at the very end of the model's input file. For example, the tables for the NCD queueing network model and the MUTEX mutual exclusion model are given below.

N, R: model parameters
n: the size of the matrix
nz: the number of nonzero elements in the matrix

   *****************************************
   ***            NCD EXAMPLE            ***
   *****************************************
   
   The file "ncd_in" contains 10 data sets.  
   Parameter values are:
   
           N            n            nz
   
          10          286         1,606
          20        1,771        11,011
          30        5,456        35,216
          40       12,341        81,221
          50       23,426       156,026
          60       39,711       266,631
          70       62,196       420,036
          80       91,881       623,241
          90      129,766       883,246
         100      176,851     1,207,051
   
   
   *****************************************
   ***     MUTUAL EXCLUSION EXAMPLE      ***
   *****************************************
   
   The file "mutex_in" contains 15 data sets.  
   Parameter values are:
   
         N     R           n           nz
   
        12     1          13           37
        12     4         794        6,362
        12     8       3,797       47,381
        12    11       4,095       53,223
   
        16     1          17           49
        16     4       2,517       20,949
        16     8      39,203      563,491
        16    12      64,839    1,094,983
        16    15      65,535    1,114,079
   
        20     1          21           61
        20     4       6,196       52,596
        20     8     263,950    4,031,310
        20    12     910,596   18,114,756
        20    16   1,047,225   21,972,345
        20    19   1,048,575   22,020,055
   
   *****************************************

Billy's Home Page,   MARCA-Models Home Page