[gmx-developers] memory problem in gmx_rdf.c

David Bostick dbostick at scripps.edu
Wed Jan 26 06:39:26 CET 2005

Hello all,

There have been one or two complaints on gmx-users about g_rdf giving a 
segmentation fault on Mac OS X systems.  The program seems to work, 
however, on Linux.  I was not able to track down the memory problem in 
gmx_rdf.c , however, the program works when I place a printf statement 
under line 352 in gmx_rdf.c as follows:

    /* We have to normalize by dividing by the number of frames */
    rho     = isize[g+1]/vol;
   printf(""); /* DLB -- indicates a memory problem */
    normfac = 1.0/((rho*nframes)*isize[0]);    
    /* Do the normalization */ 

There is either something wrong with the gcc compiler or there is some 
memory problem that the printf statement remedies. Perhaps this info will 
help if anyone is interested in fixing the problem.


David Bostick			   |
The Scripps Research Institute     |
Dept. of Molecular Biology, TPC 6  |
10550 N. Torrey Pines Rd. 	   |
La Jolla, CA 92037		   |	
Phone: 858-784-9614		   |
Fax:   858-784-8688		   |
Email: dbostick at scripps.edu	   |

More information about the gromacs.org_gmx-developers mailing list