- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
I'm trying to increase the problem size in a program I've written, and it's started segfaulting for no apparent reason. The following block invariably segaults:
FORALL( i=1:SIZE(gParticles) )
gParticles(i)%lastPhi = gParticles(i)%phi
gParticles(i)%lastr = gParticles(i)%r
gParticles(i)%phi = gParticles(i)%phi + ( dtStep * GetOmega( gParticles(i)%r ) )
END FORALL
gParticles itself is an allocateable array, whose size is set at runtime. The problem appears when it gets past about 80k elements. The exact error reported by gdb (idb isn't installed on this machine) is:
0x0804cd33 in main_mp_advanceparticles_ () at main.f90:97
Line 97 is the first line in the FORALL block, but which line fails does vary. However, this is not the first time in the program that this array is accessed. By the time this point is reaced, the gParticles array has already been initialised and used to produce an output file.
My compiler options are
-g -C
and the version is
Version 8.0 Build 20031016Z
I'm aware this is fairly old, but I don't control this machine, and hence getting it upgraded takes a while (although if this is a known and fixed compiler problem, I should be able to get it done).
One more thing, I have
ulimit -s unlimited set too.
I'm trying to increase the problem size in a program I've written, and it's started segfaulting for no apparent reason. The following block invariably segaults:
FORALL( i=1:SIZE(gParticles) )
gParticles(i)%lastPhi = gParticles(i)%phi
gParticles(i)%lastr = gParticles(i)%r
gParticles(i)%phi = gParticles(i)%phi + ( dtStep * GetOmega( gParticles(i)%r ) )
END FORALL
gParticles itself is an allocateable array, whose size is set at runtime. The problem appears when it gets past about 80k elements. The exact error reported by gdb (idb isn't installed on this machine) is:
0x0804cd33 in main_mp_advanceparticles_ () at main.f90:97
Line 97 is the first line in the FORALL block, but which line fails does vary. However, this is not the first time in the program that this array is accessed. By the time this point is reaced, the gParticles array has already been initialised and used to produce an output file.
My compiler options are
-g -C
and the version is
Version 8.0 Build 20031016Z
I'm aware this is fairly old, but I don't control this machine, and hence getting it upgraded takes a while (although if this is a known and fixed compiler problem, I should be able to get it done).
One more thing, I have
ulimit -s unlimited set too.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try increasing the stacksize limit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sblionel wrote:Try increasing the stacksize limit.
Isn't that what
ulimit -s unlimited
does under bash (the shell I'm using)? Or is there something else I've got to tell the compiler itself? TIA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I missed that you did the unlimit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just run a further test, and this problem seems to be related to whole array operations. Turning the problem FORALL loop into a DO loop fixed the problem. However, a later whole array operation using one of my ELEMENTAL functions then failed.
I can obviously fix this by putting in explicit DO loops, but I'd prefer not to do that. The way I've done it should work.
I can obviously fix this by putting in explicit DO loops, but I'd prefer not to do that. The way I've done it should work.
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