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

Michael Warthon michael.warthon at upr.edu
Thu Nov 17 07:50:25 CST 2011


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:

error closing the left context socket: Error = -1

On Wed, Nov 16, 2011 at 2:21 PM, Jayesh Krishna <jayesh at mcs.anl.gov> wrote:

> Hi,
>
> 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)
>
> 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.
>   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.
>
> 3. Run the sample MPI program, cpi.exe, provided with MPICH2 (mpiexec -n 2
> C:\Progra~1\MPICH2\examples\cpi.exe)
>
> >> I am getting an error when I look at the MPICH2 configurable settings
> ...
>
>  This is a known bug. Due to limited developer bandwidth we haven't been
> able to address this issue yet.
>
> Regards,
> Jayesh
>
> ----- Original Message -----
> From: "Michael Warthon" <michael.warthon at upr.edu>
> To: "Jayesh Krishna" <jayesh at mcs.anl.gov>
> Sent: Wednesday, November 16, 2011 12:27:01 PM
> Subject: Re: [mpich-discuss] Segmentation Fault when running any
> application.
>
>
> 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:
>
>
>
> Credentials for Mike rejected connecting to Mike-PC
>
> Aborting: Unable to connect to Mike-PC
> 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.
>
> On Wed, Nov 16, 2011 at 9:35 AM, Jayesh Krishna < jayesh at mcs.anl.gov >
> wrote:
>
>
> 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
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20111117/b134d8f8/attachment-0001.htm>


More information about the mpich-discuss mailing list