Hi Riccardo and all, I am extremely sorry if I offended someone. My purpose was definitely not that.
On Wed, May 26, 2010 at 11:48 PM, Riccardo Di Meo <dimeo at democritos.it>wrote: > soumyajyoti haldar wrote: > > Hi, > > > > On Wed, May 26, 2010 at 9:11 PM, Riccardo Di Meo <dimeo at democritos.it > > <mailto:dimeo at democritos.it>> wrote: > > > > Vikas Varshney wrote: > > > Dear all, > > > I have a very simple question. > > > > > > I have 2 mpif90 installed on my machine > > > one in /usr/local/bin which does not have fortran support. It says > > > "Unfortunately, this installation of Open MPU was not compiled with > > > Fortran 90 support ..." > > > other one is in my local directory which was installed by me. It > > does > > > have fortran compiler (ifort). > > > > > > When, I try to run configure script to genarate makefile, it > assumes > > > mpif90 to be the first one and results in unsuccessful > > configure. So, > > > my question is that how can I direct the configure script to > > look for > > > other mpif90 and the assciated libraries and header files. Where > > do I > > > need to make necessary changes? Or do I need to ask my admin to > > update > > > mpif90 in /usr/local/bin (where I dont have writable access)? > > > > Two solutions: > > > > There's a MPIF90 environment variable, which can be set to the mpif90 > > compiler of your choice. Just point it to your mpif90 binary in your > > home before configuring QE. This is the standard/correct solution. > > > > A "one size fits all" solution, which you can use also for other > > similar > > cases ,would be to make your PATH environment variable give > precedence > > to the location of the mpif90 compiler you want to use: > > > > export PATH=<location of your mpif90>:$PATH [bash] > > > > > > you need to set correct LD_LIBRARY_PATH also. Otherwise during > > compilation and run time it may pickup the wrong > LD_LIBRARY_PATH it's a variable used only at runtime and has nothing to > do withbcompilation (man ld.so for details). > Yes I know that LD_LIBRARY_PATH variable used only at runtime. ' compilation ' was just by mistake I wrote. > Btw if the MPI implementation is openmpi, LD_LIBRARY_PATH doesn't need > to be changed , as mpirun/mpiexec will set the correct environment > automatically (not to mention implementations like mpich v1, which link > statically by default)... > 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'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. http://www.open-mpi.org/faq/?category=running#adding-ompi-to-path But again it's my personal experience . > > > > > and one personal experience ,by default /usr/bin and /usr/local/bin > > are set as path when u boot up the system. > > and now if you your current mpif90 directory to PATH, it may not pick > > up the correct one. bcoz u have 2 mpif90, one is in /usr/bin , other > > is in some directory in you home. the search order for the mpif90 > > depends on which folder path is loaded to your path variable first . > > So if your PATH variable contains the entry of /usr/bin first then > > it'll not pick up the mpif90 from ur home. > > > > I made some changes in my .bash_profile as follows > > > > line 1 : unset PATH > > line 2 : export PATH="${PATH}:<location of your mpif90>" > > line 3: export PATH="${PATH}:/bin:/usr/bin:/usr/local/bin" and finally > > load "/etc/profile" again > > line 4: source /etc/profile > > Maybe I'm missing something, but besides from using 4 instructions > instead of one, and from adding a stylish ":" in front of your PATH, > what's the added benefit of your suggestion over the compact form > > export PATH=<location of your mpif90>:$PATH > > in my reply? > Nothing wrong in your reply. > Besides, your suggestion assumes that the definition of PATH comes only > from /etc/profile, which would prevent people accepting it from using > software installed by the administrator in non standard ways (e.g. by > modifying /etc/skel/.bashrc) > > Cheers, > RDM > > > _______________________________________________ > Pw_forum mailing list > Pw_forum at pwscf.org > http://www.democritos.it/mailman/listinfo/pw_forum > -- Soumyajyoti Haldar, M.Sc Junior Research Fellow Advance Computing Laboratory Department of Physics, University of Pune Ganeshkhind, Pune - 411007; INDIA Tel : (+91 20) 25692678; Extn# 408 ~~~***~~~***~~~***~~~***~~~***~~~***~~~***~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.democritos.it/pipermail/pw_forum/attachments/20100527/94cf11dd/attachment.htm
