<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>