<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>RE: [mpich-discuss] need to compile unix code as windows exe</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2> Hi,<BR>
<BR>
>> ...and in the main project, it is only in another folder, and it is complaining about all mpi calls...<BR>
This should be some problem with linking your program with the MPI library (path to library etc). Can you compile your program (main project) by using gcc from command prompt (Are you using a makefile ? ) ? What is the command that you use to compile your main program (main.c).<BR>
<BR>
>> ..."mpiexec -validate" fails...<BR>
Try running "mpiexec -register" from a windows command prompt. Make sure that you specify the DOMAIN_NAME when specifying your USERNAME if the user is a domain user. When you register your username/password, mpiexec does not validate whether the username/password combination is valid. The check is performed only when you run "mpiexec -validate".<BR>
<BR>
Regards,<BR>
Jayesh<BR>
<BR>
-----Original Message-----<BR>
From: Manal Helal [<A HREF="mailto:manalorama@gmail.com">mailto:manalorama@gmail.com</A>]<BR>
Sent: Thursday, November 27, 2008 7:16 PM<BR>
To: Jayesh Krishna<BR>
Cc: mpich-discuss@mcs.anl.gov; Dmitri Chubarov<BR>
Subject: Re: [mpich-discuss] need to compile unix code as windows exe<BR>
<BR>
Hello<BR>
<BR>
sorry for the late reply.<BR>
<BR>
I removed MPICH2 on windows XP, and resinatlled the "mpich2-1.0.8-win-ia32.msi" downloaded on the 19th of November. I don't have now the libraries as zero kb as before. Now I can link -lmpi and it works and not lmpich like before.<BR>
<BR>
However, in the sample program it is linking and generating the exe file, and in the main project, it is only in another folder, and it is complaining about all mpi calls : beginning from<BR>
<BR>
/home/user/project/main.c:314: undefined reference to `_MPI_Init'<BR>
<BR>
down to:<BR>
<BR>
<BR>
/home/user/project/main.c:366: undefined reference to `_MPI_Finalize'<BR>
<BR>
<BR>
again for the hello.exe test program generated, I can not run as before, and the "mpiexec -validate" fails, and I don't know how to fix that, I see the computer name in the wmpiconfig and I used the default parameters, and in the wmpiregister I register the windows account I am using, and it says "Password encrypted into the Registry." and I click OK, and that's it. but every time I open the wmpiregister again, I don't see the registered account.<BR>
<BR>
I really appreciate your help,<BR>
<BR>
Kind Regards,<BR>
<BR>
Manal<BR>
<BR>
2008/11/20 Jayesh Krishna <jayesh@mcs.anl.gov>:<BR>
> Hi,<BR>
><BR>
>>> ...For the credentials, I did register first, and it seem accepted<BR>
>>> the registration, no error messages or anything...<BR>
> Make sure that you explicitly validate the registered<BR>
> username/password using the "mpiexec -validate" command.<BR>
> Let us know the results.<BR>
><BR>
> Regards,<BR>
> Jayesh<BR>
><BR>
> ________________________________<BR>
> From: Manal Helal [<A HREF="mailto:manalorama@gmail.com">mailto:manalorama@gmail.com</A>]<BR>
> Sent: Tuesday, November 18, 2008 9:07 PM<BR>
> To: Jayesh Krishna<BR>
> Cc: mpich-discuss@mcs.anl.gov; Dmitri Chubarov<BR>
> Subject: Re: [mpich-discuss] need to compile unix code as windows exe<BR>
><BR>
> Hi Jayesh<BR>
><BR>
> Thank you very much for your reply.<BR>
><BR>
> I actually removed, rebooted, and re-installed MPICH2 for windows<BR>
> several times before. I also made sure the folder is completely<BR>
> erased. I downloaded now again, and will try and let you know<BR>
><BR>
> For the credentials, I did register first, and it seem accepted the<BR>
> registration, no error messages or anything,<BR>
><BR>
> Thanks again,<BR>
><BR>
> Kind Regards,<BR>
><BR>
> Manal<BR>
><BR>
><BR>
><BR>
> 2008/11/19 Jayesh Krishna <jayesh@mcs.anl.gov><BR>
>><BR>
>> Hi,<BR>
>> Please find my comments below,<BR>
>><BR>
>> >> ...the file "libmpi.a" and "libfmpich2g.a" in "C:\Program<BR>
>> >> Files\MPICH2\lib" are 0kb files ...<BR>
>> The gcc libs should not be 0kb in size. There is something wrong<BR>
>> with your installation of MPICH2. I recommend that you uninstall your<BR>
>> current version of MPICH2, reboot your machine (so that you don't<BR>
>> have any MPI programs running in the bg), install the latest stable<BR>
>> version (1.0.8) of MPICH2.<BR>
>><BR>
>> >> ...Credentials for Manal rejected connecting to mhelallpt-xp Aborting:<BR>
>> >> Unable to connect to mhelallpt-xp ...<BR>
>> You have not registered your username/password correctly with mpiexec.<BR>
>> You should run "mpiexec -register" and register your<BR>
>> username/password (Run "mpiexec -validate" to make sure that the<BR>
>> registered username/password<BR>
>> works)<BR>
>><BR>
>> Regards,<BR>
>> Jayesh<BR>
>> -----Original Message-----<BR>
>> From: Manal Helal [<A HREF="mailto:manalorama@gmail.com">mailto:manalorama@gmail.com</A>]<BR>
>> Sent: Tuesday, November 18, 2008 5:00 AM<BR>
>> To: Jayesh Krishna<BR>
>> Cc: mpich-discuss@mcs.anl.gov; 'Dmitri Chubarov'<BR>
>> Subject: Re: [mpich-discuss] need to compile unix code as windows exe<BR>
>><BR>
>> Hello<BR>
>><BR>
>> Thank you for your help, but I still need help to get my program<BR>
>> running on a windows cluster please. I followed both approaches as<BR>
>> mentioned before,<BR>
>><BR>
>> The first is trying to configure mpich2-1.0.8 to use mpicc on cygwin,<BR>
>> gives the following errors on cygwin on Windows XP 2002 with SP 3<BR>
>> *****************************************<BR>
>> $ ./configure<BR>
>> ./configure: line 12: $'\r': command not found<BR>
>> ./configure: line 23: syntax error near unexpected token `$'in\r''<BR>
>> '/configure: line 23: ` case `(set -o) 2>/dev/null` in<BR>
>> *****************************************<BR>
>><BR>
>> the second is using the cygwin gcc and linking with lmpich, and<BR>
>> that's how it goes:<BR>
>><BR>
>> some information that might help:<BR>
>> the file "libmpi.a" and "libfmpich2g.a" in "C:\Program Files\MPICH2\lib"<BR>
>> are 0kb files, I have "libmpichd.a" as a 1061 Kb file in the same<BR>
>> folder, and "libmpich.a" as 1058 KB, and 'libmpicxx.a" as 199 kb<BR>
>> file, "mpi.lib" is a 126 kb file, and "fmpich2.lib" as 130 kb file.<BR>
>><BR>
>> the gcc version is<BR>
>> *****************************************<BR>
>> $ gcc -v<BR>
>> Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs<BR>
>> Configured with:<BR>
>> /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --ver bose<BR>
>> --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib<BR>
>> --libe xecdir=/usr/lib --mandir=/usr/share/man<BR>
>> --infodir=/usr/share/info --enable-langu<BR>
>> ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls<BR>
>> --without-included-gettext -- enable-version-specific-runtime-libs<BR>
>> --without-x --enable-libgcj<BR>
>> --disable-java-<BR>
>> awt --with-system-zlib --enable-interpreter --disable-libgcj-debug<BR>
>> --enable-thre ads=posix --enable-java-gc=boehm<BR>
>> --disable-win32-registry --enable-sjlj-exceptio ns<BR>
>> --enable-hash-synchronization --enable-libstdcxx-debug Thread model:<BR>
>> posix gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)<BR>
>> *****************************************<BR>
>><BR>
>> compiling a simple program like :<BR>
>> *****************************************<BR>
>> #include <stdio.h><BR>
>> #include <math.h><BR>
>> #include <mpi.h><BR>
>><BR>
>> int main(int argc, char **argv) {<BR>
>> int myProcid, ClusterSize;<BR>
>> MPI_Init(&argc, &argv);<BR>
>> MPI_Comm_rank(MPI_COMM_WORLD, &myProcid);<BR>
>> MPI_Comm_size(MPI_COMM_WORLD, &ClusterSize);<BR>
>> printf ("Hello World Process %d / %d.\n", myProcid, ClusterSize);<BR>
>> //printf ("the ceill(10.55) = %lld\n" , ceill(10.55));<BR>
>> getc (stdin);<BR>
>> MPI_Finalize();<BR>
>> return 0;<BR>
>> }<BR>
>> *****************************************<BR>
>> It is compiled as:<BR>
>> *****************************************<BR>
>> $ gcc hello.c -I "/cygdrive/f/Program Files/MPICH2/include" -L<BR>
>> "/cygdrive/f/Program Files/MPICH2/lib" -lmpich -lm -o hello.exe<BR>
>><BR>
>> creates the exe file with no errors, however, when I try to execute<BR>
>> it using the mpich2 for windows "wmpiexec" Interface with 4 processes<BR>
>> all on the current node and showing different windows, the windows<BR>
>> don't come up, command shown is:<BR>
>> *****************************************<BR>
>> "C:\Program Files\MPICH2\bin\mpiexec.exe" -n 4 -noprompt<BR>
>> "C:\cygwin\home\user\hello.exe"<BR>
>> *****************************************<BR>
>><BR>
>> copying the same command to cygwin, I get the errors shown:<BR>
>> *****************************************<BR>
>> $ "/cygdrive/f/Program Files/MPICH2/bin/mpiexec.exe" -n 4 -noprompt<BR>
>> hello.exe Credentials for Manal rejected connecting to mhelallpt-xp<BR>
>> Aborting: Unable to connect to mhelallpt-xp<BR>
>> *****************************************<BR>
>><BR>
>><BR>
>> However, compiling my mpi program using the following command in a<BR>
>> make<BR>
>> file:<BR>
>> *****************************************<BR>
>> $gcc "/cygdrive/f/Program Files/MPICH2/include" -L<BR>
>> "/cygdrive/f/Program Files/MPICH2/lib" -lmpich -lm main.c<BR>
>><BR>
>> where the main.o is:<BR>
>> main.o : main.c main.h utils.h globals.h<BR>
>> gcc -g -I "/cygdrive/f/Program Files/MPICH2/include" -L<BR>
>> "/cygdrive/f/Program Files/MPICH2/lib" main.c -lmpich -o main.o<BR>
>> *****************************************<BR>
>><BR>
>><BR>
>> I get the following errors:<BR>
>> *****************************************<BR>
>> /home/user/proj/main.c:112: undefined reference to `_MPI_Barrier'<BR>
>> /home/user/proj/main.c:174: undefined reference to `_MPI_Wtime'<BR>
>> /home/user/proj/main.c:242: undefined reference to `_MPI_Send'<BR>
>> /home/user/proj/main.c:251: undefined reference to `_MPI_Recv'<BR>
>> /home/user/proj/main.c:314: undefined reference to `_MPI_Init'<BR>
>> /home/user/proj/main.c:316: undefined reference to `_MPI_Comm_rank'<BR>
>> /home/user/proj/main.c:318: undefined reference to `_MPI_Comm_size'<BR>
>> /home/user/proj/main.c:320: undefined reference to `_MPI_Comm_group'<BR>
>> /home/user/proj/main.c:321: undefined reference to `_MPI_Comm_create'<BR>
>> /home/user/proj/main.c:366: undefined reference to `_MPI_Finalize'<BR>
>> /home/user/proj/main.c:3254: undefined reference to `_MPI_Waitall'<BR>
>> /home/user/proj/main.c:3379: undefined reference to `_MPI_Isend'<BR>
>> /home/user/proj/main.c:3514: undefined reference to `_MPI_Iprobe'<BR>
>> /home/user/proj/main.c:3520: undefined reference to `_MPI_Recv'<BR>
>> *****************************************<BR>
>><BR>
>> It is basically all MPI calls I make, and what I couldn't understand,<BR>
>> why the "MPI_Init" "MPI_Comm_rank", "MPI_Comm_size" and "MPI_Finalize"<BR>
>> was found on the test program, and not found in the main program.<BR>
>><BR>
>> when I compile using the above command without the make file, I get<BR>
>> more errors like:<BR>
>><BR>
>> *****************************************<BR>
>> main.c:165: error: `MPI_Status' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:242: error: `MPI_INT' undeclared (first use in this function)<BR>
>> main.c:302: error: `MPI_Group' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:316: error: `MPI_COMM_WORLD' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3432: error: `MPI_LONG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3435: error: `MPI_LONG_LONG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3485: error: `MPI_Status' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3514: error: `MPI_ANY_SOURCE' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3514: error: `MPI_ANY_TAG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3520: error: `MPI_LONG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3533: error: `MPI_LONG_LONG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3205: error: `MPI_SUCCESS' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3209: error: `MPI_ERR_COMM' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3213: error: `MPI_ERR_TYPE' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3217: error: `MPI_ERR_COUNT' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3221: error: `MPI_ERR_TAG' undeclared (first use in this<BR>
>> function)<BR>
>> main.c:3225: error: `MPI_ERR_RANK' undeclared (first use in this<BR>
>> function)<BR>
>> *****************************************<BR>
>><BR>
>> I also get simillar errors to all long long functions which are not<BR>
>> found on cygwin when I searched or used the "man" command like the<BR>
>> following:<BR>
>><BR>
>> *****************************************<BR>
>> /home/user/proj/main.c:907: undefined reference to `_sqrtl'<BR>
>> /home/user/proj/main.c:1743: undefined reference to `_powl'<BR>
>> /home/user/proj/main.c:2006: undefined reference to `_ceill'<BR>
>> /home/user/proj/main.c:2035: undefined reference to `_floorl'<BR>
>> *****************************************<BR>
>> I appreciate your help a lot,<BR>
>><BR>
>> Kind Regards,<BR>
>><BR>
>> Manal<BR>
><BR>
><BR>
</FONT>
</P>
</BODY>
</HTML>