[mpich-discuss] Segmentation Fault when running any application.
Michael Warthon
michael.warthon at upr.edu
Mon Nov 21 17:30:51 CST 2011
No. When I compile and run an OpenMP-only program, the result I get is
nothing happening. There are no error messages except for the error
concerning the left socket but that error does not seem to stop programs
from running correctly. I have looked up a past thread that also dealt with
that problem and saw that it did not interfere with the performance of the
program.
On Mon, Nov 21, 2011 at 5:22 PM, Rajeev Thakur <thakur at mcs.anl.gov> wrote:
> Can you run an OpenMP-only program (no MPI) on that machine and see if it
> runs correctly?
>
> On Nov 21, 2011, at 2:17 PM, Michael Warthon wrote:
>
> > Alright I replaced MPI_Init with MPI_Init_thread function. I compile the
> program again and no errors occur. However, when I run the program nothing
> happens. Below is the code that uses threading and MPI. This is just a
> basic hello world program to see if the code actually works or not. I have
> already found another machine in order to create, compile and run my code.
> That machine has the mpicc command and on that machine there are no
> problems when running the code.
> > #include
> >
> > <stdio.h>
> > #include <stdlib.h>
> > #include <math.h>
> > #include <omp.h>
> > #include <mpi.h>
> > int
> >
> > main(int argc,char *argv[])
> > {
> > //MPI variables
> > int numprocs, rank, namelen, provided;
> > char processor_name[MPI_MAX_PROCESSOR_NAME];
> > //OpenMP variables
> > int nthreads, tid;
> >
> > //MPI_Init(&argc, &argv);
> > MPI_Init_thread(0,0, MPI_THREAD_FUNNELED, &provided);
> > 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);
> > fflush(stdout);
> > omp_set_num_threads(4);
> > #pragma omp parallel private(tid) shared(nthreads)
> > {
> > // Obtain and print thread id
> > tid = omp_get_thread_num();
> > printf("Hello World from thread = %d for process %d\n", tid,rank);
> > fflush(stdout);
> > // Only master thread does this
> > if (tid == 0)
> > {
> > nthreads = omp_get_num_threads();
> > printf("Number of threads = %d for process %d\n", nthreads,rank);
> > fflush(stdout);
> > }
> > }
> > //*/
> > MPI_Finalize();
> > }
> >
> >
> > On Mon, Nov 21, 2011 at 11:17 AM, Anthony Chan <chan at mcs.anl.gov> wrote:
> >
> > If your OpenMP contructs do not make any MPI call
> > (only the main thread is making MPI calls),
> > MPI_THREAD_FUNNELED should be used instead, e.g.
> >
> > http://www.mpi-forum.org/docs/mpi-20-html/node165.htm
> >
> > A.Chan
> >
> > ----- Original Message -----
> > > Hi,
> > > Make sure that you call MPI_Init_thread(..,MPI_THREAD_MULTIPLE,..) in
> > > your code instead of MPI_Init().
> > >
> > > -Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" <michael.warthon at upr.edu>
> > > To: "Jayesh Krishna" <jayesh at mcs.anl.gov>
> > > Cc: mpich-discuss at mcs.anl.gov
> > > Sent: Sunday, November 20, 2011 11:34:43 AM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > > One more question concerning this whole setup. If I wanted to compile
> > > an MPI program that used OpenMP, how would I go about doing that? I
> > > have tried to compile it but just adding the -fopenmp flag but when I
> > > tried to run the program using mpiexec the program did nothing. There
> > > was no compilation error or anything. When I commented out the lines
> > > concerning OpenMP, the program ran fine.
> > >
> > >
> > > On Fri, Nov 18, 2011 at 3:23 PM, Jayesh Krishna < jayesh at mcs.anl.gov >
> > > wrote:
> > >
> > >
> > > Glad to know it worked for you.
> > > The error messages are still annoying though. There are some known
> > > bugs with SMPD that might give these error messages (as you have
> > > already found) but unfortunately I haven't been able to recreate it
> > > here (Also we don't have dev resources to pursue this SMPD bug. So
> > > unfortunately you are stuck with the bug if you use SMPD.).
> > >
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > >
> > > Sent: Friday, November 18, 2011 2:36:59 PM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > > Oh my god! It finally worked! Yes, apparently it was that I was
> > > compiling it for the 64-bit version of MPICH2. I ran the code and it
> > > worked fine even though it was giving me the error concerning the left
> > > socket in mpiexec. Since it is working correctly, I think everything
> > > is okay now. Thank you very much for helping me out these past couple
> > > of days. I greatly appreciate it!
> > >
> > >
> > > On Fri, Nov 18, 2011 at 2:11 PM, Jayesh Krishna < jayesh at mcs.anl.gov >
> > > wrote:
> > >
> > >
> > > Hi,
> > > Do you have a 64-bit version of MPICH2 installed in your system ? If
> > > so, you need to create 64-bit executable with gcc (Use "-m64" flag of
> > > gcc OR use mingw compilers that accept "-m64" option) .
> > >
> > > (PS: On 64-bit systems I use mingw compilers,
> > > x86_64-w64-mingw32-g++ -I"/cygdrive/c/Program Files/MPICH2/include"
> > > -L"/cygdrive/c/Program Files/MPICH2/lib" hellow.c -lmpi
> > >
> > > )
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > >
> > > Sent: Friday, November 18, 2011 12:04:05 PM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > >
> > > Alright I entered that command in and the result was this:
> > >
> > > /tmp/cc0GoDvV.o:hello.c:(.text+0x1f): undefined reference to
> > > `_MPI_Init'
> > > /tmp/cc0GoDvV.o:hello.c:(.text+0x36): undefined reference to
> > > `_MPI_Comm_size'
> > > /tmp/cc0GoDvV.o:hello.c:(.text+0x4d): undefined reference to
> > > `_MPI_Comm_rank'
> > > /tmp/cc0GoDvV.o:hello.c:(.text+0x64): undefined reference to
> > > `_MPI_Get_processor
> > > _name'
> > > /tmp/cc0GoDvV.o:hello.c:(.text+0x93): undefined reference to
> > > `_MPI_Finalize'
> > > collect2: ld returned 1 exit status
> > >
> > >
> > > On Fri, Nov 18, 2011 at 11:52 AM, Jayesh Krishna < jayesh at mcs.anl.gov
> > > > wrote:
> > >
> > >
> > > Hi,
> > > Try,
> > >
> > > $ gcc -I "/cygdrive/c/Program Files/MPICH2/include" -L
> > > "/cygdrive/c/Program Files/MPICH2/lib" hello.c -o hello.exe -lmpi
> > >
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > >
> > > Sent: Friday, November 18, 2011 11:19:11 AM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > >
> > > 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:
> > >
> > > $ gcc hello.c -o hello.exe -I "/cygdrive/c/Program
> > > Files/MPICH2/include" -L "/cygdrive/c/Program
> > > Files/MPICH2/lib/libmpi.a" -lmpi
> > >
> > > The response I get is:
> > >
> > > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld:
> > > cannot find
> > > -lmpi
> > > collect2: ld returned 1 exit status
> > >
> > > Is there a verbose option for gcc in order to obtain more information
> > > about what is happening?
> > >
> > > On Fri, Nov 18, 2011 at 10:32 AM, Jayesh Krishna < jayesh at mcs.anl.gov
> > > > wrote:
> > >
> > >
> > > Hi,
> > > If you are not too much concerned about performance you can
> > > configure/make/install MPICH2 from source on Cygwin.
> > > 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).
> > >
> > > (PS: Please provide as much details as possible)
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > >
> > > To: "Jose Marques" < jmarques at itn.pt >, "Jayesh Krishna" <
> > > jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > >
> > > Sent: Thursday, November 17, 2011 2:54:37 PM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > >
> > > 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:
> > >
> > > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld:
> > > cannot find
> > > -lmpi
> > > collect2: ld returned 1 exit status
> > >
> > > 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.
> > >
> > >
> > > On Thu, Nov 17, 2011 at 12:38 PM, Michael Warthon <
> > > michael.warthon at upr.edu > wrote:
> > >
> > >
> > > Thank you. Unfortunately I still get the same error regarding the
> > > closing of the left context socket.
> > >
> > >
> > >
> > >
> > >
> > > On Thu, Nov 17, 2011 at 2:28 PM, Jose Marques < jmarques at itn.pt >
> > > wrote:
> > >
> > >
> > >
> > > Michael,
> > >
> > > There's a good set of instructions in
> > > http://www.petri.co.il/disable-uac-in-windows-7.htm
> > >
> > > Rds,
> > > Jose
> > >
> > >
> > >
> > >
> > > On 17-11-2011 6:12, Michael Warthon wrote:
> > >
> > >
> > >
> > > How do I go about turning that off?
> > >
> > >
> > >
> > > On Nov 17, 2011, at 2:05 PM, Jose Marques < jmarques at itn.pt > wrote:
> > >
> > >
> > >
> > >
> > > Michael,
> > >
> > > Did you switch off User Account Control in Windows 7 ? I think I had
> > > the same probs and solved them taking care of UAC.
> > >
> > > Jose
> > >
> > > On 17-11-2011 5:35, Michael Warthon wrote:
> > >
> > > 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?
> > >
> > >
> > > On Thu, Nov 17, 2011 at 12:22 PM, Jayesh Krishna < jayesh at mcs.anl.gov
> > > > wrote:
> > >
> > >
> > > Hi,
> > > The error message does not appear with the "-verbose" option (The
> > > launch mechanism with a "-verbose" option is different though).
> > > 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,
> > >
> > > # Right-click on the command prompt icon and select "Run as
> > > administrator" to open an admin command prompt
> > > # From the admin command prompt, uninstall SMPD using the "-uninstall"
> > > option (Type "smpd -uninstall")
> > > # From the admin command prompt, install SMPD using the "-install"
> > > option (Type "smpd -install")
> > > # Try running mpiexec from the admin command prompt (Type "mpiexec -n
> > > 2 hostname")
> > > # Try running mpiexec from a normal command prompt (Type "mpiexec -n 2
> > > hostname")
> > >
> > > Let us know the results.
> > >
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > > Sent: Thursday, November 17, 2011 10:10:28 AM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > >
> > > Alright. Attached is the text file with the complete message from the
> > > command: "c:\Program Files\MPICH2\bin\mpiexec" -verbose -n 2 hostname
> > >
> > > 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:
> > >
> > > C:\Users\Mike>"c:\Program Files\MPICH2\bin\mpiexec" -n 2 "C:\Program
> > > Files\MPICH
> > > 2\examples\cpi.exe"
> > > error closing the left context socket: Error = -1
> > > Enter the number of intervals: (0 quits) 100
> > > pi is approximately 3.1416009869231241, Error is 0.0000083333333309
> > > wall clock time = 0.000541
> > > Enter the number of intervals: (0 quits) 10
> > > pi is approximately 3.1424259850010983, Error is 0.0008333314113051
> > > wall clock time = 0.000047
> > > Enter the number of intervals: (0 quits) 0
> > > op_read error on left context: Error = -1
> > > unable to read the cmd header on the left context, Error = -1
> > > .
> > > Error posting readv, An existing connection was forcibly closed by the
> > > remote ho
> > > st.(10054)
> > >
> > >
> > > On Thu, Nov 17, 2011 at 9:56 AM, Jayesh Krishna < jayesh at mcs.anl.gov >
> > > wrote:
> > >
> > >
> > > Hi,
> > > Yes, please give us the output of the command with "-verbose" turned
> > > on.
> > > 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")?
> > >
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > > Cc: mpich-discuss at mcs.anl.gov
> > >
> > >
> > >
> > > Sent: Thursday, November 17, 2011 9:42:42 AM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > >
> > > For each command, this is the entire response that I get:
> > >
> > >
> > > C:\Users\Mike>mpiexec -validate
> > > SUCCESS
> > >
> > > C:\Users\Mike>mpiexec -n 2 hostname
> > > error closing the left context socket: Error = -1
> > >
> > > Mike-PC
> > > Mike-PC
> > > error closing the left context socket: Error = -1
> > >
> > > C:\Users\Mike>
> > >
> > >
> > > Did you want me to use the verbose option?
> > >
> > > On Thu, Nov 17, 2011 at 9:21 AM, Jayesh Krishna < jayesh at mcs.anl.gov >
> > > wrote:
> > >
> > >
> > > Hi,
> > > Please copy-paste the command and the response (the complete message)
> > > in your email.
> > > Are you able to validate the registered username/password (Type
> > > "mpiexec -validate" and it should return "SUCCESS")?
> > >
> > >
> > > Regards,
> > > Jayesh
> > >
> > > ----- Original Message -----
> > > From: "Michael Warthon" < michael.warthon at upr.edu >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >
> > >
> > >
> > >
> > > Cc: mpich-discuss at mcs.anl.gov
> > > Sent: Thursday, November 17, 2011 7:50:25 AM
> > > Subject: Re: [mpich-discuss] Segmentation Fault when running any
> > > application.
> > >
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> > > --
> > > Dr. Jose G. Marques
> > > Reactor Manager
> > > Instituto Tecnologico e Nuclear phone: (+351) 219 946 115 Estrada
> > > Nacional 10 fax: (+351) 219 941 039 P-2686-953 Sacavem, Portugal
> > > --
> > > Dr. Jose G. Marques
> > > Reactor Manager
> > > Instituto Tecnologico e Nuclear phone: (+351) 219 946 115 Estrada
> > > Nacional 10 fax: (+351) 219 941 039 P-2686-953 Sacavem, Portugal
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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/20111121/9553aab3/attachment-0001.htm>
More information about the mpich-discuss
mailing list