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