Hi Riccardo and all,<br><br>I am extremely sorry if I offended someone. My purpose was definitely not that. <br><br><div class="gmail_quote">On Wed, May 26, 2010 at 11:48 PM, Riccardo Di Meo <span dir="ltr">&lt;<a href="mailto:dimeo@democritos.it">dimeo@democritos.it</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">soumyajyoti haldar wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Wed, May 26, 2010 at 9:11 PM, Riccardo Di Meo &lt;<a href="mailto:dimeo@democritos.it">dimeo@democritos.it</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:dimeo@democritos.it">dimeo@democritos.it</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Vikas Varshney wrote:<br>
&gt;     &gt; Dear all,<br>
&gt;     &gt; I have a very simple question.<br>
&gt;     &gt;<br>
&gt;     &gt; I have 2 mpif90 installed on my machine<br>
&gt;     &gt; one in /usr/local/bin which does not have fortran support. It says<br>
&gt;     &gt; &quot;Unfortunately, this installation of Open MPU was not compiled with<br>
&gt;     &gt; Fortran 90 support ...&quot;<br>
&gt;     &gt; other one is in my local directory which was installed by me. It<br>
&gt;     does<br>
&gt;     &gt; have fortran compiler (ifort).<br>
&gt;     &gt;<br>
&gt;     &gt; When, I try to run configure script to genarate makefile, it assumes<br>
&gt;     &gt; mpif90 to be the first one and results in unsuccessful<br>
&gt;     configure. So,<br>
&gt;     &gt; my question is that how can I direct the configure script to<br>
&gt;     look for<br>
&gt;     &gt; other mpif90 and the assciated libraries and header files. Where<br>
&gt;     do I<br>
&gt;     &gt; need to make necessary changes? Or do I need to ask my admin to<br>
&gt;     update<br>
&gt;     &gt; mpif90 in /usr/local/bin (where I dont have writable access)?<br>
&gt;<br>
&gt;     Two solutions:<br>
&gt;<br>
&gt;     There&#39;s a MPIF90 environment variable, which can be set to the mpif90<br>
&gt;     compiler of your choice. Just point it to your mpif90 binary in your<br>
&gt;     home before configuring QE. This is the standard/correct solution.<br>
&gt;<br>
&gt;     A &quot;one size fits all&quot; solution, which you can use also for other<br>
&gt;     similar<br>
&gt;     cases ,would be to make your PATH environment variable give precedence<br>
&gt;     to the location of the mpif90 compiler you want to use:<br>
&gt;<br>
&gt;     export PATH=&lt;location of your mpif90&gt;:$PATH  [bash]<br>
&gt;<br>
&gt;<br>
&gt; you need to set correct LD_LIBRARY_PATH also. Otherwise during<br>
&gt; compilation and run time it may pickup the wrong<br>
</div></div>LD_LIBRARY_PATH it&#39;s a variable used only at runtime and has nothing to<br>
do withbcompilation  (man ld.so for details).<br></blockquote><div><br>Yes I know that LD_LIBRARY_PATH variable used only at runtime. &#39; compilation &#39;  was just  by mistake I wrote. <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


<br>
Btw if the MPI implementation is openmpi, LD_LIBRARY_PATH doesn&#39;t need<br>
to be changed , as mpirun/mpiexec will set the correct environment<br>
automatically (not to mention implementations like mpich v1, which link<br>
statically by default)...<br></blockquote><div><br>Well , that was the impression I had earlier, that it can set the correct environment. But if the system contains both gcc compiled openmpi ( most common location is /usr/lib/openmpi , iff installed by the OS !!! ) and  intel compiled MPI ( installed by user ) then my personal experience tells me to better set the LD_LIBRARY_PATH. openmpi faq&#39;s are also telling same thing, ( I found it during the trouble shooting of my problem ).  However openmpi can be run without setting the LD_LIBRARY_PATH, provided you always mention the full path .  My understanding from the following faqs tails me these. Pls correct me if I am wrong. <br>

<br><a href="http://www.open-mpi.org/faq/?category=running#adding-ompi-to-path">http://www.open-mpi.org/faq/?category=running#adding-ompi-to-path</a> <br><br>But again it&#39;s my personal experience . <br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


<div class="im"><br>
&gt;<br>
&gt; and one personal experience ,by default  /usr/bin and /usr/local/bin<br>
&gt; are set as path when u boot up the system.<br>
&gt; and now if you  your current mpif90 directory to PATH, it may not pick<br>
&gt; up the correct one. bcoz u have 2 mpif90, one is in /usr/bin , other<br>
&gt; is in some directory in you home.  the search order for the mpif90<br>
&gt; depends on which folder path is loaded to your path variable first .<br>
&gt; So if your PATH variable contains the entry of /usr/bin first then<br>
&gt; it&#39;ll not pick up the mpif90 from ur home.<br>
&gt;<br>
&gt; I made some changes in my .bash_profile as follows<br>
&gt;<br>
&gt; line 1 : unset PATH<br>
&gt; line 2 : export PATH=&quot;${PATH}:&lt;location of your mpif90&gt;&quot;<br>
&gt; line 3: export PATH=&quot;${PATH}:/bin:/usr/bin:/usr/local/bin&quot; and finally<br>
&gt; load &quot;/etc/profile&quot; again<br>
&gt; line 4: source /etc/profile<br>
<br>
</div>Maybe I&#39;m missing something, but besides from using 4 instructions<br>
instead of one, and from adding a stylish &quot;:&quot; in front of your PATH,<br>
what&#39;s the added benefit of your suggestion over the compact form<br>
<div class="im"><br>
export PATH=&lt;location of your mpif90&gt;:$PATH<br>
<br>
</div>in my reply?<br></blockquote><div><br>Nothing wrong in your reply. <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Besides, your suggestion assumes that the definition of PATH comes only<br>
from /etc/profile, which would prevent people accepting it from using<br>
software installed by the administrator in non standard ways (e.g. by<br>
modifying /etc/skel/.bashrc)<br>
<br>
Cheers,<br>
<font color="#888888">RDM<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://www.democritos.it/mailman/listinfo/pw_forum" target="_blank">http://www.democritos.it/mailman/listinfo/pw_forum</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Soumyajyoti Haldar, M.Sc<br><br>Junior Research Fellow<br>Advance Computing Laboratory<br>Department of Physics, University of Pune<br>Ganeshkhind, Pune - 411007; INDIA<br>

<br>Tel : (+91 20) 25692678; Extn# 408<br><br>~~~***~~~***~~~***~~~***~~~***~~~***~~~***~~~<br>