<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Hi,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Sure. After changing the calling convention to default in Intel Compiler, I successfully linked with fmpich2.lib. But again, it runs fine when the string length is passed at the end of argument list, and it crashes when the string length is passed after the string pointer.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Probably, more MPICH2 FORTRAN libraries are needed to be provided.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Linfa<BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jayesh Krishna <jayesh@mcs.anl.gov><BR>To: trymelz trymelz <trymelz@yahoo.com><BR>Cc: mpich-discuss@mcs.anl.gov<BR>Sent: Thursday, March 20, 2008 2:08:46 PM<BR>Subject: RE: [mpich-discuss] exit code -1073741819<BR><BR>
<STYLE type=text/css>DIV { MARGIN:0px;} </STYLE>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=655150819-20032008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=655150819-20032008> Can you also try compiling your program with fmpich2.lib ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=655150819-20032008></SPAN><FONT face=Arial><FONT color=#0000ff><FONT size=2>R<SPAN class=655150819-20032008>egards,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN class=655150819-20032008></SPAN></FONT></FONT></FONT><SPAN class=655150819-20032008></SPAN><FONT face=Arial><FONT color=#0000ff><FONT size=2>J<SPAN class=655150819-20032008>ayesh</SPAN></FONT></FONT></FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> trymelz trymelz [mailto:trymelz@yahoo.com] <BR><B>Sent:</B> Thursday, March 20, 2008 2:06 PM<BR><B>To:</B> Jayesh Krishna; mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> Re: [mpich-discuss] exit code -1073741819<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#ff0000 size=2>
<P><STRONG><FONT color=#000000>Hi </FONT></STRONG></P>
<P><STRONG><FONT color=#000000></FONT></STRONG> </P>
<P><FONT face=Arial color=#0000ff>I have no problem to compile & run the sample fpi.f using fmpich2s.lib. Actually, I have identified the culprit: MPI_SEND/RECV work find with integer, but have problem with string.</FONT></P>
<P><FONT face=Arial color=#0000ff></FONT> </P>
<P><FONT face=Arial color=#0000ff>The main reason I beleive is that, in Fortran, different compiler treats the string arguments differently: either add the string length as a invisible argument immediately after the string pointer, or the string lengh is added as a invisible arguments at the end of arguments list. So in my understanding MPI_SEND/RECV will have 28 byte of arguments for integer, but 32 byte of arguments for string because the invisible string length argument. </FONT></P>
<P><FONT face=Arial color=#0000ff></FONT> </P>
<P><FONT face=Arial color=#0000ff>It will cause crash if the positions of the invisible string length arguments are different in the .obj file and in fmpich2s.lib. The following program dimenstrate this</FONT></P>
<P><FONT face=Arial color=#0000ff></FONT></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2></FONT></B> </P>
<P><B><FONT color=#0000ff size=2>program</B></FONT><FONT size=2> main</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>implicit none</P></B></FONT><FONT color=#008000 size=2>
<P>#include <mpif.h></P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>integer</B></FONT><FONT size=2> status(MPI_STATUS_SIZE)</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>character</B></FONT><FONT size=2> * 15 pcomand</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>integer</B></FONT><FONT size=2> MYID,mpimodbg,ierr</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2>ierr=MPI_SUCCESS</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_INIT(ierr)</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_COMM_RANK( MPI_COMM_WORLD, MYID, ierr )</P>
<P></P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>if</B></FONT><FONT size=2>(MYID .eq. 1)</FONT><B><FONT color=#0000ff size=2>then</P></B></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2>mpimodbg=99</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2>pcomand='hello world'</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_SEND(mpimodbg,1,MPI_INTEGER,0</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT color=#ffffff size=2>*</FONT><FONT size=2> ,11,MPI_COMM_WORLD,ierr) </P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>write</B></FONT><FONT size=2>(*,*)'node',MYID,pcomand,mpimodbg</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_SEND(pcomand,15,MPI_CHARACTER,0</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT color=#ffffff size=2>*</FONT><FONT size=2> ,11,MPI_COMM_WORLD,ierr) </P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>write</B></FONT><FONT size=2>(*,*)'node',MYID,pcomand,mpimodbg</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>elseif</B></FONT><FONT size=2>(MYID.eq.0)</FONT><B><FONT color=#0000ff size=2>then</P></B></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2>mpimodbg=0</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2>pcomand='hello'</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_RECV(mpimodbg,1,MPI_INTEGER,1</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT color=#ffffff size=2>*</FONT><FONT size=2> ,11,MPI_COMM_WORLD,status,ierr)</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>write</B></FONT><FONT size=2>(*,*)'node',MYID,pcomand,mpimodbg</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_RECV(pcomand,15,MPI_CHARACTER,1</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT color=#ffffff size=2>*</FONT><FONT size=2> ,11,MPI_COMM_WORLD,status,ierr)</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>write</B></FONT><FONT size=2>(*,*)'node',MYID,pcomand,mpimodbg</P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>endif</B></FONT><FONT size=2> </P>
<P></P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>call</B></FONT><FONT size=2> MPI_FINALIZE(ierr)</P>
<P></P>
<P></P>
<P></P>
<P></P></FONT><FONT color=#ff0000 size=2>
<P></FONT><FONT size=2></FONT><B><FONT color=#0000ff size=2>end</P></B></FONT>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Arial color=#0000ff>When compiled with the string length as a invisible argument immediately after the string pointer (by default in Intel Compiler):</FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Arial color=#0000ff></FONT> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">$ "/cygdrive/c/Program Files/MPICH2/bin/mpiexec.exe" -n 3 ./Debug/fortestargs.exe<BR> node 0 hello 99<BR> node 1 hello world 99<BR>forrtl: severe (157): Program Exception - access violation<BR>Image PC Routine Line Source<BR>fmpich2s.dll 1000507F
Unknown Unknown Unknown<BR>fortestargs.exe 004A783D Unknown Unknown Unknown<BR>fortestargs.exe 0044AA53 Unknown Unknown Unknown<BR>fortestargs.exe 0044A81D Unknown Unknown Unknown<BR>kernel32.dll 7C816FD7 Unknown Unknown Unknown<BR>forrtl: severe (157): Program Exception - access violation<BR>Image
PC Routine Line Source<BR>fmpich2s.dll 1000492B Unknown Unknown Unknown<BR>fortestargs.exe 004A783D Unknown Unknown Unknown<BR>fortestargs.exe 0044AA53 Unknown Unknown Unknown<BR>fortestargs.exe 0044A81D Unknown Unknown Unknown<BR>kernel32.dll 7C816FD7
Unknown Unknown Unknown</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">job aborted:<BR>rank: node: exit code[: error message]<BR>0: abyss: 157: process 0 exited without calling finalize<BR>1: abyss: 157: process 1 exited without calling finalize<BR>2: abyss: 123</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Arial color=#0000ff>When compiled with the string length as a invisible argument at the end of arguments list:</FONT></DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">$ "/cygdrive/c/Program Files/MPICH2/bin/mpiexec.exe" -n 3 ./Debug/fortestargs.exe</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR> node 1 hello world 99<BR> node 1 hello world 99<BR> node 0 hello 99<BR> node 0 hello world 99</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks all for your help.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Linfa<BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jayesh Krishna <jayesh@mcs.anl.gov><BR>To: trymelz trymelz <trymelz@yahoo.com><BR>Cc: mpich-discuss@mcs.anl.gov<BR>Sent: Thursday, March 20, 2008 9:15:21 AM<BR>Subject: RE: [mpich-discuss] exit code -1073741819<BR><BR>
<STYLE type=text/css>DIV { MARGIN:0px;} </STYLE>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=266160114-20032008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=266160114-20032008><FONT face=Arial color=#0000ff size=2> Can you compile & run the sample fpi.f (provided in MPICH2\examples in your installation dir) using fmpich2s.lib ?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=266160114-20032008><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=266160114-20032008><FONT face=Arial color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=266160114-20032008><FONT face=Arial color=#0000ff size=2>Jayesh</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-mpich-discuss@mcs.anl.gov [mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of </B>trymelz trymelz<BR><B>Sent:</B> Wednesday, March 19, 2008 6:30 PM<BR><B>To:</B> mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> Re: [mpich-discuss] exit code -1073741819<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<P>Hi</P>
<P> </P>
<P>The MPI program is too big to be sent. Here is what I got from the debugger</P>
<P> </P>
<P>Before calling PMPI_ISEND:</P>
<P>Symbol Value Type</P>
<P> buf(1) 3 INTEGER(4) <BR> cnt 1 INTEGER(4) <BR> datatype 1275069467 INTEGER(4) <BR> dest 0 INTEGER(4) <BR> tag 24 INTEGER(4) <BR> comm 1140850688 INTEGER(4) <BR> reqs(1) 1243468 INTEGER(4) <BR> ierr 0 INTEGER(4)</P>
<P> </P>
<P>call PMPI_ISEND(buf,cnt,datatype,dest,tag,comm,reqs(1),ierr)<BR></P>
<P>Unhandled exception at 0x003b41c9 in EXEC.exe:0xC0000005:<BR>Access violation writing location 0x00000000</P>
<P> </P>
<P>After the break at the crash, all the arguments becomes "undefined address". </P>
<P> </P>
<P>When I check the library, I got</P>
<P>$ nm fmpich2s.lib | grep MPI_SEND@<BR>00000000 T <A href="mailto:_MPI_SEND@28" target=_blank rel=nofollow ymailto="mailto:_MPI_SEND@28"><FONT color=#0000ff>_MPI_SEND@28</FONT></A><BR>00000000 I <A href="mailto:__imp__MPI_SEND@28" target=_blank rel=nofollow ymailto="mailto:__imp__MPI_SEND@28"><FONT color=#0000ff>__imp__MPI_SEND@28</FONT></A><BR>00000000 T <A href="mailto:_MPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:_MPI_SEND@32"><FONT color=#0000ff>_MPI_SEND@32</FONT></A><BR>00000000 I <A href="mailto:__imp__MPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:__imp__MPI_SEND@32"><FONT color=#0000ff>__imp__MPI_SEND@32</FONT></A><BR>00000000 T <A href="mailto:_PMPI_SEND@28" target=_blank rel=nofollow ymailto="mailto:_PMPI_SEND@28"><FONT color=#0000ff>_PMPI_SEND@28</FONT></A><BR>00000000 I <A href="mailto:__imp__PMPI_SEND@28" target=_blank rel=nofollow ymailto="mailto:__imp__PMPI_SEND@28"><FONT
color=#0000ff>__imp__PMPI_SEND@28</FONT></A><BR>00000000 T <A href="mailto:_PMPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:_PMPI_SEND@32"><FONT color=#0000ff>_PMPI_SEND@32</FONT></A><BR>00000000 I <A href="mailto:__imp__PMPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:__imp__PMPI_SEND@32"><FONT color=#0000ff>__imp__PMPI_SEND@32</FONT></A><BR></P>
<P>I am wondering why there are two definitions: <FONT color=#0000ff><A href="mailto:_MPI_SEND@28" target=_blank rel=nofollow ymailto="mailto:_MPI_SEND@28">_MPI_SEND@28</A></FONT> and <A href="mailto:_MPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:_MPI_SEND@32"><FONT color=#0000ff>_MPI_SEND@32</FONT></A>. And I could not find corresponding source code for <A href="mailto:_MPI_SEND@32" target=_blank rel=nofollow ymailto="mailto:_MPI_SEND@32"><FONT color=#0000ff>_MPI_SEND@32</FONT></A>. Any comments? Thanks.<BR></P>
<P>Linfa<BR></P>
<P><BR> </P>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jayesh Krishna <jayesh@mcs.anl.gov><BR>To: trymelz trymelz <trymelz@yahoo.com><BR>Cc: mpich-discuss@mcs.anl.gov<BR>Sent: Wednesday, March 19, 2008 2:32:59 PM<BR>Subject: RE: [mpich-discuss] exit code -1073741819<BR><BR>
<STYLE type=text/css>DIV { MARGIN:0px;} </STYLE>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=690482719-19032008>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=690482719-19032008> Can you send us your MPI program ?</SPAN></FONT></DIV>
<DIV><SPAN class=690482719-19032008><FONT face=Arial color=#0000ff size=2> You can also try to debug your program by setting the error handler to MPI_ERRORS_RETURN (MPI_Comm_set_errhandler() ) & using MPI_Error_string() to get the description of the error code.</FONT></SPAN></DIV>
<DIV><SPAN class=690482719-19032008><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=690482719-19032008><FONT face=Arial color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=690482719-19032008><FONT face=Arial color=#0000ff size=2>Jayesh</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-mpich-discuss@mcs.anl.gov [mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of </B>trymelz trymelz<BR><B>Sent:</B> Wednesday, March 19, 2008 2:11 PM<BR><B>To:</B> mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [mpich-discuss] exit code -1073741819<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>I got an strange error when I run my parallel program.</DIV>
<DIV> </DIV>
<DIV>job aborted:<BR>rank: node: exit code[: error message]<BR>0: abyss: -1073741819: process 0 exited without calling finalize<BR>1: abyss: -1073741819: process 1 exited without calling finalize<BR>2: abyss: -1073741819: process 2 exited without calling finalize</DIV>
<DIV> </DIV>
<DIV>My program works as expected under Linux. But when I porting it to windows I got above error. It is compiled by VC8 and Intel FORTRAN 10.0.</DIV>
<DIV>I didn't built my own MPICH2, but link my program with fmpich2s.lib and mpi.lib which were installed from mpich2-1.0.6p1-win32-ia32.msi.</DIV>
<DIV> </DIV>
<DIV>This error happened inside the call to MPI_SEND. Does anyone have an idea about this error?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Linfa</DIV></DIV><BR>
<HR SIZE=1>
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ" target=_blank rel=nofollow>Try it now.</A></DIV><BR></DIV></DIV><BR>
<HR SIZE=1>
Looking for last minute shopping deals? <A href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping" target=_blank rel=nofollow>Find them fast with Yahoo! Search.</A></DIV><BR></DIV></DIV><BR>
<HR SIZE=1>
Looking for last minute shopping deals? <A href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping" target=_blank rel=nofollow>Find them fast with Yahoo! Search.</A></DIV><BR></DIV></div><br>
<hr size=1>Never miss a thing. <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a></body></html>