I would strongly recommend that you run your code through a memory
checking debugger, such as valgrind. Such debuggers can be extremely
illuminating and allow you to find memory problems that you didn't even
know that you had. We use valgrind (and others) heavily for LAM/MPI
(and Open MPI) development, for example.
See the LAM FAQ for how to run such these debuggers for MPI processes
in parallel.
Hope that helps.
On Dec 9, 2004, at 9:53 AM, chellapp_at_[hidden] wrote:
> Dear All,
> I am having problems with locating segmentation fault in my code. My
> code is in C++. I get segmentation fault when I call a function B. I do
> not get any fault with the segmentation fault with funcation A, when I
> use it in the place of function B. The difference between the functions
> A and B is as follows:
> < float Evaluate_chrom(char *trjfileBE, char *trjfileMC,
> < char *trjfileSE, float fit_func[])
> ---
>> float Evaluate_chrom(char *trjfileBE, char *trjfileMC,
>> char *trjfileSE, char *trjfileDS, float fit_func[])
> 18a19
>> cout<<"THE STR4: "<<trjfileDS<<endl;
> 101c102
>
> There is one argument more for the function B and one print
> statement.
> The call for these functions A and B are as follows:
> Evaluate_chrom(str1,str2,str3,fit_zsco);
> Evaluate_chrom(str1,str2,str3,str4,fit_zsco);
>
> I am wondering why this happens. I am breaking my head for the past 2
> days. Any help in this regard will be very much appreciated.
>
> Thank you very much.
>
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|