<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<br><br>Apparently I didn't try to compile it myself, there is a pointer dereference missing.<br>Pleae try the fix below.<br><br>Cheers,<br><br>Berk<br><br>--- a/src/tools/gmx_bar.c<br>+++ b/src/tools/gmx_bar.c<br>@@ -2049,7 +2049,7 @@ static void read_bar_xvg(char *fn, real *temp, lambda_t *lambda_head)<br> gmx_fatal(FARGS,"File '%s' contains fewer than two columns", fn);<br> }<br> <br>- if ( ( *temp != barsim->temp) && (*temp > 0) )<br>+ if ( !gmx_within_tol(*temp,barsim->temp,GMX_FLOAT_EPS) && (*temp > 0) )<br> {<br> gmx_fatal(FARGS,"Temperature in file %s different from earlier files or setting\n", fn);<br> }<br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Tue, 20 Mar 2012 09:23:38 +0100<br>> From: tomkirch@mis.mpg.de<br>> To: gmx-users@gromacs.org<br>> Subject: [gmx-users] Re: RE: problem with g_bar<br>> <br>> Hi Berk,<br>> <br>> Thanks a lot for your answer.<br>> <br>> I changed the line and recompiled Gromacs, sadly I got this error:<br>> <br>> gmx_bar.c: In function "read_bar_xvg":<br>> gmx_bar.c:2052:5: error: incompatible type for argument 1 of <br>> "gmx_within_tol"<br>> ../../include/maths.h:125:1: note: expected "double" but argument is of <br>> type "real *"<br>> make[3]: *** [gmx_bar.lo] Error 1<br>> <br>> Best,<br>> Tom<br>> <br>> On 03/20/2012 03:15 AM, gmx-users-request@gromacs.org wrote:<br>> > ------------------------------ Message: 3 Date: Mon, 19 Mar 2012 <br>> > 18:34:31 +0100 From: Berk Hess <gmx3@hotmail.com> Subject: RE: <br>> > [gmx-users] problem with g_bar To: Discussion list for GROMACS users <br>> > <gmx-users@gromacs.org> Message-ID: <br>> > <COL113-W32C019BA58913FEC173E168E420@phx.gbl> Content-Type: <br>> > text/plain; charset="iso-8859-1" Hi, Yes, there is a problem with <br>> > different temperature variables being single and double precision. <br>> > Does the one line change below fix the problem? Cheers, Berk - if ( ( <br>> > *temp != barsim->temp) && (*temp > 0) ) + if ( <br>> > !gmx_within_tol(temp,barsim->temp,GMX_FLOAT_EPS) && (*temp > 0) )<br>> >> > Date: Mon, 19 Mar 2012 13:57:51 +0100<br>> >> > From:tomkirch@mis.mpg.de<br>> >> > To:gmx-users@gromacs.org<br>> >> > Subject: [gmx-users] problem with g_bar<br>> >> > <br>> >> > Dear all,<br>> >> > <br>> >> > Recently I posted my problem with g_bar on this mailing list but got no<br>> >> > solution for it. After additional testing I decided to send an enhanced<br>> >> > description of my problem.<br>> >> > <br>> >> > I am doing Free Energy calculation. The dhdl values are put in separate<br>> >> > .xvg files. The routine g_bar is then started using:<br>> >> > <br>> >> > g_bar -b 100 -f md_*.xvg -o -oi -oh<br>> >> > <br>> >> > With the result:<br>> >> > <br>> >> > Program g_bar, VERSION 4.5.5<br>> >> > Source code file: .../src/gromacs-4.5.5/src/tools/gmx_bar.c, line: 2054<br>> >> > <br>> >> > Fatal error:<br>> >> > Temperature in file md_0.05.xvg different from earlier files or setting<br>> >> > <br>> >> > <br>> >> > Checking the header of all .xvg files showed the same line for the<br>> >> > temperature for all files:<br>> >> > <br>> >> > @ subtitle "T = 298.15 (K), \xl\f{} = 0.025"<br>> >> > <br>> >> > Changing the temperature manually to any integer (but still with .0) let<br>> >> > g_bar run fine.<br>> >> > <br>> >> > sed -i 's/T\ \=\ 298.15/T\ \=\ 298.0/g' md*<br>> >> > <br>> >> > Do you have any suggestions what's wrong here?<br>> >> > <br>> >> > I'm not that familiar with C, but my suggestion would be an error with<br>> >> > floating point arithmetic in line 2052 of gmx_bar.c<br>> >> > <br>> >> > if ( ( *temp != barsim->temp)&& (*temp> 0) )<br>> >> > <br>> >> > where *temp and barsim->temp are compared. Maybe it has something to do<br>> >> > with the input as long double (%lf) and statement "real *temp" in the<br>> >> > function header?<br>> >> > <br>> >> > I appreciate any hints.<br>> >> > <br>> >> > Best regards<br>> >> > Tom<br>> <br>> -- <br>> gmx-users mailing list gmx-users@gromacs.org<br>> http://lists.gromacs.org/mailman/listinfo/gmx-users<br>> Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!<br>> Please don't post (un)subscribe requests to the list. Use the <br>> www interface or send it to gmx-users-request@gromacs.org.<br>> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists<br></div>                                            </div></body>
</html>