CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CD-adapco

Using the T array in posdat.f, sigsegv, debugger

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 21, 2008, 13:11
Default Using the T array in posdat.f, sigsegv, debugger
  #1
Daniel
Guest
 
Posts: n/a
I have a transient model which uses several scalars (7 active, 15 passive). The active scalars use sorsca.f to change the concentrations, one of the passive scalars uses scalfn.f, but the rest require reading and changing the values at the end of the time step. To accomplish this, I have been using the T array in posdat.f. However, after a certain number of time steps (depending on the size of the time step and whether it is single or double precision, but around 30 steps), the solution fails with a segmentation fault ("Received signal sigsegv - exiting"). However, when I use the "-g -devtool='gdb'" options to debug, the segmentation fault disappears and the solution runs!? Does anyone have an idea why this might be, or what to change so that it will run without the debugger? I am at a loss for ideas, so anything would be helpful. Thanks so much!
  Reply With Quote

Old   February 22, 2008, 05:42
Default Re: Using the T array in posdat.f, sigsegv, debugg
  #2
Richard
Guest
 
Posts: n/a
It's probably memory corruption - you're writing beyond the range of an array somewhere, or you are using dynamic memory (i.e. a Cray pointer) which you have not allocated. Sometimes the corruption gets "moved" when you compile "-g", making it appear that the problem has been fixed.

If the run fails with "-g" (no -devtool) then you could try a memory checker like valgrind. Otherwise you will probably have to use print statements in your coding. Check that you are allocating memory, and check that array indices are always within bounds.
  Reply With Quote

Old   February 22, 2008, 13:54
Default Re: Using the T array in posdat.f, sigsegv, debugg
  #3
Daniel
Guest
 
Posts: n/a
I'm pretty sure you are right. The run still works when I only use the -g option and leave out -devtool. I'm actually not using any user defined arrays; the only array I use is the T array in posdat.f. I've checked all of my indices, etc., when I read from and write to the T array and there doesn't seem to be a problem there. I think it's just that I have so many scalars (22) and computational cells (45,000 for now, but that will be increasing significantly), that I'm using memory not allocated to the T array by Star-CD. Do you know how to allocate more memory to the T array, since it is a built-in Star-CD variable? Thanks so much!
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam 13 How can one run solver in debugger atzaru OpenFOAM 7 July 6, 2009 11:45
debugger with STAR CD V4 Jaishree CD-adapco 1 December 2, 2007 15:40
fortran debugger John Deas Main CFD Forum 10 April 4, 2007 03:30
Intel Fortran debugger with mpirun agg Main CFD Forum 2 March 21, 2007 18:43
Visual Fortran compiler and debugger on linux CFD Student Main CFD Forum 3 February 26, 2007 07:26


All times are GMT -4. The time now is 23:51.