Hi -<br><br>Thanks for the responses. Setting LD_LIBRARY_PATH has no effect on the process, since the problem isn't with LD_LIBRARY_PATH or the compilation process, its with how the executable is being run.<br><br>I also tried Petsc 3.1 but got the same problem (with and without LD-LIBRARY-PATH set). <br clear="all">
<br>The --with-batch flag ended up being the solution that worked, once configure stopped I was able to run conftest through mpirun and then run reconfigure.py, and everything worked as expected.<br><br>Thanks again for the help!<br>
<br><br>Charles<br>
<br><br><div class="gmail_quote">On Mon, May 23, 2011 at 13:23, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></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><div></div><div>On Mon, 23 May 2011, Matthew Knepley wrote:<br>
<br>
> On Mon, May 23, 2011 at 2:16 PM, charles reid <<a href="mailto:charlesreid1@gmail.com" target="_blank">charlesreid1@gmail.com</a>>wrote:<br>
><br>
> > Hi -<br>
> ><br>
> > I'm trying to install Petsc and linking to OpenMPI, but running into a<br>
> > conflict with the compiler test. If I specify my MPI installation directory<br>
> > and my mpiexec command, like so:<br>
> ><br>
> > ./configure \<br>
> > --prefix=/uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/petsc/3.0.0_incendio" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/petsc/3.0.0_incendio</a> \<br>
> > --with-x=false \<br>
> > --with-matlab=false \<br>
> > --download-f-blas-lapack=ifneeded \<br>
> > \<br>
> > --with-mpi-dir=/uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3%5C" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3\</a><br>
> > --with-mpiexec=/uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpirun" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpirun</a> \<br>
> > \<br>
> > --with-blas-lapack-dir=/usr/lib \Checking for program /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc...found" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc...found</a><br>
> > Defined make macro "CC" to "/uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a>"<br>
> > Pushing language C<br>
> > sh: /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c</a> -o conftest.o conftest.c<br>
> > Executing: /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -c -o<br>
> > conftest.o conftest.c<br>
> > sh:<br>
> > sh: /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c</a> -o conftest.o conftest.c<br>
> > Executing: /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -c -o<br>
> > conftest.o conftest.c<br>
> > sh:<br>
> > Pushing language C<br>
> > Popping language C<br>
> > Pushing language Cxx<br>
> > Popping language Cxx<br>
> > Pushing language FC<br>
> > Popping language FC<br>
> > Pushing language C Popping language C<br>
> > sh: /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a><br>
> > -o conftest conftest.o<br>
> > Executing: /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -o<br>
> > conftest conftest.o<br>
> > sh:<br>
> > sh: /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc-c</a> -o conftest.o conftest.c<br>
> > Executing: /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -c -o<br>
> > conftest.o conftest.c<br>
> > sh: Pushing language C<br>
> > Popping language C<br>
> > sh: /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a><br>
> > -o conftest conftest.o<br>
> > Executing: /uufs/<br>
> > <a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -o<br>
> > conftest conftest.o<br>
> > sh:Executing: ./conftest<br>
> > sh: ./conftest<br>
> > Executing: ./conftestsh:<br>
> > ERROR while running executable: Could not execute './conftest':./conftest:<br>
> > error while loading shared libraries: libmpi.so.0: cannot open shared object<br>
> > file: No such file or directory<br>
> > --with-shared=0 \<br>
> ><br>
> ><br>
> ><br>
> > The underlying problem can be demonstrated with a simple C hello world<br>
> > program:<br>
> ><br>
> > $ cat test.c<br>
> ><br>
> > #include <stdio.h><br>
> ><br>
> > main()<br>
> > {<br>
> > printf ("Hello World!\n");<br>
> > }<br>
> ><br>
> > $ /uufs/<a href="http://chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc" target="_blank">chpc.utah.edu/common/home/u0552682/pkg/openmpi/1.4.3/bin/mpicc</a> -o<br>
> > test.o test.c<br>
> ><br>
> > $ ./test.o<br>
> > ./test.o: error while loading shared libraries: libmpi.so.0: cannot open<br>
> > shared object file: No such file or directory<br>
> ><br>
> ><br>
> ><br>
> > Running the executable with mpirun alone shows the same error (similar to<br>
> > this thread at OpenMPI list:<br>
> > <a href="http://www.open-mpi.org/community/lists/users/2006/07/1691.php" target="_blank">http://www.open-mpi.org/community/lists/users/2006/07/1691.php</a>)<br>
> ><br>
> > $ mpirun -np 1 ./test.o<br>
> > ./test.o: error while loading shared libraries: libmpi.so.0: cannot open<br>
> > shared object file: No such file or directory<br>
> ><br>
> ><br>
> ><br>
> > and ultimately the resolution is to specify the full path of mpirun when<br>
> > running the executable (as per the response to the above thread,<br>
> > <a href="http://www.open-mpi.org/community/lists/users/2006/07/1692.php" target="_blank">http://www.open-mpi.org/community/lists/users/2006/07/1692.php</a>):<br>
> ><br>
> > $ `which mpirun` -np 1 ./test.o<br>
> > Hello World!<br>
> ><br>
> ><br>
> ><br>
> > So my question is, why does Petsc's compiler test insist on running the<br>
> > mpicc-built test executable in an incorrect way (i.e. ./conftestsh instead<br>
> > of /path/to/mpiexec ./conftest)? And how can I compile with OpenMPI<br>
> > support? I'm unable to bypass this by specifying CC and CXX, as I just run<br>
> > into problems later on with mpi_init not being found.<br>
><br>
><br>
> There are many, many ways to run an executable. We count on 'sh<br>
> <executable>' as a default, and if that does not work<br>
> then you can run configure using --with-batch.<br>
<br>
</div></div>With openMPI - the primary issue is:<br>
<br>
They [openmpi folks] expect openmpi users to set LD_LIBRARY_PATH<br>
before using their compilers. So you should set that before running<br>
PETSc configure.<br>
<br>
Also - you are using older 3.0.0 version. 3.1 might have some<br>
workarrounds for openmpi [for sure petsc-dev does..]<br>
<br>
Satish<br>
<br>
><br>
> Matt<br>
><br>
><br>
> ><br>
> > Charles<br>
> ><br>
><br>
><br>
><br>
><br>
<br>
</blockquote></div><br>