<div>Alright I entered that command in and the result was this:</div>
<div> </div>
<div>/tmp/cc0GoDvV.o:hello.c:(.text+0x1f): undefined reference to `_MPI_Init'<br>/tmp/cc0GoDvV.o:hello.c:(.text+0x36): undefined reference to `_MPI_Comm_size'<br>/tmp/cc0GoDvV.o:hello.c:(.text+0x4d): undefined reference to `_MPI_Comm_rank'<br>
/tmp/cc0GoDvV.o:hello.c:(.text+0x64): undefined reference to `_MPI_Get_processor<br>_name'<br>/tmp/cc0GoDvV.o:hello.c:(.text+0x93): undefined reference to `_MPI_Finalize'<br>collect2: ld returned 1 exit status<br>
<br></div>
<div class="gmail_quote">On Fri, Nov 18, 2011 at 11:52 AM, Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br> Try,<br><br>$ gcc -I "/cygdrive/c/Program Files/MPICH2/include" -L "/cygdrive/c/Program Files/MPICH2/lib" hello.c -o hello.exe -lmpi<br>
<div class="im"><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" <<a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a>><br>To: "Jayesh Krishna" <<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>><br>
Cc: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br></div>
<div>
<div></div>
<div class="h5">Sent: Friday, November 18, 2011 11:19:11 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br>If the program I am trying to compile will work with mpiexec even with the error present, then I will not install MPICH2 from source. Currently the command I am entering is:<br>
<br>$ gcc hello.c -o hello.exe -I "/cygdrive/c/Program Files/MPICH2/include" -L "/cygdrive/c/Program Files/MPICH2/lib/libmpi.a" -lmpi<br><br>The response I get is:<br><br>/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find<br>
-lmpi<br>collect2: ld returned 1 exit status<br><br>Is there a verbose option for gcc in order to obtain more information about what is happening?<br><br>On Fri, Nov 18, 2011 at 10:32 AM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br>
<br><br>Hi,<br>If you are not too much concerned about performance you can configure/make/install MPICH2 from source on Cygwin.<br>If you want help with compiling an MPI program with gcc libs please send us the complete command that you used to compile your code (From the error message it looks like you did not specify the path to libmpi.a , you need to specify the path using "-L" option).<br>
<br>(PS: Please provide as much details as possible)<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>
<br>To: "Jose Marques" < <a href="mailto:jmarques@itn.pt">jmarques@itn.pt</a> >, "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>Cc: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<br><br><br>Sent: Thursday, November 17, 2011 2:54:37 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br>Ok well I did a bit of searching on past discussions and it looks like the error will come up but won't affect how the program will run. However, it seems that I keep getting out of one problem and running into another. When I tried to compile the hello.c file again I got this error:<br>
<br>/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find<br>-lmpi<br>collect2: ld returned 1 exit status<br><br>I want to make sure that other executable will work for mpiexec so I would like to be able to compile hello.c and then test to see if it will run or not.<br>
<br><br>On Thu, Nov 17, 2011 at 12:38 PM, Michael Warthon < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> > wrote:<br><br><br>Thank you. Unfortunately I still get the same error regarding the closing of the left context socket.<br>
<br><br><br><br><br>On Thu, Nov 17, 2011 at 2:28 PM, Jose Marques < <a href="mailto:jmarques@itn.pt">jmarques@itn.pt</a> > wrote:<br><br><br><br>Michael,<br><br>There's a good set of instructions in <a href="http://www.petri.co.il/disable-uac-in-windows-7.htm" target="_blank">http://www.petri.co.il/disable-uac-in-windows-7.htm</a><br>
<br>Rds,<br>Jose<br><br><br><br><br>On 17-11-2011 6:12, Michael Warthon wrote:<br><br><br><br>How do I go about turning that off?<br><br><br><br>On Nov 17, 2011, at 2:05 PM, Jose Marques < <a href="mailto:jmarques@itn.pt">jmarques@itn.pt</a> > wrote:<br>
<br><br><br><br>Michael,<br><br>Did you switch off User Account Control in Windows 7 ? I think I had the same probs and solved them taking care of UAC.<br><br>Jose<br><br>On 17-11-2011 5:35, Michael Warthon wrote:<br><br>
I am still getting the same error even after reinstalling SMPD. The MPICH2 that I have installed is the 64-bit version. My computer has windows 7, is a 64-bit operating system, and has an intel core i5 CPU processor. The installer I used mpich2-1.4.1p1-win-x86-64.msi is the correct one right?<br>
<br><br>On Thu, Nov 17, 2011 at 12:22 PM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br><br><br>Hi,<br>The error message does not appear with the "-verbose" option (The launch mechanism with a "-verbose" option is different though).<br>
I think that the issue is still that MPICH2 was not installed correctly in your system (I verified that 1.4.1p1 works correctly - without error msgs - on our Srv2008). Please follow the steps below and let us know if it works for you,<br>
<br># Right-click on the command prompt icon and select "Run as administrator" to open an admin command prompt<br># From the admin command prompt, uninstall SMPD using the "-uninstall" option (Type "smpd -uninstall")<br>
# From the admin command prompt, install SMPD using the "-install" option (Type "smpd -install")<br># Try running mpiexec from the admin command prompt (Type "mpiexec -n 2 hostname")<br># Try running mpiexec from a normal command prompt (Type "mpiexec -n 2 hostname")<br>
<br>Let us know the results.<br><br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>
Cc: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br><br><br>Sent: Thursday, November 17, 2011 10:10:28 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br>
<br>Alright. Attached is the text file with the complete message from the command: "c:\Program Files\MPICH2\bin\mpiexec" -verbose -n 2 hostname<br><br>I tried the other command and for some reason I am actually able to run the program even when the errors occur. This is the response I got when running the command:<br>
<br>C:\Users\Mike>"c:\Program Files\MPICH2\bin\mpiexec" -n 2 "C:\Program Files\MPICH<br>2\examples\cpi.exe"<br>error closing the left context socket: Error = -1<br>Enter the number of intervals: (0 quits) 100<br>
pi is approximately 3.1416009869231241, Error is 0.0000083333333309<br>wall clock time = 0.000541<br>Enter the number of intervals: (0 quits) 10<br>pi is approximately 3.1424259850010983, Error is 0.0008333314113051<br>wall clock time = 0.000047<br>
Enter the number of intervals: (0 quits) 0<br>op_read error on left context: Error = -1<br>unable to read the cmd header on the left context, Error = -1<br>.<br>Error posting readv, An existing connection was forcibly closed by the remote ho<br>
st.(10054)<br><br><br>On Thu, Nov 17, 2011 at 9:56 AM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br><br><br>Hi,<br>Yes, please give us the output of the command with "-verbose" turned on.<br>
And for these tests, run mpiexec with the complete path ("c:\Program Files\MPICH2\bin\mpiexec" -verbose -n 2 hostname). Do you get the same error message when executing cpi ("c:\Program Files\MPICH2\bin\mpiexec" -n 2 "C:\Program Files\MPICH2\examples\cpi.exe")?<br>
<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>
Cc: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br><br><br><br>Sent: Thursday, November 17, 2011 9:42:42 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br>
<br><br>For each command, this is the entire response that I get:<br><br><br>C:\Users\Mike>mpiexec -validate<br>SUCCESS<br><br>C:\Users\Mike>mpiexec -n 2 hostname<br>error closing the left context socket: Error = -1<br>
<br>Mike-PC<br>Mike-PC<br>error closing the left context socket: Error = -1<br><br>C:\Users\Mike><br><br><br>Did you want me to use the verbose option?<br><br>On Thu, Nov 17, 2011 at 9:21 AM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br>
<br><br>Hi,<br>Please copy-paste the command and the response (the complete message) in your email.<br>Are you able to validate the registered username/password (Type "mpiexec -validate" and it should return "SUCCESS")?<br>
<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>
<br><br><br>Cc: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>Sent: Thursday, November 17, 2011 7:50:25 AM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br>
<br>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><br>On Wed, Nov 16, 2011 at 2:21 PM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br><br><br>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 "smpd -status" to check if smpd is running)<br>
<br>2. Run a simple non-MPI program like hostname from the command prompt using mpiexec (Type "mpiexec -n 2 hostname" ). When prompted for username/password give a valid Windows username/password.<br>If mpiexec gives you an error, type "mpiexec -remove" to remove the existing registered username/password and then type "mpiexec -register" 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>>> 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't been able to address this issue yet.<br>
<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>
<br>Sent: Wednesday, November 16, 2011 12:27:01 PM<br>Subject: Re: [mpich-discuss] Segmentation Fault when running any application.<br><br><br><br>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 < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br><br><br>Hi,<br>Looks like MPICH2 was not installed correctly in your system.<br>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's guide to install MPICH2.<br>
<br><br><br><br>(PS: I am assuming that you have Win7/Srv2008/...)<br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>
To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><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 'localhost:8676',<br><br>sock error: Error = -1<br><br><br>On Tue, Nov 15, 2011 at 5:12 PM, Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > 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: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>
To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><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 < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br><br><br>Hi,<br>
How were you compiling your code before ?<br>A command similar to,<br><br>"gcc -I/cygdrive/c/Progra~1/MPICH2/include -L/cygdrive/c/Progra~1/MPICH2/lib hello.c -o hello.exe -lmpi"<br><br>should work.<br><br><br>Regards,<br>
jayesh<br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><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 < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br>
<br><br>Hi,<br>Try using gcc (usual gcc stuff: specify include dirs using "-I", lib dirs using "-L") to compile your code and link it with "-lmpi" .<br><br><br>Regards,<br>Jayesh<br><br>----- Original Message -----<br>
From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><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 < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > 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: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><br>
<br><br><br>To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><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 < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> > wrote:<br>
<br><br>Did you try the latest stable release (1.4.1p1)?<br><br>-Jayesh<br><br><br>----- Original Message -----<br>From: "Michael Warthon" < <a href="mailto:michael.warthon@upr.edu">michael.warthon@upr.edu</a> ><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 <stdio.h><br>
#include <mpi.h><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(&argc, &argv);<br>MPI_Comm_size(MPI_COMM_WORLD, &numprocs);<br>
MPI_Comm_rank(MPI_COMM_WORLD, &rank);<br>MPI_Get_processor_name(processor_name, &namelen);<br><br>printf( "Process %d on %s out of %d\n" , 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><br><br><br><br>_______________________________________________<br>mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a> To manage subscription options or unsubscribe: <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>Dr. Jose G. Marques<br>Reactor Manager<br>Instituto Tecnologico e Nuclear phone: <a href="tel:%28%2B351%29%20219%20946%20115" value="+351219946115">(+351) 219 946 115</a> Estrada Nacional 10 fax: <a href="tel:%28%2B351%29%20219%20941%20039" value="+351219941039">(+351) 219 941 039</a> P-2686-953 Sacavem, Portugal<br>
--<br>Dr. Jose G. Marques<br>Reactor Manager<br>Instituto Tecnologico e Nuclear phone: <a href="tel:%28%2B351%29%20219%20946%20115" value="+351219946115">(+351) 219 946 115</a> Estrada Nacional 10 fax: <a href="tel:%28%2B351%29%20219%20941%20039" value="+351219941039">(+351) 219 941 039</a> P-2686-953 Sacavem, Portugal<br>
<br><br></div></div></blockquote></div><br>