<div dir="ltr"><div><div><div><div><div>Dear Justin and Gonçalo, <br><br></div>thank you very much. It worked!<br><br></div>I first ran the two suggested commands:<br><br>$ update-alternatives --config mpi<br>
$ update-alternatives --config mpirun<br>
<br></div>and then I reconfigured and recompiled the application. <br><br></div>Regards,<br></div>Torstein<br><br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Apr 28, 2014 at 4:43 PM, Justin Riley <span dir="ltr">&lt;<a href="mailto:jtriley@mit.edu" target="_blank">jtriley@mit.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gonçalo,<br>
<br>
Ah, I thought this sounded familiar:<br>
<br>
<a href="https://github.com/jtriley/StarCluster/issues/370" target="_blank">https://github.com/jtriley/StarCluster/issues/370</a><br>
<br>
Thanks for responding. This will be fixed in the upcoming 14.04 AMIs.<br>
<br>
Torstein, you can update the MPI links interactively by running the<br>
following commands as root:<br>
<br>
$ update-alternatives --config mpi<br>
$ update-alternatives --config mpirun<br>
<br>
Select either all openmpi or all mpich paths at the interactive prompts.<br>
<br>
~Justin<br>
<div><div class="h5"><br>
On Mon, Apr 28, 2014 at 02:06:50PM +0200, Gonçalo Albuquerque wrote:<br>
&gt; Â  Â Hi,<br>
&gt; Â  Â When using AMI ami-6b211202 in us-east I stumbled across the same issue<br>
&gt; Â  Â you&#39;re experiencing.<br>
&gt; Â  Â The symbolic links in the alternatives system are mixing MPICH and<br>
&gt; Â  Â OpenMPI:<br>
&gt; Â  Â root@master:/etc/alternatives# update-alternatives --display mpi<br>
&gt; Â  Â mpi - auto mode<br>
&gt; Â  Â Â  link currently points to /usr/include/mpich2<br>
&gt; Â  Â /usr/include/mpich2 - priority 40<br>
&gt; Â  Â Â  slave libmpi++.so: /usr/lib/libmpichcxx.so<br>
&gt; Â  Â Â  slave libmpi.so: /usr/lib/libmpich.so<br>
&gt; Â  Â Â  slave libmpif77.so: /usr/lib/libfmpich.so<br>
&gt; Â  Â Â  slave libmpif90.so: /usr/lib/libmpichf90.so<br>
&gt; Â  Â Â  slave mpic++: /usr/bin/mpic++.mpich2<br>
&gt; Â  Â Â  slave mpic++.1.gz: /usr/share/man/man1/mpic++.mpich2.1.gz<br>
&gt; Â  Â Â  slave mpicc: /usr/bin/mpicc.mpich2<br>
&gt; Â  Â Â  slave mpicc.1.gz: /usr/share/man/man1/mpicc.mpich2.1.gz<br>
&gt; Â  Â Â  slave mpicxx: /usr/bin/mpicxx.mpich2<br>
&gt; Â  Â Â  slave mpicxx.1.gz: /usr/share/man/man1/mpicxx.mpich2.1.gz<br>
&gt; Â  Â Â  slave mpif77: /usr/bin/mpif77.mpich2<br>
&gt; Â  Â Â  slave mpif77.1.gz: /usr/share/man/man1/mpif77.mpich2.1.gz<br>
&gt; Â  Â Â  slave mpif90: /usr/bin/mpif90.mpich2<br>
&gt; Â  Â Â  slave mpif90.1.gz: /usr/share/man/man1/mpif90.mpich2.1.gz<br>
&gt; Â  Â /usr/lib/openmpi/include - priority 40<br>
&gt; Â  Â Â  slave libmpi++.so: /usr/lib/openmpi/lib/libmpi_cxx.so<br>
&gt; Â  Â Â  slave libmpi.so: /usr/lib/openmpi/lib/libmpi.so<br>
&gt; Â  Â Â  slave libmpif77.so: /usr/lib/openmpi/lib/libmpi_f77.so<br>
&gt; Â  Â Â  slave libmpif90.so: /usr/lib/openmpi/lib/libmpi_f90.so<br>
&gt; Â  Â Â  slave mpiCC: /usr/bin/mpic++.openmpi<br>
&gt; Â  Â Â  slave mpiCC.1.gz: /usr/share/man/man1/mpiCC.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpic++: /usr/bin/mpic++.openmpi<br>
&gt; Â  Â Â  slave mpic++.1.gz: /usr/share/man/man1/mpic++.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpicc: /usr/bin/mpicc.openmpi<br>
&gt; Â  Â Â  slave mpicc.1.gz: /usr/share/man/man1/mpicc.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpicxx: /usr/bin/mpic++.openmpi<br>
&gt; Â  Â Â  slave mpicxx.1.gz: /usr/share/man/man1/mpicxx.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpif77: /usr/bin/mpif77.openmpi<br>
&gt; Â  Â Â  slave mpif77.1.gz: /usr/share/man/man1/mpif77.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpif90: /usr/bin/mpif90.openmpi<br>
&gt; Â  Â Â  slave mpif90.1.gz: /usr/share/man/man1/mpif90.openmpi.1.gz<br>
&gt; Â  Â Current &#39;best&#39; version is &#39;/usr/include/mpich2&#39;.<br>
&gt; Â  Â root@master:/etc/alternatives# update-alternatives --display mpirun<br>
&gt; Â  Â mpirun - auto mode<br>
&gt; Â  Â Â  link currently points to /usr/bin/mpirun.openmpi<br>
&gt; Â  Â /usr/bin/mpirun.mpich2 - priority 40<br>
&gt; Â  Â Â  slave mpiexec: /usr/bin/mpiexec.mpich2<br>
&gt; Â  Â Â  slave mpiexec.1.gz: /usr/share/man/man1/mpiexec.mpich2.1.gz<br>
&gt; Â  Â Â  slave mpirun.1.gz: /usr/share/man/man1/mpirun.mpich2.1.gz<br>
&gt; Â  Â /usr/bin/mpirun.openmpi - priority 50<br>
&gt; Â  Â Â  slave mpiexec: /usr/bin/mpiexec.openmpi<br>
&gt; Â  Â Â  slave mpiexec.1.gz: /usr/share/man/man1/mpiexec.openmpi.1.gz<br>
&gt; Â  Â Â  slave mpirun.1.gz: /usr/share/man/man1/mpirun.openmpi.1.gz<br>
&gt; Â  Â Current &#39;best&#39; version is &#39;/usr/bin/mpirun.openmpi&#39;.<br>
&gt; Â  Â You do compile it with MPICH and try to run with OpenMPI. The solution is<br>
&gt; Â  Â to change the symbolic links by using the update-alternatives command. For<br>
&gt; Â  Â the runtime link (mpirun), it must be done in all the nodes of the<br>
&gt; Â  Â cluster.<br>
&gt; Â  Â No doubt this will be corrected in upcoming versions of the AMIs.<br>
&gt; Â  Â Regards,<br>
&gt; Â  Â Gonçalo<br>
&gt;<br>
&gt; Â  Â On Mon, Apr 28, 2014 at 1:09 PM, Torstein Fjermestad<br>
</div></div><div class="">&gt; Â  Â &lt;[1]<a href="mailto:tfjermestad@gmail.com">tfjermestad@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Â  Â  Â Dear Justin,<br>
&gt; Â  Â  Â Â <br>
&gt; Â  Â  Â during the compilation, the cluster only consisted of the master node<br>
&gt; Â  Â  Â which is of instance type c3.large. In order to run a test parallel<br>
&gt; Â  Â  Â calculation, I added a node of instance type c3.4xlarge (16 processors).<br>
&gt;<br>
&gt; Â  Â  Â The cluster is created form the following AMI: <br>
&gt; Â  Â  Â [0] ami-044abf73 eu-west-1 starcluster-base-ubuntu-13.04-x86_64 (EBS)<br>
&gt;<br>
&gt; Â  Â  Â Executing the application outside the queuing system like<br>
&gt;<br>
&gt; Â  Â  Â mpirun -np 2 -hostfile hosts ./pw.x -in inputfile.inp<br>
&gt;<br>
&gt; Â  Â  Â did not change anything.<br>
&gt;<br>
&gt; Â  Â  Â The output of the command &quot;mpirun --version&quot; is the following:<br>
&gt;<br>
&gt; Â  Â  Â mpirun (Open MPI) 1.4.5<br>
&gt;<br>
</div>&gt; Â  Â  Â Report bugs to [2]<a href="http://www.open-mpi.org/community/help/" target="_blank">http://www.open-mpi.org/community/help/</a><br>
<div><div class="h5">&gt;<br>
&gt; Â  Â  Â After investigating the matter a little bit, I found that mpif90 is<br>
&gt; Â  Â  Â likely compiled with an MPI version different from mpirun.<br>
&gt; Â  Â  Â The first line of the output of the command &quot;mpif90 -v&quot; is the<br>
&gt; Â  Â  Â following:<br>
&gt; Â  Â  Â Â <br>
&gt; Â  Â  Â mpif90 for MPICH2 version 1.4.1<br>
&gt;<br>
&gt; Â  Â  Â Furthermore, the output of the command &quot;ldd pw.x&quot; indicates that pw.x is<br>
&gt; Â  Â  Â compiled with mpich2 and not with Open MPI. The output is the following:<br>
&gt; Â  Â  Â Â <br>
&gt; Â  Â  Â linux-vdso.so.1 =&gt;  (0x00007fffd35fe000)<br>
&gt; Â  Â  Â Â Â Â  liblapack.so.3 =&gt; /usr/lib/liblapack.so.3 (0x00007ff38fb18000)<br>
&gt; Â  Â  Â Â Â Â  libopenblas.so.0 =&gt; /usr/lib/libopenblas.so.0 (0x00007ff38e2f5000)<br>
&gt; Â  Â  Â Â Â Â  libmpich.so.3 =&gt; /usr/lib/libmpich.so.3 (0x00007ff38df16000)<br>
&gt; Â  Â  Â Â Â Â  libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0<br>
&gt; Â  Â  Â (0x00007ff38dcf9000)<br>
&gt; Â  Â  Â Â Â Â  libgfortran.so.3 =&gt; /usr/lib/x86_64-linux-gnu/libgfortran.so.3<br>
&gt; Â  Â  Â (0x00007ff38d9e5000)<br>
&gt; Â  Â  Â Â Â Â  libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff38d6df000)<br>
&gt; Â  Â  Â Â Â Â  libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1<br>
&gt; Â  Â  Â (0x00007ff38d4c9000)<br>
&gt; Â  Â  Â Â Â Â  libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff38d100000)<br>
&gt; Â  Â  Â Â Â Â  librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff38cef7000)<br>
&gt; Â  Â  Â Â Â Â  libcr.so.0 =&gt; /usr/lib/libcr.so.0 (0x00007ff38cced000)<br>
&gt; Â  Â  Â Â Â Â  libmpl.so.1 =&gt; /usr/lib/libmpl.so.1 (0x00007ff38cae8000)<br>
&gt; Â  Â  Â Â Â Â  /lib64/ld-linux-x86-64.so.2 (0x00007ff390820000)<br>
&gt; Â  Â  Â Â Â Â  libquadmath.so.0 =&gt; /usr/lib/x86_64-linux-gnu/libquadmath.so.0<br>
&gt; Â  Â  Â (0x00007ff38c8b2000)<br>
&gt; Â  Â  Â Â Â Â  libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff38c6ae000)<br>
&gt;<br>
&gt; Â  Â  Â The feedback I got from the Quantum Espresso mailing list suggested that<br>
&gt; Â  Â  Â the cause of the error could be that pw.x (the executable) was not<br>
&gt; Â  Â  Â compiled with the same version of mpi as mpirun.<br>
&gt; Â  Â  Â The output of the commands &quot;mpirun --version&quot;, &quot;mpif90 -v&quot; and &quot;ldd<br>
&gt; Â  Â  Â pw.x&quot; above have lead me to suspect that this is indeed the case.<br>
&gt; Â  Â  Â I therefore wonder whether it is possible to control which mpi version I<br>
&gt; Â  Â  Â compile my applications with.<br>
&gt;<br>
&gt; Â  Â  Â If, with the current mpi installation, the applications are compiled<br>
&gt; Â  Â  Â with a different mpi version than mpirun, then I will likely have<br>
&gt; Â  Â  Â similar problems when compiling other applications as well. I would<br>
&gt; Â  Â  Â therefore very much appreciate if you could give me some hints on how I<br>
&gt; Â  Â  Â can solve this problem.<br>
&gt;<br>
&gt; Â  Â  Â Thanks in advance.<br>
&gt;<br>
&gt; Â  Â  Â Regards,<br>
&gt; Â  Â  Â Torstein<br>
&gt;<br>
</div></div>&gt; Â  Â  Â On Thu, Apr 24, 2014 at 5:13 PM, Justin Riley &lt;[3]<a href="mailto:jtriley@mit.edu">jtriley@mit.edu</a>&gt;<br>
<div class="">&gt; Â  Â  Â wrote:<br>
&gt;<br>
&gt; Â  Â  Â  Â Hi Torstein,<br>
&gt;<br>
&gt; Â  Â  Â  Â Can you please describe your cluster configuration (ie size, image<br>
&gt; Â  Â  Â  Â id(s),<br>
&gt; Â  Â  Â  Â instance type(s))? Also, you&#39;re currently using the SGE/OpenMPI<br>
&gt; Â  Â  Â  Â integration. Have you tried just using mpirun only as described in the<br>
&gt; Â  Â  Â  Â first part of:<br>
&gt;<br>
</div>&gt; Â  Â  Â  Â [4]<a href="http://star.mit.edu/cluster/docs/latest/guides/sge.html#submitting-openmpi-jobs-using-a-parallel-environment" target="_blank">http://star.mit.edu/cluster/docs/latest/guides/sge.html#submitting-openmpi-jobs-using-a-parallel-environment</a><br>

<div class="">&gt;<br>
&gt; Â  Â  Â  Â Also, what does &#39;mpirun --version&#39; show?<br>
&gt;<br>
&gt; Â  Â  Â  Â ~Justin<br>
&gt; Â  Â  Â  Â On Thu, Apr 17, 2014 at 07:19:28PM +0200, Torstein Fjermestad wrote:<br>
&gt; Â  Â  Â  Â &gt; Â  Â Dear all,<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â I recently tried to compile an application (Quantum Espresso,<br>
</div>&gt; Â  Â  Â  Â &gt; Â  Â [1][5]<a href="http://www.quantum-espresso.org/" target="_blank">http://www.quantum-espresso.org/</a>) to be used for parallel<br>
<div><div class="h5">&gt; Â  Â  Â  Â computations<br>
&gt; Â  Â  Â  Â &gt; Â  Â on StarCluster. The installation procedure of the application<br>
&gt; Â  Â  Â  Â consists of<br>
&gt; Â  Â  Â  Â &gt; Â  Â the standard &quot;./configure + make&quot; steps.  At the end of the<br>
&gt; Â  Â  Â  Â output from<br>
&gt; Â  Â  Â  Â &gt; Â  Â ./configure, the statement &quot;Parallel environment detected<br>
&gt; Â  Â  Â  Â successfully.\<br>
&gt; Â  Â  Â  Â &gt; Â  Â Configured for compilation of parallel executables.&quot; appears.<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â The compilation with &quot;make&quot; completes without errors. I then run<br>
&gt; Â  Â  Â  Â the<br>
&gt; Â  Â  Â  Â &gt; Â  Â application in the following way:<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â I first write a submit script (submit.sh) with the following<br>
&gt; Â  Â  Â  Â content:<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â cp /path/to/executable/pw.x .<br>
&gt; Â  Â  Â  Â &gt; Â  Â mpirun ./pw.x -in input.inp<br>
&gt; Â  Â  Â  Â &gt; Â  Â I then submit the job to the queueing system with the following<br>
&gt; Â  Â  Â  Â command<br>
&gt; Â  Â  Â  Â &gt; Â  Â Â <br>
&gt; Â  Â  Â  Â &gt; Â  Â qsub -cwd -pe orte 16 ./submit.sh<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â However, in the output of the calculation, the following line is<br>
&gt; Â  Â  Â  Â repeated<br>
&gt; Â  Â  Â  Â &gt; Â  Â 16 times:<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â Parallel version (MPI), running on 1 processors<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â It therefore seems like the program runs 16 1 processor<br>
&gt; Â  Â  Â  Â calculations that<br>
&gt; Â  Â  Â  Â &gt; Â  Â all write to the same output.<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â I wrote about this problem to the mailing list of Quantum<br>
&gt; Â  Â  Â  Â Espresso, and I<br>
&gt; Â  Â  Â  Â &gt; Â  Â got the suggestion that perhaps the mpirun belonged to a<br>
&gt; Â  Â  Â  Â different MPI<br>
&gt; Â  Â  Â  Â &gt; Â  Â library than pw.x (a particular package of Quantum Espresso) was<br>
&gt; Â  Â  Â  Â compiled<br>
&gt; Â  Â  Â  Â &gt; Â  Â with.<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â I compiled pw.x on the same cluster as I executed mpirun. Are<br>
&gt; Â  Â  Â  Â there<br>
&gt; Â  Â  Â  Â &gt; Â  Â several versions of openMPI on the AMIs provided by StarCluster?<br>
&gt; Â  Â  Â  Â In that<br>
&gt; Â  Â  Â  Â &gt; Â  Â case, how can I choose the correct one.<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â Perhaps the problem has a different cause. Does anyone have<br>
&gt; Â  Â  Â  Â suggestions on<br>
&gt; Â  Â  Â  Â &gt; Â  Â how to solve it?<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â Thanks in advance for your help.<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â Yours sincerely,<br>
&gt; Â  Â  Â  Â &gt; Â  Â Torstein Fjermestad<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; References<br>
&gt; Â  Â  Â  Â &gt;<br>
&gt; Â  Â  Â  Â &gt; Â  Â Visible links<br>
</div></div>&gt; Â  Â  Â  Â &gt; Â  Â 1. [6]<a href="http://www.quantum-espresso.org/" target="_blank">http://www.quantum-espresso.org/</a><br>
&gt;<br>
&gt; Â  Â  Â  Â &gt; _______________________________________________<br>
&gt; Â  Â  Â  Â &gt; StarCluster mailing list<br>
&gt; Â  Â  Â  Â &gt; [7]<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; Â  Â  Â  Â &gt; [8]<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt;<br>
&gt; Â  Â  Â _______________________________________________<br>
&gt; Â  Â  Â StarCluster mailing list<br>
&gt; Â  Â  Â [9]<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; Â  Â  Â [10]<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt;<br>
&gt; References<br>
&gt;<br>
&gt; Â  Â Visible links<br>
&gt; Â  Â 1. mailto:<a href="mailto:tfjermestad@gmail.com">tfjermestad@gmail.com</a><br>
&gt; Â  Â 2. <a href="http://www.open-mpi.org/community/help/" target="_blank">http://www.open-mpi.org/community/help/</a><br>
&gt; Â  Â 3. mailto:<a href="mailto:jtriley@mit.edu">jtriley@mit.edu</a><br>
&gt; Â  Â 4. <a href="http://star.mit.edu/cluster/docs/latest/guides/sge.html#submitting-openmpi-jobs-using-a-parallel-environment" target="_blank">http://star.mit.edu/cluster/docs/latest/guides/sge.html#submitting-openmpi-jobs-using-a-parallel-environment</a><br>

&gt; Â  Â 5. <a href="http://www.quantum-espresso.org/" target="_blank">http://www.quantum-espresso.org/</a><br>
&gt; Â  Â 6. <a href="http://www.quantum-espresso.org/" target="_blank">http://www.quantum-espresso.org/</a><br>
&gt; Â  Â 7. mailto:<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; Â  Â 8. <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt; Â  Â 9. mailto:<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; Â  10. <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<div class="HOEnZb"><div class="h5"><br>
&gt; _______________________________________________<br>
&gt; StarCluster mailing list<br>
&gt; <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br>
</div></div><br>_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br></blockquote></div><br></div>