Thanks again Jayesh. If MPI_Comm_spawn can spawn a dll (instead of a program/application) then this is what I want. I&#39;ll try it and let you know. <div><br></div><div>P.S: In order for my code to run do not want spawn a child process / create another executable from the main project&#39;s exe. I&#39;m a newbie and am still learning the jargon. So pardon me if I used the words &#39;spawning&#39; and &#39;child process&#39; incorrectly.</div>
<div><br><br><div class="gmail_quote">On Mon, Jan 24, 2011 at 4:41 PM, Jayesh Krishna <span dir="ltr">&lt;<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
 You can take a look at MPI Dynamic processes (MPI_Comm_spawn()) to spawn additional processes from your MPI process. Is that what you are looking for ?<br>
<div class="im"><br>
Regards,<br>
Jayesh<br>
<br>
----- Original Message -----<br>
From: &quot;Prashanth&quot; &lt;<a href="mailto:prashanth.dumpuri@gmail.com">prashanth.dumpuri@gmail.com</a>&gt;<br>
</div><div><div></div><div class="h5">To: &quot;Jayesh Krishna&quot; &lt;<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>&gt;, <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
Sent: Monday, January 24, 2011 4:22:06 PM<br>
Subject: Re: [mpich-discuss] using mpiexec as a dll<br>
<br>
Jayesh,<br>
Thanks for your immediate response. I have successfully built a DLL from my code (instead of an exe) and have integrated the DLL into the existing project&#39;s exe. I have to run the project exe on one processor and when invoked i have to run my code on multiple processors. How do i tell my DLL to use multiple processors and how do I know which processor is running the code? The only way I know how to do that is to use mpiexec -n 2 and this tells MPI_Comm_size that I have 2 processors and MPI_Comm_rank to get the rank of the current processor.<br>

Thanks<br>
Prashanth<br>
<br>
<br>
On Thu, Jan 20, 2011 at 3:30 PM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br>
<br>
<br>
Hi,<br>
You should be able to run an MPI process as a singleton process (without mpiexec). Try running your program from the command prompt without mpiexec and let us know if you have any issues.<br>
<br>
(PS: The singleton process should also be able to spawn MPI processes.)<br>
Regards,<br>
Jayesh<br>
<br>
<br>
<br>
<br>
----- Original Message -----<br>
From: &quot;Prashanth&quot; &lt; <a href="mailto:prashanth.dumpuri@gmail.com">prashanth.dumpuri@gmail.com</a> &gt;<br>
To: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
Sent: Thursday, January 20, 2011 2:40:59 PM<br>
Subject: [mpich-discuss] using mpiexec as a dll<br>
<br>
<br>
All,<br>
I have to integrate my code which requires MPICH2 - into an existing project as a dll. Ideally I would not want to spawn a child process for my code. In other words I do not want my code&#39;s dll to run mpiexec.exe as a background or child process. Is there a way to execute a MPI program without having to invoke mpiexec.exe? (I&#39;m running MPICH2 on Windows XP)<br>

Thanks<br>
Prashanth<br>
_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
<br>
</div></div></blockquote></div><br></div>