[mpich-discuss] Segmentation Fault when running any application.

Jayesh Krishna jayesh at mcs.anl.gov
Wed Nov 16 09:35:27 CST 2011


Hi,
 Looks like MPICH2 was not installed correctly in your system. 
 Uninstall your existing version of MPICH2. Please follow the steps in Section 9.4 (Not 9.1 - http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.4.1-installguide.pdf) of the installer's guide to install MPICH2.

(PS: I am assuming that you have Win7/Srv2008/...)
Regards,
Jayesh

----- Original Message -----
From: "Michael Warthon" <michael.warthon at upr.edu>
To: "Jayesh Krishna" <jayesh at mcs.anl.gov>
Sent: Tuesday, November 15, 2011 9:04:57 PM
Subject: Re: [mpich-discuss] Segmentation Fault when running any application.


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: 



Error while connecting to host, No connection could be made because the target m 

achine actively refused it. (10061) 

Connect on sock (host=localhost, port=8676) failed, exhaused all end points 

Unable to connect to 'localhost:8676', 

sock error: Error = -1 


On Tue, Nov 15, 2011 at 5:12 PM, Jayesh Krishna < jayesh at mcs.anl.gov > wrote: 


Hi, 
There are two ways you can use MPICH2 on Windows+cygwin, 

# 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. 

# 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. 

Looks like you are mixing the approaches. 


Regards, 
Jayesh 

----- Original Message ----- 
From: "Michael Warthon" < michael.warthon at upr.edu > 
To: "Jayesh Krishna" < jayesh at mcs.anl.gov > 



Sent: Tuesday, November 15, 2011 1:03:02 PM 
Subject: Re: [mpich-discuss] Segmentation Fault when running any application. 


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: 

gcc -l/mpich_install/include -L/mpich_install/lib hello.c -lmpi 

I still received the same error. Did I install it incorrectly maybe? 

On Tue, Nov 15, 2011 at 12:42 PM, Jayesh Krishna < jayesh at mcs.anl.gov > wrote: 


Hi, 
How were you compiling your code before ? 
A command similar to, 

"gcc -I/cygdrive/c/Progra~1/MPICH2/include -L/cygdrive/c/Progra~1/MPICH2/lib hello.c -o hello.exe -lmpi" 

should work. 


Regards, 
jayesh 

----- Original Message ----- 
From: "Michael Warthon" < michael.warthon at upr.edu > 
To: "Jayesh Krishna" < jayesh at mcs.anl.gov > 



Sent: Tuesday, November 15, 2011 12:18:43 PM 
Subject: Re: [mpich-discuss] Segmentation Fault when running any application. 


Alright. Well I tried it and for some reason it is not able to see the library. 
I used the command: 
gcc -g hello.c -L\mpich_install\lib -lmpi 

It ended up giving me an error saying: 
fatal error: mpi.h: No such file or directory 

On Tue, Nov 15, 2011 at 10:32 AM, Jayesh Krishna < jayesh at mcs.anl.gov > wrote: 


Hi, 
Try using gcc (usual gcc stuff: specify include dirs using "-I", lib dirs using "-L") to compile your code and link it with "-lmpi" . 


Regards, 
Jayesh 

----- Original Message ----- 
From: "Michael Warthon" < michael.warthon at upr.edu > 
To: "Jayesh Krishna" < jayesh at mcs.anl.gov > 



Sent: Tuesday, November 15, 2011 10:16:00 AM 
Subject: Re: [mpich-discuss] Segmentation Fault when running any application. 


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. 


On Tue, Nov 15, 2011 at 10:10 AM, Jayesh Krishna < jayesh at mcs.anl.gov > wrote: 


Hi, 
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). 
Make sure that you are using the correct header files and libraries (MPICH2 libs and headers) when you compile your code. 

Regards, 

Jayesh 

----- Original Message ----- 
From: "Michael Warthon" < michael.warthon at upr.edu > 



To: "Jayesh Krishna" < jayesh at mcs.anl.gov > 
Sent: Tuesday, November 15, 2011 9:53:32 AM 
Subject: Re: [mpich-discuss] Segmentation Fault when running any application. 

Ah sorry. I forgot to include the p1 at the end of it. I am using mpich2 1.4.1p1 


On Tue, Nov 15, 2011 at 9:44 AM, Jayesh Krishna < jayesh at mcs.anl.gov > wrote: 


Did you try the latest stable release (1.4.1p1)? 

-Jayesh 


----- Original Message ----- 
From: "Michael Warthon" < michael.warthon at upr.edu > 
To: mpich-discuss at mcs.anl.gov 
Sent: Monday, November 14, 2011 7:54:43 PM 
Subject: [mpich-discuss] Segmentation Fault when running any application. 



Hello, 

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. 



#include <stdio.h> 
#include <mpi.h> 

int main( int argc, char *argv[]) { 

int numprocs, rank, namelen; 
char processor_name[MPI_MAX_PROCESSOR_NAME]; 

MPI_Init(&argc, &argv); 
MPI_Comm_size(MPI_COMM_WORLD, &numprocs); 
MPI_Comm_rank(MPI_COMM_WORLD, &rank); 
MPI_Get_processor_name(processor_name, &namelen); 

printf( "Process %d on %s out of %d\n" , rank, processor_name, numprocs); 

MPI_Finalize(); 
} 

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: 

mpiexec -n 1 a.exe 

No matter what executable I try to run, I still receive the same error. Any help regarding this would be greatly appreciated! 
_______________________________________________ 
mpich-discuss mailing list mpich-discuss at mcs.anl.gov 
To manage subscription options or unsubscribe: 
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss 







More information about the mpich-discuss mailing list