<br /><br /><span>On 26/03/11, <b class="name">Craig Kitchen </b> &lt;ck363@cam.ac.uk&gt; wrote:</span><blockquote cite="mid:Prayer.1.3.3.1103251707350.30620@hermes-1.csi.cam.ac.uk" class="iwcQuote" style="border-left: 1px solid rgb(0, 0, 255); padding-left: 13px; margin-left: 0pt;" type="cite"><div class="mimepart text plain">Dear All,<br /><br />When running g_cluster on a file generated with g_mdmat I receive a segmentation fault. I have tried different versions of Gromacs (4.0.5 and 4.5.3) on different workstations with both large and small matrices - all without success.</div></blockquote><br />Good trouble-shooting and report. You'd likely have been asked to check a recent version and with a small matrix :-)<br /><br />This was a two-part bug - a clean-up function was called when the corresponding initialization hadn't been called, and that clean-up function assumed that initialization had happened. I fixed both in git.<br /><br />You can work around this by hacking in src/tools/gmx_cluster.c. Around line 1260 there will be code like<br /><br />if (bPBC) {<br />  gmx_rmpbc_done(gpbc);<br />}<br /><br />which you should move one line up (inside a set of braces that mean the clean-up is called only after initialization occurs). Don't worry about the indenting.<br /><br />Mark<br /><br /><blockquote cite="mid:Prayer.1.3.3.1103251707350.30620@hermes-1.csi.cam.ac.uk" class="iwcQuote" style="border-left: 1px solid rgb(0, 0, 255); padding-left: 13px; margin-left: 0pt;" type="cite"><div class="mimepart text plain">I am calling g_cluster with:<br /><br />g_cluster -dm dmat_1.xpm -cutoff 3.4 -g cluster_1.log<br /><br />Whereupon I receive the error:<br /><br />Using linkage method for clustering<br />Reading rms distance matrix 100%<br />Segmentation fault<br /><br />The distance matrix (dmat_1.xpm) was generated with:<br /><br />g_mdmat -f onlyba.gro -s onlyba.gro -t 4.0 -mean dmat_1.xpm<br /><br />The configuration (onlyba.gro) and matrix file (dmat_1.xpm) are attached (and since they are short also pasted below).<br /><br />Any help on this would be greatly appreciated!<br /><br />Regards,<br /><br />Craig<br /><br />Craig Kitchen<br />Department of Chemistry<br />University of Cambridge<br />Lensfield Road<br />Cambridge<br />CB2 1EW<br />UK<br /><br /><br /><br /><br />Generated by trjconv : Coarse-Grained Model of EAS Barrels and Loop Residues (including bonds) t= 0.00000<br /> 10<br />  1BA      BA    1  44.780  21.592  37.304  0.0067  0.0035  0.0073<br /> 29BA      BA    2  12.191  38.323   0.704 -0.0084  0.0108 -0.0014<br /> 57BA      BA    3   2.092   9.298  47.957  0.0053 -0.0144  0.0053<br /> 85BA      BA    4  15.664  33.182  25.406  0.0291 -0.0067 -0.0069<br />113BA      BA    5  47.194  32.613  24.031 -0.0146 -0.0132  0.0184<br />141BA      BA    6  11.731  25.247  11.921 -0.0100 -0.0049  0.0025<br />169BA      BA    7  33.751  20.349  25.599 -0.0103 -0.0131  0.0078<br />197BA      BA    8   2.467  11.277  47.988 -0.0063  0.0188 -0.0001<br />225BA      BA    9  25.948  26.283  35.007  0.0191  0.0058  0.0047<br />253BA      BA   10  26.103  27.621  36.697 -0.0057  0.0281 -0.0110<br />48.00000  48.00000  48.00000<br /><br /><br />/* XPM */<br />/* Generated by g_mdmat */<br />/* This file can be converted to EPS by the GROMACS program xpm2ps */<br />/* title:   &quot;Mean smallest distance&quot; */<br />/* legend:  &quot;Distance (nm)&quot; */<br />/* x-label: &quot;Residue Index&quot; */<br />/* y-label: &quot;Residue Index&quot; */<br />/* type:    &quot;Continuous&quot; */<br />static char *gromacs_xpm[] = {<br />&quot;10 10   40 1&quot;,<br />&quot;A  c #FFFFFF &quot; /* &quot;0&quot; */,<br />&quot;B  c #F8F8F8 &quot; /* &quot;0.103&quot; */,<br />&quot;C  c #F2F2F2 &quot; /* &quot;0.205&quot; */,<br />&quot;D  c #EBEBEB &quot; /* &quot;0.308&quot; */,<br />&quot;E  c #E5E5E5 &quot; /* &quot;0.41&quot; */,<br />&quot;F  c #DEDEDE &quot; /* &quot;0.513&quot; */,<br />&quot;G  c #D8D8D8 &quot; /* &quot;0.615&quot; */,<br />&quot;H  c #D1D1D1 &quot; /* &quot;0.718&quot; */,<br />&quot;I  c #CBCBCB &quot; /* &quot;0.821&quot; */,<br />&quot;J  c #C4C4C4 &quot; /* &quot;0.923&quot; */,<br />&quot;K  c #BEBEBE &quot; /* &quot;1.03&quot; */,<br />&quot;L  c #B7B7B7 &quot; /* &quot;1.13&quot; */,<br />&quot;M  c #B1B1B1 &quot; /* &quot;1.23&quot; */,<br />&quot;N  c #AAAAAA &quot; /* &quot;1.33&quot; */,<br />&quot;O  c #A3A3A3 &quot; /* &quot;1.44&quot; */,<br />&quot;P  c #9D9D9D &quot; /* &quot;1.54&quot; */,<br />&quot;Q  c #969696 &quot; /* &quot;1.64&quot; */,<br />&quot;R  c #909090 &quot; /* &quot;1.74&quot; */,<br />&quot;S  c #898989 &quot; /* &quot;1.85&quot; */,<br />&quot;T  c #838383 &quot; /* &quot;1.95&quot; */,<br />&quot;U  c #7C7C7C &quot; /* &quot;2.05&quot; */,<br />&quot;V  c #767676 &quot; /* &quot;2.15&quot; */,<br />&quot;W  c #6F6F6F &quot; /* &quot;2.26&quot; */,<br />&quot;X  c #696969 &quot; /* &quot;2.36&quot; */,<br />&quot;Y  c #626262 &quot; /* &quot;2.46&quot; */,<br />&quot;Z  c #5C5C5C &quot; /* &quot;2.56&quot; */,<br />&quot;a  c #555555 &quot; /* &quot;2.67&quot; */,<br />&quot;b  c #4E4E4E &quot; /* &quot;2.77&quot; */,<br />&quot;c  c #484848 &quot; /* &quot;2.87&quot; */,<br />&quot;d  c #414141 &quot; /* &quot;2.97&quot; */,<br />&quot;e  c #3B3B3B &quot; /* &quot;3.08&quot; */,<br />&quot;f  c #343434 &quot; /* &quot;3.18&quot; */,<br />&quot;g  c #2E2E2E &quot; /* &quot;3.28&quot; */,<br />&quot;h  c #272727 &quot; /* &quot;3.38&quot; */,<br />&quot;i  c #212121 &quot; /* &quot;3.49&quot; */,<br />&quot;j  c #1A1A1A &quot; /* &quot;3.59&quot; */,<br />&quot;k  c #141414 &quot; /* &quot;3.69&quot; */,<br />&quot;l  c #0D0D0D &quot; /* &quot;3.79&quot; */,<br />&quot;m  c #070707 &quot; /* &quot;3.9&quot; */,<br />&quot;n  c #000000 &quot; /* &quot;4&quot; */,<br />/* x-axis:  1 2 3 4 5 6 7 8 9 10 */<br />/* y-axis:  1 2 3 4 5 6 7 8 9 10 */<br />&quot;nnnnnnnnVA&quot;,<br />&quot;nnnnnnnnAV&quot;,<br />&quot;nnUnnnnAnn&quot;,<br />&quot;nnnnnnAnnn&quot;,<br />&quot;nnnnnAnnnn&quot;,<br />&quot;nnnnAnnnnn&quot;,<br />&quot;nnnAnnnnnn&quot;,<br />&quot;nnAnnnnUnn&quot;,<br />&quot;nAnnnnnnnn&quot;,<br />&quot;Annnnnnnnn&quot;</div></blockquote>