CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   Segmentation error (https://www.cfd-online.com/Forums/siemens/53238-segmentation-error.html)

Ulf March 4, 2003 11: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 14: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 02: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 09:45

Re: Segmentation error
 
Ulf, Try this

COMMON/ULFSCOMMON/SQRD(NCMAX),CUBD(NCMAX)

Instead of the dimension statement

Steve

Ulf March 6, 2003 11:11

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

John March 11, 2003 08: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 10:04

Re: Segmentation error
 
Yes, I am running Linux.

John March 11, 2003 12: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 02: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 04: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 09: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.

Steve

John March 18, 2003 10:43

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


All times are GMT -4. The time now is 08:54.