CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CD-adapco (
-   -   Segmentation error (

Ulf March 4, 2003 12:38

Segmentation error
I have serious problem with the subroutine posdat (on a single job). I do some averaging for droplet variables in posdat. This routine has worked perfect until I changed configuration (80000 cells to 700000 cells) and suddenly I got segmentation error (crash) at iteration 1. The subroutine is not even activated at this stage. I have been forced to not include this routine in my computations, but I really need this. I would appreciate any help. Regards Ulf

steve March 5, 2003 15:29

Re: Segmentation error
Are you dimensioning any arrays to 700000? If so are they simply dimensioned or are they in a common block? Fortran puts the memory in different places (stack vs heap vs who knows where it goes) depending upon how you define the array and sometimes you just need to move it to a different storage location.

Ulf March 6, 2003 03:24

Re: Segmentation error
Hi steve, thanks for your response. My arrays are simply dimensioned, e.g. DIMENSION SQRD(NCMAX), CUBD(NCMAX). This is also what I believe, causes the problems. But I don't know how to fix it.

steve March 6, 2003 10:45

Re: Segmentation error
Ulf, Try this


Instead of the dimension statement


Ulf March 6, 2003 12:11

Re: Segmentation error
Hi steve, Thank you very much for the tip. It worked perfectly. Regards, Ulf

John March 11, 2003 09:15

Re: Segmentation error
Hi Ulf and Steve, I see you are using posdat routine with Lagrangian. I currently have a problem running this on Linux. The case runs fine on SGI. Are you running on Linux too? John.

Ulf March 11, 2003 11:04

Re: Segmentation error
Yes, I am running Linux.

John March 11, 2003 13:29

Re: Segmentation error
Ulf/Steve, Could it be then, that Linux doesn't like the dimension statement causing it to segmentation fault? Ulf, have your tried your case on an SGI platform? If so, did it work? John.

Ulf March 12, 2003 03:40

Re: Segmentation error
Hi John, I have not tried my job on a workstation. We have retired almost all our old workstations. Have you tried the tip steve gave me. /Ulf

John March 12, 2003 05:25

Re: Segmentation error
Hi Ulf, I will try something like that. My dimension statements are actually in an include file which is referenced by other subroutines, so a straight substitution here will incur a "duplicate common statement" error. However, I will try a test.... Cheers, John.

steve March 17, 2003 10:11

Re: Segmentation error
John, I can tell you absolutely that there is a limit on how big you can make a dimension statement when the array is not in common. A non-common dimensioned array goes on to stack which is usually limited compared to datasize or vmemoryuse. You should be able to construct you include files to have only 1 reference to a given common block.


John March 18, 2003 11:43

Re: Segmentation error
Cheers Steve, On the case as we speak....

All times are GMT -4. The time now is 18:43.