sigebo
April 12, 2018, 6:27am
1
I tried a simple code of fortran for testing over 2GB.
INTEGER*8 SIZE,MULT
PARAMETER (SIZE=65536 * 7600)
INTEGER N
INTEGER,allocatable::BUF1(:,:)
DO MULT=1,100
ALLOCATE (BUF1(1:SIZE,1:MULT))
BUF1(1,1) = 1
BUF1(SIZE,MULT) = 2
WRITE(, ) MULT,BUF1(1,1),BUF1(SIZE,MULT) ,SIZE*4 * MULT/1024
DEALLOCATE (BUF1)
ENDDO
STOP
END
Invoked command line is
pgfortran -Mlargeaddressaware test.f90
Running result is
1 1 2 1945600
2 1 2 3891200
3 1 2 5836800
4 1 2 7782400
after this a following dialogue occured
“test.exe is stopped(in japanease)”
Memory 16GB. windws 10. PGI community edtion ver17.10 .
I expected working on 200GB size.
tull
April 12, 2018, 4:44pm
2
Hello,
Virtual memory managers do have limits, and it is the Operating
System that provides them. If you can write the same program in
Microsoft Visual C and it works, but pgcc and pgfortran does not,
then there is something to investigate.
On my windows 10 laptop, with 17.10 and 32GB
PGI$ pgfortran -Mlargeaddressaware -Mlarge_arrays -o test_pgi_win test.f90
PGI$ test_pgi_win
1 1 2 1945600
2 1 2 3891200
3 1 2 5836800
4 1 2 7782400
5 1 2 9728000
6 1 2 11673600
7 1 2 13619200
8 1 2 15564800
9 1 2 17510400
10 1 2 19456000
11 1 2 21401600
12 1 2 23347200
13 1 2 25292800
14 1 2 27238400
15 1 2 29184000
16 1 2 31129600
17 1 2 33075200
18 1 2 35020800
19 1 2 36966400
20 1 2 38912000
21 1 2 40857600
22 1 2 42803200
23 1 2 44748800
24 1 2 46694400
25 1 2 48640000
26 1 2 50585600
27 1 2 52531200
28 1 2 54476800
29 1 2 56422400
30 1 2 58368000
31 1 2 60313600
32 1 2 62259200
33 1 2 64204800
34 1 2 66150400
35 1 2 68096000
36 1 2 70041600
37 1 2 71987200
38 1 2 73932800
39 1 2 75878400
40 1 2 77824000
41 1 2 79769600
42 1 2 81715200
43 1 2 83660800
44 1 2 85606400
0: ALLOCATE: 3753902080 bytes requested; not enough memory
PGI$
When I compile and run your program on Linux, 32Gb
bd03% test_pgi
1 1 2 1945600
2 1 2 3891200
3 1 2 5836800
4 1 2 7782400
5 1 2 9728000
6 1 2 11673600
7 1 2 13619200
8 1 2 15564800
9 1 2 17510400
10 1 2 19456000
11 1 2 21401600
12 1 2 23347200
13 1 2 25292800
14 1 2 27238400
15 1 2 29184000
16 1 2 31129600
17 1 2 33075200
18 1 2 35020800
0: ALLOCATE: 37853593600 bytes requested; not enough memory
pretty much the same thing happens.
On a 16Gb system
% test_pgi
1 1 2 1945600
2 1 2 3891200
3 1 2 5836800
4 1 2 7782400
5 1 2 9728000
6 1 2 11673600
7 1 2 13619200
8 1 2 15564800
9 1 2 17510400
10 1 2 19456000
11 1 2 21401600
12 1 2 23347200
0: ALLOCATE: 25899827200 bytes requested; not enough memory
With gfortran on the same system the same thing happens.
% gfortran -o test_gfort test.f90
% test_gfort
1 1 2 1945600
2 1 2 3891200
3 1 2 5836800
4 1 2 7782400
5 1 2 9728000
6 1 2 11673600
7 1 2 13619200
8 1 2 15564800
9 1 2 17510400
10 1 2 19456000
11 1 2 21401600
12 1 2 23347200
Operating system error: Cannot allocate memory
dave
sigebo
April 13, 2018, 2:19am
3
Thank you your advice.
Virtual memory of my windows10 lacked.I have worked by adding virtual memory.