forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ftn95 on x64 - a quick review

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
LA



Joined: 27 Nov 2005
Posts: 7

PostPosted: Sat Dec 17, 2005 6:31 am    Post subject: ftn95 on x64 - a quick review Reply with quote

OK, subsequent to previous messages here, I'm now testing the personal version of ftn95 v4.80 on X64, running on a dual-core AMD 4800+ with 4GB of RAM.

The compiler installs and works perfectly well, once I'd installed .NET framework 1.1, which doesn't come as standard with X64: just download the one from MS, and install it. NB I found that I couldn't get the one from an existing XP installation disk to work; I had to download a fresh one. It's not labelled on the MS site as X64, just as XP, but that's fine.

I haven't tried compiling a .NET executable yet, but perhaps that might access more memory - though it might conceivably have to wait for FTN95 for .NET v2. Any thoughts on that?

I have been able to access more memory within my program, but can't get it much above 2.7GB. I haven't used any
Code:
heap
or
Code:
stack
tweaks at link time.

Below is the (quick and messy) code I've been using to push memory to the limit. Run with:
Code:
TestSize {number of MB to allocate}


For values at around 2800 and above, it's choking on the 4th
Code:
ALLOCATE
. I did wonder if it might be that the win32 subsystem on X64 is still capped at 3gb?

(edit: duff code snipped - follow-up email will contain better test code)

Andrew Smith
[url="http://www.londonanalytics.info/"]London Analytics[/url]
_________________
Andrew+Smith%0D%0A%5Burl%3D%26quot%3Bhttp%3A%2F%2Fwww%2Elondonanalytics%2Einfo%2F%26quot%3B%5DLondon+Analytics%5B%2Furl%5D
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Dec 19, 2005 10:08 am    Post subject: ftn95 on x64 - a quick review Reply with quote

Andrew

The link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/performance_and_memory_consumption.asp

states that "On the x64 processor, each 32-bit application receives 4 GB virtual address space in the WOW64 environment, if the application has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set in the image header. If this flag is not set, the 32-bit application receives 2 GB virtual address space."

Since you are using version 4.8 of FTN95, in theory all you need to do is to ensure that you are compiling in a release mode (not /CHECK, /DEBUG etc), then the appropriate image header flag will be set for you.

I am have not checked the details of your test program but I suggest you try a single large ALLOCATE to get the size of the largest block available. I seem to recall that ALLOCATE uses GlobalAlloc which will attempt to grab a block of the requested size.

Regards

Paul
Back to top
View user's profile Send private message AIM Address
LA



Joined: 27 Nov 2005
Posts: 7

PostPosted: Tue Dec 20, 2005 7:43 am    Post subject: ftn95 on x64 - a quick review Reply with quote

I can get memory allocated up to about 3424 MB if allocated across two or more arrays, but the maximum for a single array appears to be 2GB.

I wrote a simpler test program. This reads the number of MB to test from the command line (e.g. run with: TESTMEM 2046 ), and allocates it to an array. It puts the allocation error result into myerr. Zero indicates success, non-zero indicates failure.

Ftn95 fails badly at runtime, and in unpredictable ways, when allocating above about 2GB to an array:
Code:
[pre]program testmem
integer :: mb,myErr
integer*1,allocatable :: big1(:,:,Smile

call cmnum@(mb)
write(unit=*,fmt=*) mb

allocate (big1(mb,1024,1024),stat=myerr)
write(*,*) 'myerr=',myerr

if (myerr==0) then
write(unit=*,fmt=*) mb,"MB allocated OK"
big1=1
write(unit=*,fmt=*) "last array value=",big1(mb,1024,1024)
else
write(unit=*,fmt=*) "Failed to allocate, error: ",myerr
end if

end testmem[/pre]


Results:
[pre]<=2045 OK
2046 allocation error 1
2047 allocation error 1
2048 allocation "ok", last array value = -1
2049 allocation "ok", last array value = 95
>=2050 allocation "ok", program terminates silently when array is accessed
[/pre]

ftn95 personal edition v4.80 running on X64, AMD 4800+ dual core, 4GB RAM.
Compiler Options in Effect: COLOUR DELETE_OBJ_ON_ERROR LINK LIST MINIMISE_REBUILD NO_QUIT NON_STANDARD SINGLE_THREADED

Andrew Smith
[url="http://www.londonanalytics.info/"]London Analytics[/url]
_________________
Andrew+Smith%0D%0A%5Burl%3D%26quot%3Bhttp%3A%2F%2Fwww%2Elondonanalytics%2Einfo%2F%26quot%3B%5DLondon+Analytics%5B%2Furl%5D
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group