Ok. I have checked and yes smpd is running and I have given a sufficient username and password so that mpiexec will run. Now I am getting a new error when executing mpiexec -n 2 hostname where it is giving me this response:<br>
 <br>error closing the left context socket: Error = -1<br><br>
<div class="gmail_quote">On Wed, Nov 16, 2011 at 2:21 PM, Jayesh Krishna <span dir="ltr">&lt;<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br><br>1. Make sure that the process manager, smpd, is running in your system (Look in the task manager/Process Explorer to see if there is a service named smpd running. Alternately you can run &quot;smpd -status&quot; to check if smpd is running)<br>
<br>2. Run a simple non-MPI program like hostname from the command prompt using mpiexec (Type &quot;mpiexec -n 2 hostname&quot; ). When prompted for username/password give a valid Windows username/password.<br>  If mpiexec gives you an error, type &quot;mpiexec -remove&quot; to remove the existing registered username/password and then type &quot;mpiexec -register&quot; to register a new/valid Windows username/password. Re-run mpiexec.<br>
<br>3. Run the sample MPI program, cpi.exe, provided with MPICH2 (mpiexec -n 2 C:\Progra~1\MPICH2\examples\cpi.exe)<br><br>&gt;&gt; I am getting an error when I look at the MPICH2 configurable settings ...<br><br> This is a known bug. Due to limited developer bandwidth we haven&#39;t been able to address this issue yet.<br>

<div class="im"><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt;<a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a>&gt;<br>To: &quot;Jayesh Krishna&quot; &lt;<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>&gt;<br>
</div>
<div class="im">Sent: Wednesday, November 16, 2011 12:27:01 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br></div>
<div class="im">Alright. I have reinstalled MPICH2 using the method in section 9.4. However, I am not able to connect to the host it seems. I keep receiving this message when trying to execute a program:<br><br><br><br>Credentials for Mike rejected connecting to Mike-PC<br>
<br>Aborting: Unable to connect to Mike-PC<br>Also, I am getting an error when I look at the MPICH2 configurable settings that says that MPICH2 is not installed or that it cannot query the host.<br><br>On Wed, Nov 16, 2011 at 9:35 AM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br>
<br><br>Hi,<br>Looks like MPICH2 was not installed correctly in your system.<br></div>Uninstall your existing version of MPICH2. Please follow the steps in Section 9.4 (Not 9.1 - <a href="http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.4.1-installguide.pdf" target="_blank">http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.4.1-installguide.pdf</a> ) of the installer&#39;s guide to install MPICH2.<br>

<div>
<div></div>
<div class="h5"><br>(PS: I am assuming that you have Win7/Srv2008/...)<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>
To: &quot;Jayesh Krishna&quot; &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt;<br><br><br><br>Sent: Tuesday, November 15, 2011 9:04:57 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br>
<br><br>Yeah it must have been that I got the installation mixed up. I downloaded the windows installer and it finally compiled. So progess has been made as now I am getting this error when trying to run hello.exe:<br><br>
<br><br>Error while connecting to host, No connection could be made because the target m<br><br>achine actively refused it. (10061)<br><br>Connect on sock (host=localhost, port=8676) failed, exhaused all end points<br><br>
Unable to connect to &#39;localhost:8676&#39;,<br><br>sock error: Error = -1<br><br><br>On Tue, Nov 15, 2011 at 5:12 PM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br><br><br>
Hi,<br>There are two ways you can use MPICH2 on Windows+cygwin,<br><br># Download MPICH2 source compile/install it on Cygwin. Use mpicc to compile and use mpiexec (from this installation - NOT the one available with Windows installer) to run your program.<br>
<br># Download MPICH2 Windows installer, install MPICH2 (using installer gui). Use the cygwin/gcc libs provided with the Windows installation to compile your code. Use mpiexec from the Windows installation to run your job.<br>
<br>Looks like you are mixing the approaches.<br><br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>
To: &quot;Jayesh Krishna&quot; &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt;<br><br><br><br>Sent: Tuesday, November 15, 2011 1:03:02 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br>
<br><br>I was using mpicc in order to compile it. Unfortunately I am still not able to compile the code even with the command you gave me. I used:<br><br>gcc -l/mpich_install/include -L/mpich_install/lib hello.c -lmpi<br>
<br>I still received the same error. Did I install it incorrectly maybe?<br><br>On Tue, Nov 15, 2011 at 12:42 PM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br><br><br>Hi,<br>
How were you compiling your code before ?<br>A command similar to,<br><br>&quot;gcc -I/cygdrive/c/Progra~1/MPICH2/include -L/cygdrive/c/Progra~1/MPICH2/lib hello.c -o hello.exe -lmpi&quot;<br><br>should work.<br><br><br>Regards,<br>
jayesh<br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>To: &quot;Jayesh Krishna&quot; &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt;<br>
<br><br><br>Sent: Tuesday, November 15, 2011 12:18:43 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br>Alright. Well I tried it and for some reason it is not able to see the library.<br>
I used the command:<br>gcc -g hello.c -L\mpich_install\lib -lmpi<br><br>It ended up giving me an error saying:<br>fatal error: mpi.h: No such file or directory<br><br>On Tue, Nov 15, 2011 at 10:32 AM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br>
<br><br>Hi,<br>Try using gcc (usual gcc stuff: specify include dirs using &quot;-I&quot;, lib dirs using &quot;-L&quot;) to compile your code and link it with &quot;-lmpi&quot; .<br><br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>
From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>To: &quot;Jayesh Krishna&quot; &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt;<br><br>
<br><br>Sent: Tuesday, November 15, 2011 10:16:00 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br>What would be the correct command to use in cygwin in order to compile the code? Just want to make sure that I actually compiled it correctly.<br>
<br><br>On Tue, Nov 15, 2011 at 10:10 AM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br><br><br>Hi,<br>I just tried compiling your code with cygwin gcc (3.4.4) + MPICH2 1.4.1p1 gcc libs and it worked for me (No seg fault, gives the expected output).<br>
Make sure that you are using the correct header files and libraries (MPICH2 libs and headers) when you compile your code.<br><br>Regards,<br><br>Jayesh<br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>
<br><br><br>To: &quot;Jayesh Krishna&quot; &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt;<br>Sent: Tuesday, November 15, 2011 9:53:32 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br>
<br>Ah sorry. I forgot to include the p1 at the end of it. I am using mpich2 1.4.1p1<br><br><br>On Tue, Nov 15, 2011 at 9:44 AM, Jayesh Krishna &lt; <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> &gt; wrote:<br>
<br><br>Did you try the latest stable release (1.4.1p1)?<br><br>-Jayesh<br><br><br>----- Original Message -----<br>From: &quot;Michael Warthon&quot; &lt; <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> &gt;<br>
To: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>Sent: Monday, November 14, 2011 7:54:43 PM<br>Subject: [mpich-discuss] Segmentation Fault when running any application.<br><br><br><br>Hello,<br>
<br>I am new to MPI and I went and installed mpich2 1.4.1 onto a windows system that is being used through cygwin. I have compiled the code that simply prints the process and rank as shown below.<br><br><br><br>#include &lt;stdio.h&gt;<br>
#include &lt;mpi.h&gt;<br><br>int main( int argc, char *argv[]) {<br><br>int numprocs, rank, namelen;<br>char processor_name[MPI_MAX_PROCESSOR_NAME];<br><br>MPI_Init(&amp;argc, &amp;argv);<br>MPI_Comm_size(MPI_COMM_WORLD, &amp;numprocs);<br>
MPI_Comm_rank(MPI_COMM_WORLD, &amp;rank);<br>MPI_Get_processor_name(processor_name, &amp;namelen);<br><br>printf( &quot;Process %d on %s out of %d\n&quot; , rank, processor_name, numprocs);<br><br>MPI_Finalize();<br>}<br>
<br>Nothing too complicated. However, I still receive an error from the command line in cygwin that simply reads segmentation fault: (core dumped). The command I used was:<br><br>mpiexec -n 1 a.exe<br><br>No matter what executable I try to run, I still receive the same error. Any help regarding this would be greatly appreciated!<br>
_______________________________________________<br>mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>To manage subscription options or unsubscribe:<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><br><br><br><br><br></div></div></blockquote></div><br>