- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The following is part of my program.
double precision, allocatable :: Isum(:,:), A(:,:),B(:),TOLD(:),s(:),aclone(:,:)
double precision, allocatable :: xp(:), dxp(:)
...
do 1003 nl=0,nlength
do 1003 i=0,nl
dummytwo=dabs(xp(nl)-xp(i))/VL/tautotalmin
Idummy1 =(1.0_8-dummytwo)*dexp(-dummytwo)+dummytwo**2*expint(1,dummytwo)
dummytwo=(xp(nl)+xp(i))/VL/tautotalmin
Idummy2 = (1.0_8-dummytwo)*dexp(-dummytwo)+dummytwo**2*expint(1,dummytwo)
Isum(nl,i)=Isum(nl,i)+x**2*dx*(Idummy1+Idummy2)/VL**2
1003 continue
print*, 'L', x/xmax
...
The problem is: everytime I set nlength>8000, then the generated .exe file will not work. It will flashing shut up. If I set nlegth about 7500, the .exe file will automatic stop wile x/xmax=0.97, then it won't work after that. If I set nlegth=3000, or 5000, it works well. So I think maybe when nlength>8000, the array is too big. However, I have no idea how to solove this problem.
In the visual studio fortran--optimization--heap arrays, I have set to 0. but still have the same problem. And I have also set linker--system--heap reserve size to999999999, also do not work.
Can anyone give me some advice? Thank you.
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using allocate-on-assignment, or do you you actually allocate the arrays outside the loop?
Please post the complete source code which, when run, will display the problems described.
Please post the complete source code which, when run, will display the problems described.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't set heap reserve size, nor should you set stack reserve size that large. I don't see any reference to nlength in the code you posted. Is this a 32-bit or 64-bit program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You also posted this in the Linux forum, saying there you are using Linux. But here you are apparently using Windows. Are you using both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi steve,
If I set heap reserve size smaller, still have such problem. It is a 32-bit program, and nlength is a set number which reads from input. If I set nlength=8000 in the interface, then it will not change through out the problem.
The problem for this code when debugging: input nlength=3000 or 5000, no problem. input nlength=8000, the output stops at 'L 0.92'. nlength=12000, it stops at 'L 0.21', however, the program is designed after the output reach the max, that is 'L 1.0', it will continue. That's what the program exactly do when nlength=3000.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I just want more suggestions. The linux program is similar with the windows code, but suffers the same problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting mecej4
Are you using allocate-on-assignment, or do you you actually allocate the arrays outside the loop?
Please post the complete source code which, when run, will display the problems described.
Please post the complete source code which, when run, will display the problems described.
allocate the arrays outside the loop. the complete code is too big, so I can just show you part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting ksmphn
...And I have also set linker--system--heap reserve size to999999999, also do not work.
Can anyone give me some advice? Thank you.
There was recently a discussion regarding right values for Stack (Reserve / Commit )andHeap (Reserve / Commit ) values.
Please take a look at a thread:
http://software.intel.com/en-us/forums/showthread.php?t=103614
Read Posts #5, #12 and #14.
I don't consider the value 999,999,999 as too high. However,Physical and Virtual Memorysizeshave to be
taken into account.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page