[gmx-users] pmetest.c fixed?

Mark Abraham Mark.Abraham at anu.edu.au
Sat Sep 17 04:10:02 CEST 2005

Lei Zhou wrote:
> Hi, recently I tried to compile pmetest.c (under src/contrib) but 
> failed. After checking the source file, I did the following modifcation:
> from                 
> init_forcerec(stdlog,fr,&ir,&top,cr,mdatoms,nsb,box,FALSE,NULL,FALSE);
> change to         
> init_forcerec(stdlog,fr,&ir,&top,cr,mdatoms,nsb,box,FALSE,NULL,NULL,FALSE);
> Now the program is running perfectly. I  am not sure whether this is 
> right way of fixing it.

I was hacking with this program in version 3.3b in the last week or so, 
and my reading of the source code suggested an additional NULL would do 
the job. I infer from your success with this plan is that there was 
something unusual about my system, because I got segfaults that were 
related to that null. It transpired that even though my .tpr didn't ask 
for anything to do with tabulating Coulomb functions (I'm unsure when 
this happens?), line 772 in force.c, namely
  fr->bcoultab   = (fr->eeltype != eelCUT) && !EEL_RF(fr->eeltype);
meant that eventually bTab got set to generate tables, and that code 
needs a string instead of a NULL back up above. I made up a bogus string 
and it worked without appearing in the output anywhere, which I thought 
weird. This routine should calculate the "Coul recip." field from an 
original run, and in my experience it did.

> Also I have the following questions related to pmetest.c:
> 1, with the groups flag on, what does it mean to calculate half an 
> energy matrix?
> 2, what is the detailed algorithm to generate PME (coul-LR) for each 
> energy group? Was there a fftw for each group actually?
> 3, what is the orger of output in ener-pme.xvg? Is it 00 01 02 11 12 22, 
> if there are three energy groups?

Yes, from the code.

> 4, the total PME energy is still not identical to the Coul-LR from the 
> original energy file, offset by ~200 KJ/mol? Is this related to the 
> digital error or difference parallel execution (4-nodes for original MD 
> and 1 node for pmetest)?

I don't know - presumably your .tpr is now for one node?


More information about the gromacs.org_gmx-users mailing list