With Absoft, Lahey/Fujitsu, and PGI I get similar results to those already posted.
Further results (all for Linux):
NAG 4.0a
Starting array size, sum of allocations = 10000 50005000
When SZ RSS
Before first alloc 492 492
After first alloc 512 512
After last alloc 552 552
Over-allocation factor 3.00 3.00
----------
PSR 3.4N5
Starting array size, sum of allocations = 10000 50005000
When SZ RSS
Before first alloc 392 392
After first alloc 508 508
After last alloc 508 508
Over-allocation factor 1.00 1.00
----------
NASoftware 2.1
Starting array size, sum of allocations = 10000 50005000
When SZ RSS
Before first alloc 464 464
After first alloc 480 480
After last alloc 8456 8456
Over-allocation factor 499.50 499.50
----------
BUT, I also noticed that Absoft took a significant amount of time between the
first and last allocations (about 15 seconds) while all the others were
instantaneous. What is the possibility that the optimizers are removing all
the allocate/deallocate inside the loop? For a couple compilers I tried -O0
which made no difference, and I tried calling a subroutine with IAR as an
argument (with the subroutine in a different file), also with no effect.
Bill
--
William F. Mitchell
Mathematical and Computational Sciences Division
National Institute of Standards and Technology
[log in to unmask] http://math.nist.gov/~mitchell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|