On Mon, Dec 3, 2012 at 9:38 PM, Shirts, Michael (mrs5pt) <span dir="ltr">&lt;<a href="mailto:mrs5pt@eservices.virginia.edu" target="_blank">mrs5pt@eservices.virginia.edu</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Just to chime in, the illegal instruction error is definitely a bad one.<br>

However, a FAQ that clearly flags this error and that the solution is fixing<br>
those two compiler flags as the likely fix is probably enough for now.<br></blockquote><div><br></div><div>Note that modifying compiler flags won&#39;t help because in these cases you&#39;d typically need to &quot;lower&quot; the CPU acceleration. This sis currently not possible without re-configuring.</div>
<div><br></div><div>--<br>Szilárd<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
Best,<br>
~~~~~~~~~~~~<br>
Michael Shirts<br>
Assistant Professor<br>
Department of Chemical Engineering<br>
University of Virginia<br>
<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a><br>
(434)-243-1821<br>
<br>
<br>
</div>&gt; From: Roland Schulz &lt;<a href="mailto:roland@utk.edu">roland@utk.edu</a>&gt;<br>
&gt; Reply-To: Discussion list for GROMACS development &lt;<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>&gt;<br>
&gt; Date: Mon, 3 Dec 2012 13:18:27 -0500<br>
&gt; To: Discussion list for GROMACS development &lt;<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>&gt;<br>
<div class=""><div class="h5">&gt; Subject: Re: [gmx-developers] Gromacs trying to use OpenMP instead of<br>
&gt; thread-mpi despite trying to convince it?<br>
&gt;<br>
&gt; On Mon, Dec 3, 2012 at 1:02 PM, Szilárd Páll &lt;<a href="mailto:szilard.pall@cbr.su.se">szilard.pall@cbr.su.se</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;  On Mon, Dec 3, 2012 at 5:12 AM, Roland Schulz &lt;<a href="mailto:roland@utk.edu">roland@utk.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  On Sun, Dec 2, 2012 at 12:58 PM, Shirts, Michael (mrs5pt) &lt;<br>
&gt;&gt;&gt; <a href="mailto:mrs5pt@eservices.virginia.edu">mrs5pt@eservices.virginia.edu</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; So, more progress, but no simulations running yet.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; mdrun -nt 8 -ntmpi 8 gives the same error as before (I actually tried<br>
&gt;&gt;&gt;&gt; that<br>
&gt;&gt;&gt;&gt; before, and forgot to include it in my error report)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; mdrun -ntmpi 8 -ntomp 1 gives the error<br>
&gt;&gt;&gt;&gt; Fatal error:<br>
&gt;&gt;&gt;&gt; OMP_NUM_THREADS (8) and the number of threads requested on the command<br>
&gt;&gt;&gt;&gt; line<br>
&gt;&gt;&gt;&gt; (1) have different values<br>
&gt;&gt;&gt;&gt;  For more information and tips for troubleshooting, please check the<br>
&gt;&gt;&gt;&gt; GROMACS<br>
&gt;&gt;&gt;&gt; website at <a href="http://www.gromacs.org/Documentation/Errors" target="_blank">http://www.gromacs.org/Documentation/Errors</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  We probably should print a notice that OMP_NUM_THREADS is set.<br>
&gt;&gt;&gt; Otherwise this is really confusing if OMP_NUM_THREADS isn&#39;t set by the user<br>
&gt;&gt;&gt; but by the system.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;  There is a note printed whenever the number of OpenMP threads is set by<br>
&gt;&gt; OMP_NUM_THREADS instead of -ntomp.<br>
&gt;&gt;<br>
&gt; I think if even core developers don&#39;t understand/find a note, then that&#39;s a<br>
&gt; pretty clear sign that it will be confusing to the average user ;-)<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Fatal error:<br>
&gt;&gt;&gt;&gt; OMP_NUM_THREADS is invalid: &#39;0&#39;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  This is also for ntomp. Also there you wand to use 1 not 0 to disable<br>
&gt;&gt;&gt; OpenMP (1 because it is total number of threads and thus 1 means serial).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; /var/spool/PBS/mom_priv/jobs/<a href="http://2053253.lc5.itc.virginia.edu.SC" target="_blank">2053253.lc5.itc.virginia.edu.SC</a>: line 22:<br>
&gt;&gt;&gt;&gt; 12201<br>
&gt;&gt;&gt;&gt; Illegal instruction     /h3/n1/shirtsgroup/gromac<br>
&gt;&gt;&gt;&gt; s_46/install/bin/mdrun_d -ntomp 1 -ntmpi -8 -deffnm<br>
&gt;&gt;&gt;&gt; /bigtmp/mrs5pt/eth.vrescale.50<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  I suppose the CPU on the compute node is different from the build host.<br>
&gt;&gt;&gt; You need to change GMX_CPU_ACCELERATION to the one correct for the compute<br>
&gt;&gt;&gt; node. It could also help to set GMX_DISTRIBUTABLE_BUILD (both are cmake<br>
&gt;&gt;&gt; options).<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;  GMX_DISTRIBUTABLE_BUILD only does one thing, it turns off rdtscp. Is the<br>
&gt;&gt; intention to provide more features for this option? If not, I don&#39;t see the<br>
&gt;&gt; point in not calling it GMX_DISABLE_RDTSCP.<br>
&gt;&gt;<br>
&gt; I called it that for two reasons:<br>
&gt; - Users don&#39;t know whether they want to disabled RDTSCP but they might know<br>
&gt; whether they want to have a distributable build. In other words, in this<br>
&gt; case the ultimate goal (&quot;make it work on a different CPU&quot;) makes more sense<br>
&gt; to the user then how this is achieved.<br>
&gt; - It can be extended in the furture.<br>
&gt;<br>
&gt; But I think we should consider to disable rdtscp by default. Unless we add<br>
&gt; a runtime detection. The advantage is to small to cause problems. And as<br>
&gt; far as I know the only other option which can cause illegal instruction is<br>
&gt; GMX_CPU_ACCELERATION. But that one is pretty obvious to the user (it is a<br>
&gt; non-advanced cmake option and I think people are much more likely to have<br>
&gt; heard of SSE then rdtscp).<br>
&gt;<br>
&gt; Roland<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;  Cheers,<br>
&gt;&gt; --<br>
&gt;&gt; Szilárd<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  Roland<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Best,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ~~~~~~~~~~~~<br>
&gt;&gt;&gt;&gt; Michael Shirts<br>
&gt;&gt;&gt;&gt; Assistant Professor<br>
&gt;&gt;&gt;&gt; Department of Chemical Engineering<br>
&gt;&gt;&gt;&gt; University of Virginia<br>
&gt;&gt;&gt;&gt; <a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a><br>
&gt;&gt;&gt;&gt; (434)-243-1821<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; From: Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt; Date: Sun, 2 Dec 2012 09:34:11 +0100<br>
&gt;&gt;&gt;&gt;&gt; To: &quot;<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a>&quot; &lt;<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a>&gt;,<br>
&gt;&gt;&gt;&gt; Discussion<br>
&gt;&gt;&gt;&gt;&gt; list for GROMACS development &lt;<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt; Subject: Re: [gmx-developers] Gromacs trying to use OpenMP instead of<br>
&gt;&gt;&gt;&gt;&gt; thread-mpi despite trying to convince it?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; You queuing system probably doesn&#39;t set OMP_NUM_THREADS then<br>
&gt;&gt;&gt;&gt;&gt; and I assume this machine has at least 16 (HT) cores.<br>
&gt;&gt;&gt;&gt;&gt; mdrun -ntmpi 8 -ntomp 1<br>
&gt;&gt;&gt;&gt;&gt; will do what you want, or:<br>
&gt;&gt;&gt;&gt;&gt; mdrun -nt 8 -ntmpi 8<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Berk<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On 12/02/2012 08:28 AM, Shirts, Michael (mrs5pt) wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt; Quick question:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Compiling the most recent code in release-4-6, I compile without<br>
&gt;&gt;&gt;&gt; OpenMP<br>
&gt;&gt;&gt;&gt;&gt;&gt; (because using group rather than verlet cutoffs), and using any of the<br>
&gt;&gt;&gt;&gt;&gt;&gt; below:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; mdrun_d -ntmpi 8 -deffnm ethrun<br>
&gt;&gt;&gt;&gt;&gt;&gt; or<br>
&gt;&gt;&gt;&gt;&gt;&gt; mdrun_d -nt 8 -deffnm ethrun<br>
&gt;&gt;&gt;&gt;&gt;&gt; or<br>
&gt;&gt;&gt;&gt;&gt;&gt; mdrun_d -deffnm ethrun<br>
&gt;&gt;&gt;&gt;&gt;&gt; or<br>
&gt;&gt;&gt;&gt;&gt;&gt; mdrun_d -ntomp 0 -deffnm ethrun<br>
&gt;&gt;&gt;&gt;&gt;&gt; or<br>
&gt;&gt;&gt;&gt;&gt;&gt; mdrun_d -ntomp 0 -ntmpi8 -deffnm ethrun<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I get:<br>
&gt;&gt;&gt;&gt;&gt;&gt; Fatal error:<br>
&gt;&gt;&gt;&gt;&gt;&gt; OpenMP threads are requested, but Gromacs was compiled without OpenMP<br>
&gt;&gt;&gt;&gt;&gt;&gt; support<br>
&gt;&gt;&gt;&gt;&gt;&gt; For more information and tips for troubleshooting, please check the<br>
&gt;&gt;&gt;&gt; GROMACS<br>
&gt;&gt;&gt;&gt;&gt;&gt; website at <a href="http://www.gromacs.org/Documentation/Errors" target="_blank">http://www.gromacs.org/Documentation/Errors</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Even though I&#39;m presumably requesting thread-mpi.  Worked fine with<br>
&gt;&gt;&gt;&gt; -nt<br>
&gt;&gt;&gt;&gt;&gt;&gt; previously (before the new -nt options introduced a few months back).<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Any suggestions or something I&#39;m doing wrong?  Perhaps gromacs is<br>
&gt;&gt;&gt;&gt;&gt;&gt; interpreting the cluster environment as requesting OpenMP somehow?<br>
&gt;&gt;&gt;&gt; FWIW, the<br>
&gt;&gt;&gt;&gt;&gt;&gt; PBS script request line is &quot;#PBS -l select=1:mpiprocs=8:ncpus=8&quot;.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Apologies if I missed this answers somewhere out there already.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt;&gt;&gt;&gt; ~~~~~~~~~~~~<br>
&gt;&gt;&gt;&gt;&gt;&gt; Michael Shirts<br>
&gt;&gt;&gt;&gt;&gt;&gt; Assistant Professor<br>
&gt;&gt;&gt;&gt;&gt;&gt; Department of Chemical Engineering<br>
&gt;&gt;&gt;&gt;&gt;&gt; University of Virginia<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a><br>
&gt;&gt;&gt;&gt;&gt;&gt; (434)-243-1821<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; gmx-developers mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt;&gt;&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;&gt;&gt;&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  --<br>
&gt;&gt;&gt; ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>
&gt;&gt;&gt; 865-241-1537, ORNL PO BOX 2008 MS6309<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; gmx-developers mailing list<br>
&gt;&gt;&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt;&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt;&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;&gt;&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>
&gt; 865-241-1537, ORNL PO BOX 2008 MS6309<br>
&gt; --<br>
&gt; gmx-developers mailing list<br>
&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
<br>
--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br></div>