[Info-vax] problems allocating "large" arrays in OpenVMS-Fortran

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Mon Oct 28 08:14:01 EDT 2013


In article <l4lenl$lh1$1 at speranza.aioe.org>, Joukj <joukj at hrem.nano.tudelft.nl> writes:
>Hi all,
>
>I'm trying to use large arrays in a Fortran program, but it fails 
>giving: %FOR-F-INSVIRMEM, insufficient virtual memory!
>
>PLAESE, can someone point me in the right direction to tune my system in 
>order to avoid the above error.
>
>I'm using : HP Fortran V8.2-104954-50N8G on OpenVMS IA64 V8.4
>
>The code I tried:
>
>program test
>!
>   integer ( kind = 1 ) , allocatable :: size_array( : , : , : )
>   integer ( kind = 4 ) , parameter :: dimens = 1000
>   integer ( kind = 4 ) :: gbs
>!
>   write( * , * ) 'number of GB :'
>   read ( * , * ) gbs
>   allocate( size_array( gbs * dimens , dimens , dimens ) )
>   size_array=4
>   read( *, *)
>!
>end
>
>
>Compiling running it like:
>valeta-jj) f90 test
>valeta-jj) link test
>valeta-jj) run test
>number of GB :
>1
>
>valeta-jj) run test
>number of GB :
>2
>%FOR-F-INSVIRMEM, insufficient virtual memory!/  unit !SL  file !AS!/ 
>user PC !
>XL
>%TRACE-F-TRACEBACK, symbolic stack dump follows
>image     module    routine               line      rel PC           abs PC
>DEC$FORRTL                                   0 00000000000CFA40 
>FFFFFFFF84DDFA40
>test  TEST  TEST                             9 00000000000002C2 
>00000000000102C2
>                                              0 FFFFFFFF80A190D2 
>FFFFFFFF80A190D2
>DCL                                          0 000000000007D072 
>000000007AE45072
>%TRACE-I-END, end of TRACE stack dump
>
>
>
>So if gbs=1 everything is OK, but with gbs=2 it already crashes.
>
>The machine has 64GB RAM and enough paging space which is hardly ever used:
>valeta-jj) sh mem
>               System Memory Resources on 28-OCT-2013 10:25:14.11
>
>Physical Memory Usage (pages):     Total        Free      In Use    Modified
>   Main Memory (63.99GB)          8388560     8195291      192775 
>   494
>
>Extended File Cache  (Time of last reset: 28-OCT-2013 08:30:33.56)
>  Allocated (MBytes)            144.65    Maximum size (MBytes) 
>32767.81
>  Free (MBytes)                   0.00    Minimum size (MBytes) 
>     3.12
>  In use (MBytes)               144.64    Percentage Read I/Os 
>       96%
>  Read hit rate                     81%   Write hit rate 
>        0%
>  Read I/O count                 55125    Write I/O count 
>     1942
>  Read hit count                 44669    Write hit count 
>        0
>  Reads bypassing cache             51    Writes bypassing cache 
>        1
>  Files cached open                682    Files cached closed 
>      611
>  Vols in Full XFC mode              0    Vols in VIOC Compatible mode 
>       27
>  Vols in No Caching mode            0    Vols in Perm. No Caching mode 
>        0
>
>Granularity Hint Regions (pages):   Total        Free      In Use 
>Released
>   Execlet code region                4096         597        3499 
>      0
>   Execlet data region                2048        1143         905 
>      0
>   S0S1 Executive data region         6845           0        6845 
>      0
>   S0S1 Resident image code region    8192        5055        3137 
>      0
>   S0S1 Resident image data region     512         347         165 
>      0
>
>Slot Usage (slots):                Total        Free    Resident     Swapped
>   Process Entry Slots                826         783          43 
>     0
>   Balance Set Slots                  824         783          41 
>     0
>
>Dynamic Memory Usage:              Total        Free      In Use     Largest
>   Nonpaged Dynamic Memory (MB)     53.17       42.88       10.29 
>42.60
>   Bus Addressable Memory  (KB)    128.00      110.87       17.12 
>104.00
>   Paged Dynamic Memory    (MB)     11.68        5.60        6.07 
>  5.60
>   Lock Manager Dyn Memory (MB)      5.88        2.43        3.44
>
>Buffer Object Usage (pages):                  In Use        Peak
>   32-bit System Space Windows (S0/S1)              1           1
>   64-bit System Space Windows (S2)                 0           0
>   Physical pages locked by buffer objects          1           1
>
>Memory Reservations (pages):       Group    Reserved      In Use        Type
>   Total (0 bytes reserved)                         0           0
>
>Swap File Usage (8KB pages):                   Index        Free        Size
>   DISK$VALETA_29757:[SYSEXE]SWAPFILE.SYS;2
>                                                    1        6600 
>  6600
>
>Paging File Usage (8KB pages):                 Index        Free        Size
>   DISK$VALETA108:[sysexe]PAGEFILE.SYS;3
>                                                  253     4999992 
>4999992
>   DISK$VALETA_29757:[SYSEXE]PAGEFILE.SYS;1
>                                                  254     3143423 
>3143424
>
>   Total size of all paging files: 
>8143416
>   Total committed paging file usage: 
>17873
>
>Of the physical pages in use, 157170 pages are permanently allocated to 
>OpenVMS.
>
>
>I already tried to increase my process quota:
>UAF> sh joukj
>
>Username: JOUKJ                            Owner:  JOUK JANSEN
>Account:  JOUKJ                            UIC:    [300,300] ([JOUKJ])
>CLI:      DCL                              Tables: 
>BOLERO$DKA0:[JOUKJ.COM]JJJ.EX
>E
>Default:  SYS$SYSDEVICE:[JOUKJ.COM]
>LGICMD:
>Flags:
>Primary days:   Mon Tue Wed Thu Fri
>Secondary days:                     Sat Sun
>No access restrictions
>Expiration:            (none)    Pwdminimum:  6   Login Fails:     0
>Pwdlifetime:           (none)    Pwdchange:  19-SEP-2011 16:47
>Last Login: 28-OCT-2013 10:08 (interactive), 28-OCT-2013 08:52 
>(non-interactive)
>Maxjobs:         0  Fillm:      5000  Bytlm:      2100000
>Maxacctjobs:     0  Shrfillm:      0  Pbytlm:           0
>Maxdetach:       0  BIOlm:     10000  JTquota:      60000
>Prclm:          40  DIOlm:      1024  WSdef:        48000
>Prio:            4  ASTlm:      1200  WSquo:       200000
>Queprio:         0  TQElm:       400  WSextent:   1000000
>CPU:        (none)  Enqlm:      4000  Pgflquo:   72000000
>
>
>I tried to play with some sysgen-parameters but I did not see any change
>SYSGEN>  SHOW WS*
>Parameter Name            Current    Default     Min.       Max.   Unit 
>  Dynamic
>--------------            -------    -------   -------    -------  ---- 
>  -------
>WSMAX                     4669536     131072     16384  134217728 Pagelets
>  internal value            291846       8192      1024    8388608 Pages
>WSINC                      187780       2400         0         -1 
>Pagelets   D
>  internal value             11737        150         0         -1 Pages 
>      D
>WSDEC                       93890       4000         0         -1 
>Pagelets   D
>  internal value              5869        250         0         -1 Pages 
>      D
>SYSGEN>  SHOW PQL_M*
>Parameter Name            Current    Default     Min.       Max.   Unit 
>  Dynamic
>--------------            -------    -------   -------    -------  ---- 
>  -------
>PQL_MASTLM                    100          4         4         -1 Ast 
>      D
>PQL_MBIOLM                    100          4         4         -1 I/O 
>      D
>PQL_MBYTLM                 128000     128000    128000         -1 Bytes 
>      D
>PQL_MCPULM                      0          0         0         -1 10Ms 
>      D
>PQL_MDIOLM                    100          4         4         -1 I/O 
>      D
>PQL_MFILLM                    100          2         2         -1 Files 
>      D
>PQL_MPGFLQUOTA           72000000     512000    512000         -1 
>Pagelets   D
>  internal value           4500000      32000     32000         -1 Pages 
>      D
>PQL_MPRCLM                     10          0         0         -1 
>Processes  D
>PQL_MTQELM                      0          0         0         -1 Timers 
>     D
>PQL_MWSDEFAULT             291937      16384     16384         -1 Pagelets
>  internal value             18247       1024      1024         -1 Pages
>PQL_MWSQUOTA               583874      32768     32768         -1 
>Pagelets   D
>  internal value             36493       2048      2048         -1 Pages 
>      D
>PQL_MWSEXTENT             4669536      65536     65536         -1 
>Pagelets   D
>  internal value            291846       4096      4096         -1 Pages 
>      D
>PQL_MENQLM                    300         64        64         -1 Locks 
>      D
>PQL_MJTQUOTA                    0          0         0         -1 Bytes 
>      D
>
>
>
>I'm lost, so any help is welcome
>
>                   Regards
>                       Jouk

1*1000*1000*1000 => 1000000000 or %x3B9ACA00
2*1000*1000*1000 => 2000000000 or %x77359400

I'm pretty sure that your Fortran is carving the array space out of the
process's P0 space.  That's %x00000000 to %x3FFFFFFF.  With GB=2, you've
exceeded this.

You need to use ADDRESS64 which will use P2 space for the allocation.

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

Well I speak to machines with the voice of humanity.



More information about the Info-vax mailing list