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 

How to use big array?

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





PostPosted: Sun Jan 16, 2005 2:27 am    Post subject: How to use big array? Reply with quote

I tried to use the big array(see the attached codes) in fortran program, but the code fails to work. How could I solve this problem?

implicit none
integer(kind=3) nmax
integer error
parameter(nmax=1000000000)
integer(kind=1), allocatable :: a(Smile
integer(kind=1), allocatable :: b(Smile
integer(kind=1), allocatable :: c(Smile
integer(kind=1), allocatable :: d(Smile
integer(kind=1), allocatable :: e(Smile
integer(kind=1), allocatable :: f(Smile
allocate(a(nmax),stat=error)
write(*,*) error,nmax
allocate(b(nmax),stat=error)
write(*,*) error
allocate(c(nmax),stat=error)
write(*,*) error
allocate(d(nmax),stat=error)
write(*,*) error
allocate(e(nmax),stat=error)
write(*,*) error
allocate(f(nmax),stat=error)
write(*,*) error
a=1
write(*,*) 'a(1)=',a(1)
c=2
write(*,*) 'c(nmax)=',c(nmax)
deallocate(a)
deallocate(b)
deallocate(c)
deallocate(d)

end

Tan Handong
Back to top
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Tue Jan 18, 2005 3:37 am    Post subject: How to use big array? Reply with quote

Tan

That is an awfull lot of memory you are using there! Many gigabytes in fact. Have you looked at 'virtual common' ?

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Andrew



Joined: 09 Sep 2004
Posts: 232
Location: Frankfurt, Germany

PostPosted: Thu Jan 20, 2005 1:42 pm    Post subject: How to use big array? Reply with quote

Have a look at the following article.

http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx

By default about 2GB is the limit on Win32 due to the way the OS allocates space for user and system applications but there is a way you can get another 1GB if you have the right OS. If you are running one of the following operating systems:

Windows XP Professional
Windows Server 2003
Windows Server 2003, Enterprise Edition
Windows Server 2003, Datacenter Edition
Windows 2000 Advanced Server
Windows 2000 Datacenter Server
Windows NT Server 4.0, Enterprise Edition

You can use the /3GB switch within the boot.ini for your OS. This reserves 3GB of memory for use for user applications and 1GB for the system. You also need to edit the executable that wants to make use of this increased space by using the Microsoft utility editbin.exe to set the IMAGE_FILE_LARGE_ADDRESS_AWARE bit in the executable header after you have compiled it as normal. This is the only possible way you will get more than 2GB, however, I have seen some systems become unstable when the /3GB switch is used so treat with caution. I would certainly edit boot.ini to have a seperate entry for the 3GB boot so if it fails you can choose to startup Windows without the switch, for example:

Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn
multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional 3GB" /fastdetect /NoExecute=OptIn /3GB
Back to top
View user's profile Send private message
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