[gmx-developers] tabulated potential energy=nan for r=0 nm and charged atoms

chris.neale at utoronto.ca chris.neale at utoronto.ca
Tue May 10 04:39:53 CEST 2011


My mistake. I've been working all day under the impression that  
GMX_NB_GENERIC was a compile-time flag, whereas it is simply a  
run-time flag.

Thank you,
Chris.

Quoting chris.neale at utoronto.ca:

> Thank you Berk. I can not seem to get the generic kernel to activate.
>
> To test, I modified gromacs 4.5.4 src/gmxlib/nonbonded/nb_generic.c to
> include exit(0) at line 87 (early inside gmx_nb_generic_kernel) and
> then compiled as follows and the run still proceeds through the full
> nsteps=10 set in my .mdp file.
>
> export GMX_NB_GENERIC=1
> export GMX_NO_SOLV_OPT=1
>
> module purge
> module load intel/intel-v11.1.072
> module load cmake/2.8.0
> export CCDIR=/scinet/gpc/intel/Compiler/11.1/072/bin/intel64/
> export FFTW_LOCATION=/project/pomes/cneale/GPC/exe/intel/fftw-3.1.2/exec
> export CXX=icpc
> export CC=icc
> cmake ../source/ \
>        -DFFTW3F_INCLUDE_DIR=$FFTW_LOCATION/include \
>        -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/libfftw3f.a \
>        -DCMAKE_INSTALL_PREFIX=$(pwd) \
>        -DGMX_X11=OFF \
>        -DCMAKE_CXX_COMPILER=${CCDIR}/icpc \
>        -DCMAKE_C_COMPILER=${CCDIR}/icc \
>        -DGMX_PREFER_STATIC_LIBS=ON \
>        -DGMX_MPI=OFF
> make
> make install
>
> Perhaps it is a specific problem with cmake? I see old posts where
> people report seeing a notification of using the generic kernel in the
> .log file (
> http://permalink.gmane.org/gmane.science.biology.gromacs.devel/2213 )
> where they noted "Found environment variable GMX_NB_GENERIC. Disabling
> all interaction-specific nonbonded kernels" but I don;t see anything
> like this.
>
> Thank you,
> Chris.
>
> Quoting Berk Hess <hess at cbr.su.se>:
>
>> That depends on the kernel you are using.
>> If you are using tabulated Coulomb only, no LJ, this is kernel number 300.
>> In which directory you have to look depends on your architecture.
>> It might be sse assembly kernels.
>> In that case you might want to use the generic kernel instead.
>>
>> Berk
>>
>> On 05/09/2011 05:30 PM, chris.neale at utoronto.ca wrote:
>>> Could you please point me to the file and line number so that I can
>>>  change this to a simple sqrt? If it impacts the timing too much,
>>> then I may just leave r=r^2 and remake my table to provide values
>>> based on r^2.
>>>
>>> Thank you very much for your assistance,
>>> Chris.
>>>
>>> Quoting Berk Hess <hess at cbr.su.se>:
>>>
>>>> Hi,
>>>>
>>>> In the innerloop r is calculated as rsquared*invsqrt(rsquared).
>>>>
>>>> Berk
>>>>
>>>> On 05/09/2011 04:54 PM, chris.neale at utoronto.ca wrote:
>>>>> Dear Developers:
>>>>>
>>>>> I find that even when tabulated potentials specify f(x)=0 and
>>>>> -f'(x)=0 for x=0, I still get a coulomb(SR) energy=nan when two
>>>>> charges occupy the exact same spot.
>>>>>
>>>>> Both the manual 4.5.4 page 151 equation 6.23 and the
>>>>> gromacs_nb.pdf  tabulated potentials tutorial (
>>>>> http://www.gromacs.org/Documentation/How-tos/Tabulated_Potentials
>>>>>  )  indicate that setting f(x)=0 and -f'(x)=0 for x=0 should lead
>>>>>  to an  energy of zero in this case.
>>>>>
>>>>> Is this a bug or a case of WYSIWYG? Can anybody offer any hints
>>>>> on  where I might start searching through the source code with
>>>>> printf  statements to see where the nan develops? I'm guessing
>>>>> there is  some if(r>0) in the code that doesn't technically need
>>>>> to be there.
>>>>>
>>>>> More information and a test system is available in my users-list
>>>>>  post for which I received no responses:
>>>>> http://lists.gromacs.org/pipermail/gmx-users/2011-May/061140.html
>>>>>
>>>>> Thank you very much,
>>>>> Chris.
>>>>>
>>>>
>>>> --
>>>> gmx-developers mailing list
>>>> gmx-developers at gromacs.org
>>>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>>>> Please don't post (un)subscribe requests to the list. Use the www
>>>> interface or send it to gmx-developers-request at gromacs.org.
>>>
>>>
>>>
>>
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the www
>> interface or send it to gmx-developers-request at gromacs.org.
>
>
>
>






More information about the gromacs.org_gmx-developers mailing list