<table cellspacing='0' cellpadding='0' border='0' ><tr><td valign='top' style='font: inherit;'>It is you to set up your system/env correctly for what ou need to get done. I set mine up to work with 6 platforms, including linux 32 and linux 64. and that is truely a piece of cake if you put in the time.<br><br>tan<br><br><br>--- On <b>Thu, 6/26/08, Daniel Fetchinson <i><fetchinson@googlemail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Daniel Fetchinson <fetchinson@googlemail.com><br>Subject: Re: [mpich-discuss] building 32 bit shmem on 64 bit linux system<br>To: mpich-discuss@mcs.anl.gov<br>Date: Thursday, June 26, 2008, 8:23 AM<br><br><pre>> It must be the mpirun then. Make sure you use the mpirun from the same<br>> build. Give the full path if necessary.<br>><br>> Rajeev<br><br>Thanks, but there is only one installation of mpi on the
machine and<br>that installation is the one I keep compiling. So even if it wanted to<br>execute the wrong mpicc/mpirun/etc it couldn't because there is only 1<br>copy at any given time.<br><br>Nevertheless I recompiled now mpi as well as my program and still I<br>get the same error:<br><br>0 - MPI_INIT : MPIRUN chose the wrong device ch_shmem; program needs<br>device ch_p4<br>/home/fetchinson/mpich32shmem/bin/mpirun.ch_shmem: line 91: 21976<br>Segmentation fault /home/fetchinson/test "testinput"<br><br>Any ideas?<br>Daniel<br><br><br><br>>> > Did you recompile the program? Make sure you use the mpicc<br>>> from this<br>>> > build and not some other mpicc from another directory. Give<br>>> the full<br>>> > path if necessary.<br>>> ><br>>> > Rajeev<br>>><br>>> Yes, I did recompile the program using mpicc from the newly<br>>> built mpi library. Actually, there is only one
mpicc on the<br>>> whole machine.<br>>><br>>> Cheers,<br>>> Daniel<br>>><br>>><br>>><br>>> >> Actually, I spoke a bit too soon. Configure, make, make<br>>> install all<br>>> >> work but the code still doesn't run, saying:<br>>> >><br>>> >> 0 - MPI_INIT : MPIRUN chose the wrong device ch_shmem;<br>>> program needs<br>>> >> device ch_p4<br>>> >> /home/fetchinson/mpi32shmem/bin/mpirun.ch_shmem: line 91:<br>17761<br>>> >> Segmentation fault /home/fetchinson/test<br>"testinput"<br>>> >><br>>> >> The exact same code runs on another machine where someone<br>else<br>>> >> installed a 32-bit shmem mpich1 library, I'm trying to do<br>>> the same on<br>>> >> a different machine now. It's an intel quad core so I<br>suppose the<br>>> >> shmem device should
work. The configure options I used for<br>>> compiling<br>>> >> are<br>>> >><br>>> >> export CC='gcc -m32'<br>>> >> export F77='g77 -m32'<br>>> >> ./configure --with-device=ch_shmem<br>>> >><br>>> >> Do I need to specify the --with-arch option? Going through<br>>> the list<br>>> >> of available --with-arch options I'm not sure what I need<br>for an<br>>> >> Intel(R)<br>>> >> Core(TM)2 Quad CPU Q6600 @ 2.40GHz.<br>>> >><br>>> >> What am I doing wrong?<br>>> >><br>>> >> Cheers,<br>>> >> Daniel<br>>> >><br>>> >><br>>> >><br>>> >> > Thanks Anthony, that worked!<br>>> >> ><br>>> >> > Concerning MPICH2: I'm not in a position to change<br>the<br>>> >> communication<br>>>
>> > routines in the code I use so this would only be an<br>option<br>>> >> if MPICH2<br>>> >> > is fully backward compatible with MPICH1. Is this the<br>case?<br>>> >> Can I just<br>>> >> > start using MPICH2 without changing anything in the code<br>if<br>>> >> it works<br>>> >> > with MPICH1?<br>>> >> ><br>>> >> > Cheers,<br>>> >> > Daniel<br>>> >> ><br>>> >> ><br>>> >> >> Since you are using MPICH-1, you can try setting CC,<br>F77 and F90<br>>> >> >><br>>> >> >> CC="gcc -m32"<br>>> >> >> F77="g77 -m32"<br>>> >> >> ....<br>>> >> >><br>>> >> >> BTW, can you use MPICH2 instead ? We have shifted<br>all our<br>>> >> >> development effort to MPICH2
which is more robust<br>than<br>>> >> MPICH-1. If<br>>> >> >> you are using MPICH2, setting CFLAGS and FFLAGS<br>should<br>>> >> work, and you<br>>> >> >> can use nemesis which shared memory for intranode<br>communication.<br>>> >> >><br>>> >> >> A.Chan<br>>> >> >><br>>> >> >> ----- "Daniel Fetchinson"<br><fetchinson@googlemail.com> wrote:<br>>> >> >><br>>> >> >>> Hi folks,<br>>> >> >>><br>>> >> >>> I'd like to build the 32-bit shmem mpi<br>library because<br>>> >> the code I'll<br>>> >> >>> use with mpi only works in 32-bit because of<br>some<br>>> 32-bit specific<br>>> >> >>> assembly code. The machine is a 64-bit machine<br>with a<br>>> >> 64-bit linux<br>>>
>> >>> distribution (suse).<br>>> >> >>><br>>> >> >>> I tried configuring mpich-1.2.7p1 in a number of<br>ways:<br>>> >> >>><br>>> >> >>> ./configure --with-device=ch_shmem ./configure<br>>> --with-arch=LINUX<br>>> >> >>> --with-device=ch_shmem ./configure<br>>> >> >>> --with-arch=LINUX32 --with-device=ch_shmem<br>./configure<br>>> >> >>> --with-arch=i386 --with-device=ch_shmem<br>>> >> >>><br>>> >> >>> with and without setting the following<br>environment<br>>> variables (in<br>>> >> >>> bash):<br>>> >> >>><br>>> >> >>> export CFLAGS=-m32<br>>> >> >>> export FFLAGS=-m32<br>>> >> >>><br>>> >> >>> Configuring went all
right but none of the above<br>>> >> combinations worked<br>>> >> >>> with 'make' unfortunately :( The error<br>in 'make' is<br>>> the following:<br>>> >> >>><br>>> >> >>> /home/fetchinson/mpich-1.2.7p1/bin/mpicc -o<br>overtake<br>>> overtake.o<br>>> >> >>> test.o<br>>> >> >>><br>>> >><br>/usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse<br>>> >> -linux/bin/ld:<br>>> >> >>> skipping incompatible<br>>> >> /home/fetchinson/mpich-1.2.7p1/lib/libmpich.a<br>>> >> >>> when searching for -lmpich<br>>> >> >>><br>>> >><br>/usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse<br>>> >> -linux/bin/ld:<br>>> >> >>> cannot find -lmpich<br>>> >> >>>
collect2: ld returned 1 exit status<br>>> >> >>> make[4]: *** [overtake] Error 1<br>>> >> >>> make[3]: [linktest1] Error 2 (ignored) Could not<br>link<br>>> a C program<br>>> >> >>> with MPI libraries<br>>> >> >>> make[3]: *** [linktest1] Error 1<br>>> >> >>> make[2]: *** [linktest] Error 2<br>>> >> >>> make[1]: *** [mpi-lib-test] Error 2<br>>> >> >>> make: *** [mpi] Error 2<br>>> >> >>><br>>> >> >>> Which makes me believe that I was not able to<br>convince the<br>>> >> >>> compiler/linker/etc that I really want<br>everything in 32-bit.<br>>> >> >>><br>>> >> >>> What would be the correct way of compiling the<br>whole mpi<br>>> >> library to<br>>> >> >>>
32-bit?<br>>> >> >>><br>>> >> >>> Cheers,<br>>> >> >>> Daniel<br>>> >> >><br>>> >> >><br>>> >> ><br>>> >> ><br>>> >> > --<br>>> >> > Psss, psss, put it down! -<br>http://www.cafepress.com/putitdown<br>>> >> ><br>>> >><br>>> >><br>>> >> --<br>>> >> Psss, psss, put it down! - http://www.cafepress.com/putitdown<br>>> >><br>>> >><br>>> ><br>>> ><br>>><br>>><br>>> --<br>>> Psss, psss, put it down! - http://www.cafepress.com/putitdown<br>>><br>>><br>><br>><br><br><br>-- <br>Psss, psss, put it down! - http://www.cafepress.com/putitdown</pre></blockquote></td></tr></table><br>