Hi,<br><br>I could make the program work, but there are some points I still would like to clarify.<br><br>The problem is that my program also links to another library using its dll file. However, in my development environment, these dll's are not placed in the same directory where I build my application. Actually, I keep these dll's in the library's installation directory and my PATH environment variable points to this folder. <br>
<br>I could just figure out of the problem because I was trying to reduce my applications size and, in order to do that, I replaced many of the subroutines by dummy ones. When I disabled my part of the code related to the second library, it worked.<br>
<br>So, the solution I found was to copy the needed dll's to my application's folder. But I'm not so comfortable with this because this scheme had always worked, even with MPICH1 (i.e., when I link and run my application with MPIRUN).<br>
<br>Is such behavior expected? Why does mpiexec work differently from mpirun?<br>Any mistake from my side?<br><br>Another point is that I use to include 'mpif.h' in my Fortran routines that use MPICH2 and, I
link my application with mpich2.lib and fmpich2.lib, which are the
import libraries I have created from mpich2.dll and fmpich2.dll, using
OpenWatcom "wlib" utility.<br>
<br>I didn't know that the correct library to use was mpich2mpi.dll. Sorry for the question, but what are the differences?<br>
As I could make it run with mpich2.dll and fmpich2.dll, what kind of errors may I expect?<br>
<br>Thanks again.<br>LC<br><br><br><div class="gmail_quote">
2009/7/28 Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov" target="_blank">jayesh@mcs.anl.gov</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi,</font></span></div><div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span>>> create library
files from mpich2.dll and fmpich2.dll (distributed with MPICH2
setup),</span></div>
</div><div dir="ltr" align="left"><span> How are you
creating lib files from the dlls (In any case you should be using mpich2mpi.dll
instead of mpich2.dll)? </span></div><div>
<div dir="ltr" align="left"><span></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">>> <font color="#000000" face="Times New Roman" size="3">compile all my code with the MPICH2
libraries</font></font></span></div>
</div><div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> Are you compiling your code with the libraries
distributed with MPICH2 ? Or are you using the libs created by you
?</font></span></div><div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">>> run my code using "mpiexe -host hostname -n N
myapplication"</font></span></div>
</div><div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> Can you run your code on the localhost (Does "mpiexec
-n N myapplication" work ? )?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Regards,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Jayesh</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> </font></span></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:lccostajr@gmail.com" target="_blank">lccostajr@gmail.com</a>
[mailto:<a href="mailto:lccostajr@gmail.com" target="_blank">lccostajr@gmail.com</a>] <b>On Behalf Of </b>Luiz Carlos da Costa
Junior<br><b>Sent:</b> Monday, July 27, 2009 8:06 PM<br><b>To:</b> Jayesh
Krishna<br><b>Cc:</b> <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br><b>Subject:</b> Re:
[mpich-discuss] Fatal error in MPI_Init<br></font><br></div><div><div></div><div>
<div></div>Hi Jayesh,<br><br>I compile my code with OpenWatcom compiler.<br>The
procedure I use is:<br>
<ol>
<li>create library files from mpich2.dll and fmpich2.dll (distributed with
MPICH2 setup),
</li><li>compile all my code with the MPICH2 libraries
</li><li>run my code using "mpiexe -host hostname -n N myapplication"</li></ol>I had
already used procedure successfully before, but I don't know what is happening
now.<br>I have tried with MPICH2 versions 1.0.8 and the newer one 1.1.1, but the
error is the same.<br><br>I also tried to repeat this procedure on a computer
without MPI's installation, but I got the same.<br><br>As I told before, I'am
able to run CPI and also non-MPI programs.<br>Any clue that can help
me?<br><br>Thanks<br><br>
<div class="gmail_quote">2009/7/27 Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov" target="_blank">jayesh@mcs.anl.gov</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> Did
you recompile your code with MPICH2 ? Which version of MPICH2 are you
using ? How are you launching your MPI job (the command used to launch your
job) ? Are you able to run non-MPI programs (Does "mpiexec -n 2 hostname" work
?)?</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>(PS: The
error message)</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Regards,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Jayesh</span></font></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:mpich-discuss-bounces@mcs.anl.gov" target="_blank">mpich-discuss-bounces@mcs.anl.gov</a> [mailto:<a href="mailto:mpich-discuss-bounces@mcs.anl.gov" target="_blank">mpich-discuss-bounces@mcs.anl.gov</a>] <b>On Behalf Of </b>Luiz
Carlos da Costa Junior<br><b>Sent:</b> Friday, July 24, 2009 10:56
PM<br><b>To:</b> MPICH Discuss<br><b>Subject:</b> [mpich-discuss] Fatal error
in MPI_Init<br></font><br></div>
<div>
<div></div>
<div>
<div></div>Dears sirs,<br><br>I got the following message when I tried to run
my code under Windows XP:<br><br>
<div style="font-family: courier new,monospace; margin-left: 40px;">Fatal error
in MPI_Init: Other MPI error, error stack:<br>MPIR_Init_thread(394):
Initialization failed<br>MPID_Init(90)........: channel initialization
failed<br>MPID_Init(357).......: PMI_Init returned -1<br>[0] PMI_Init failed:
FAIL - init called when another process has exited without calling
init<br><br>job aborted:<br>rank: node: exit code[: error message]<br>0:
amsterdam: 1: Fatal error in MPI_Init: Other MPI error, error
stack:<br>MPIR_Init_thread(394): Initialization
failed<br>MPID_Init(90)........: channel initialization
failed<br>MPID_Init(357).......: PMI_Init returned -1<br>1: amsterdam:
-1073741515<br>2: amsterdam: -1073741515<br>3: amsterdam: -1073741515<br>4:
amsterdam: -1073741515<br></div><br>This software can be compiled against
Linux (using Intel) and Windows (using Open Watcom).<br>Under Linux, it works
normally.<br>Under Windows, I got the message above.<br>SMPD seems to be ok
once the distributed CPI program works normally.<br>If I link my code with
MPICH1-1.2.6 and run with "mpirun", it also works fine.<br><br>The weird thing
is that I could already make it work with MPICH2/Windows/Open
Watcom.<br><br>Do you have any clue regarding the reason of this
error?<br>What can I be doing wrong?<br><br>Thanks in
advance,<br>LC<br></div></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>