<div>Following your investigation,</div><div><br></div><div>#!/bin/sh</div><div>echo $LD_LIBRARY_PATH<br>ldd /path/to/your/application</div><div><br></div><div>returned the correct value for the environment variable:</div>
<div><br></div><div> /usr/local/gromos/md++/lib/:/usr/local/gromos/lib/:/usr/local/boost/lib/:/usr/local/openmm/lib/:/opt/intel/composerxe-2011.3.174/compiler/lib/intel64:/opt/intel/composerxe-2011.3.174/ipp/../compiler/lib/intel64:/opt/intel/composerxe-2011.3.174/ipp/lib/intel64:/opt/intel/composerxe-2011.3.174/compiler/lib/intel64:/opt/intel/composerxe-2011.3.174/mkl/lib/intel64:/opt/intel/composerxe-2011.3.174/tbb/lib/intel64//cc4.1.0_libc2.4_kernel2.6.16.21:/opt/intel/composerxe-2011.3.174/mpirt/lib/intel64:/usr/local/mpich2.shared.exec/lib/</div>
<div><br></div><div>and ldd returned:</div><div><br></div><div><div> linux-vdso.so.1 => (0x00007fff0e2fd000)</div><div> libboost_program_options.so.1.42.0 => /usr/local/boost/lib/libboost_program_options.so.1.42.0 (0x00007f6c29f42000)</div>
<div> libboost_filesystem.so.1.42.0 => /usr/local/boost/lib/libboost_filesystem.so.1.42.0 (0x00007f6c29d2c000)</div><div> libboost_thread.so.1.42.0 => /usr/local/boost/lib/libboost_thread.so.1.42.0 (0x00007f6c29b17000)</div>
<div> libmpichcxx.so.3 => /usr/local/mpich2.shared.exec/lib/libmpichcxx.so.3 (0x00007f6c298f5000)</div><div> libpmpich.so.3 => /usr/local/mpich2.shared.exec/lib/libpmpich.so.3 (0x00007f6c294b8000)</div>
<div> libopa.so.1 => /usr/local/mpich2.shared.exec/lib/libopa.so.1 (0x00007f6c292b7000)</div><div> libmpl.so.1 => /usr/local/mpich2.shared.exec/lib/libmpl.so.1 (0x00007f6c290b2000)</div><div> librt.so.1 => /lib/librt.so.1 (0x00007f6c28e8f000)</div>
<div> libpthread.so.0 => /lib/libpthread.so.0 (0x00007f6c28c72000)</div><div> libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f6c2895e000)</div><div> libm.so.6 => /lib/libm.so.6 (0x00007f6c286da000)</div>
<div> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f6c284c3000)</div><div> libc.so.6 => /lib/libc.so.6 (0x00007f6c28140000)</div><div> libboost_system.so.1.42.0 => /usr/local/boost/lib/libboost_system.so.1.42.0 (0x00007f6c27f3b000)</div>
<div> libimf.so => /opt/intel/composerxe-2011.3.174/compiler/lib/intel64/libimf.so (0x00007f6c27b56000)</div><div> libsvml.so => /opt/intel/composerxe-2011.3.174/compiler/lib/intel64/libsvml.so (0x00007f6c274a2000)</div>
<div> libintlc.so.5 => /opt/intel/composerxe-2011.3.174/compiler/lib/intel64/libintlc.so.5 (0x00007f6c27352000)</div><div> libdl.so.2 => /lib/libdl.so.2 (0x00007f6c2714e000)</div><div> /lib64/ld-linux-x86-64.so.2 (0x00007f6c2a19e000)</div>
</div><div><br></div><div>which seems correct to me.</div><div><br></div><div>As for the </div><div> </div><div> mpiexec echo \$LD_LIBRARY_PATH</div><div><br></div><div>it didn't work here. I only got</div><div><br>
</div><div> $LD_LIBRARY_PATH</div><div><br></div><div>I tested</div><div><br></div><div> mpiexec "echo \$LD_LIBRARY_PATH" >> $log_file 2>&1</div><div>,</div><div> mpiexec echo "\$LD_LIBRARY_PATH" >> $log_file 2>&1</div>
<div><br></div><div>and</div><div><br></div><div> mpiexec echo \$LD_LIBRARY_PATH >> $log_file 2>&1</div><div><br></div><div>but got the same result every time.</div><div>I am not sure how the substitution of environment variables works when mpiexec is called but it looks like there is no substitution at all, since I didn't get a blank line, as if the variable was empty or not set, I got its name.</div>
<div><br></div><div><br></div>------------------------------<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Message: 4<br>
Date: Tue, 4 Sep 2012 22:28:56 +0200<br>
From: Reuti <<a href="javascript:;" onclick="_e(event, 'cvml', 'reuti@staff.uni-marburg.de')">reuti@staff.uni-marburg.de</a>><br>
To: <a href="javascript:;" onclick="_e(event, 'cvml', 'mpich-discuss@mcs.anl.gov')">mpich-discuss@mcs.anl.gov</a><br>
Subject: Re: [mpich-discuss] hydra_pmi_proxy: error while loading<br>
shared libraries: libimf.so: cannot open shared object file: No such<br>
file or directory (Reuti)<br>
Message-ID:<br>
<<a href="javascript:;" onclick="_e(event, 'cvml', '1935634D-C475-4A7C-8110-200976C5DDB9@staff.uni-marburg.de')">1935634D-C475-4A7C-8110-200976C5DDB9@staff.uni-marburg.de</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Am 04.09.2012 um 22:09 schrieb Marcelo C. R. Melo:<br>
<br>
> Yes Reuti, the LD_LIBRARY_PATH is configured correctly.<br>
> I can use the software normally when logged into any node.<br>
<br>
The environment will be different when started by a queuing system, at least for SGE I know this for sure and I think also for Torque/PBS. To investigate, can you please submit a job with:<br>
<br>
#!/bin/sh<br>
echo $LD_LIBRARY_PATH<br>
ldd /path/to/your/application<br>
<br>
If we know this, we have to check the processes on the slave nodes of the parallel job. Usually they are not started by an `ssh`, but some builtin mechanism inside the queuingsystem. So, submitting a job with this should show it:<br>
<br>
#!/bin/sh<br>
mpiexec echo \$LD_LIBRARY_PATH<br>
<br>
It's necessary to escape the $, as we want to get the result from the slave, not where the jobscript is executed.<br>
<br>
-- Reuti<br>
<br>
<br>
> The problem is that when I Spawn another executable from my initial launcher program, the spawned executable does not see the environment that the launcher received.<br>
><br>
> Is there any portable way to pass the environment variables to Spawned processes?<br>
><br>
> I posted this question on stack overflow a few days ago: <a href="http://stackoverflow.com/questions/12252490/why-cant-and-environment-variable-be-seen-by-an-executable-if-it-is-run-on-two/12252584#comment16448588_12252584" target="_blank">http://stackoverflow.com/questions/12252490/why-cant-and-environment-variable-be-seen-by-an-executable-if-it-is-run-on-two/12252584#comment16448588_12252584</a><br>
><br>
> Best regards,<br>
> Marcelo<br><br></blockquote>