Re: [OMPI users] Object Send Doubt
Hi Carlos, simply you can send all object's field and rebuild new object in destination process. Maybe, you have to delete old object in source process. Remember that you can't send address (eg: pointers) because they refera in local memory. If you want to do "deep copy" of object, you have to send the entire structures pointed to. 2008/7/13 Carlos Henrique da Silva Santos : > Mr. Andreas, > (English) I tried to apply MPI_Type_create_struct(), which is > correct for C Struct, as showed > ( > https://hec.wiki.leeds.ac.uk/pub/Techniques/ParallelComputing/MPI_course.pdf > ). >But, I can't solve it for C++ object. > > (Portuguese) Eu tentei aplicar MPI_Type_create_struct(), que > funcionou em Struct do C, como mostrado em > ( > https://hec.wiki.leeds.ac.uk/pub/Techniques/ParallelComputing/MPI_course.pdf > ). >Mas eu não consegui resolvê-lo para objetos em C++. > > Thank you, > Grato, > > Carlos > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > > -- Gabriele Fatigati CINECA Systems & Tecnologies Department Supercomputing Group Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy www.cineca.it Tel: +39 051 6171722 g.fatig...@cineca.it
Re: [OMPI users] Object Send Doubt
Ok. Gabriele, But I would like to know, how can I define DATATYPE on send and recv? Could you give me an example? For example, my class has the following design and I want to send/recv Test object. class Test { private: int coordinate; vector s; public: void setD(int, vector); double getParameter(int); vector getAll(void); } Thank you for all. On Sun, Jul 13, 2008 at 6:33 AM, Gabriele Fatigati wrote: > Hi Carlos, > simply you can send all object's field and rebuild new object in destination > process. Maybe, you have to delete old object in source process. Remember > that you can't send address (eg: pointers) because they refera in local > memory. If you want to do "deep copy" of object, you have to send the entire > structures pointed to. > > 2008/7/13 Carlos Henrique da Silva Santos : >> >> Mr. Andreas, >> (English) I tried to apply MPI_Type_create_struct(), which is >> correct for C Struct, as showed >> >> (https://hec.wiki.leeds.ac.uk/pub/Techniques/ParallelComputing/MPI_course.pdf). >>But, I can't solve it for C++ object. >> >> (Portuguese) Eu tentei aplicar MPI_Type_create_struct(), que >> funcionou em Struct do C, como mostrado em >> >> (https://hec.wiki.leeds.ac.uk/pub/Techniques/ParallelComputing/MPI_course.pdf). >>Mas eu não consegui resolvê-lo para objetos em C++. >> >> Thank you, >> Grato, >> >> Carlos >> >> ___ >> users mailing list >> us...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/users >> > > > > -- > Gabriele Fatigati > > CINECA Systems & Tecnologies Department > > Supercomputing Group > > Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy > > www.cineca.it Tel: +39 051 6171722 > > g.fatig...@cineca.it > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- == Carlos Henrique da Silva Santos, M.Sc. Graduate Research Assistant Laboratory of Electromagnetism Applied and Computational Department of Microwaves and Optics School of Electrical and Computer Engineer State University of Campinas (UNICAMP) Phone: +55(19)3521-5175 ==
Re: [OMPI users] Valgrind Functionality
Does anyone know if this feature has been incorporated yet? I did a ./configure --help but do not see the enable-ptmalloc2-internal option. - The ptmalloc2 memory manager component is now by default built as a standalone library named libopenmpi-malloc. Users wanting to use leave_pinned with ptmalloc2 will now need to link the library into their application explicitly. All other users will use the libc-provided allocator instead of Open MPI's ptmalloc2. This change may be overriden with the configure option enable-ptmalloc2-internal --> Expected: 1.3 --- On Fri, 7/11/08, Ashley Pittman wrote: From: Ashley Pittman Subject: Re: [OMPI users] Valgrind Functionality To: "Tom Riddle" Cc: "Open MPI Users" List-Post: users@lists.open-mpi.org Date: Friday, July 11, 2008, 8:58 AM On Tue, 2008-07-08 at 18:01 -0700, Tom Riddle wrote: > Thanks Ashley, after going through your suggestions we tried our test > with valgrind 3.3.0 and with glibc-devel-2.5-18.el5_1.1, both exhibit > the same results. A simple non-MPI test prog however returns expected > responses, so valgrind itself look ok. We then checked that the same > (shared) libc gets linked in both the MPI and non-MPI cases, adding > -pthread to the cc command line yields the same result, the only > difference it appears is the open mpi libraries. > > Now mpicc links against libopen-pal which defines malloc for it's own > purposes. The big difference seems to be that libopen-pal.so is > providing its own malloc replacement This will be the problem, I've tested on a openmpi (1.2.6) machine here and I see exactly the same behaviour as you. I re-compiled the application without libopen-pal and valgrind works as expected. To do this I used mpicc -show to see what compile line it was using and ran the command myself without the -lopen-pal option. This clearly isn't a acceptable long-term solution but might help you in the short term. I'm a MPI expert but work on a different MPI to openmpi normally, I have however done a lot of work with Valgrind on different platforms so pick up questions related to it here. I think this problem is going to need input from one of the openmpi guys... The problem seems to be the presence of malloc() and free() functions in the libopen-pal library is preventing valgrind from intercepting these functions in glibc and hence dramatically reducing the benefit which valgrind brings. Ashley Pittman.
Re: [OMPI users] Valgrind Functionality
On Jul 13, 2008, at 9:11 AM, Tom Riddle wrote: Does anyone know if this feature has been incorporated yet? I did a ./configure --help but do not see the enable-ptmalloc2-internal option. - The ptmalloc2 memory manager component is now by default built as a standalone library named libopenmpi-malloc. Users wanting to use leave_pinned with ptmalloc2 will now need to link the library into their application explicitly. All other users will use the libc-provided allocator instead of Open MPI's ptmalloc2. This change may be overriden with the configure option enable-ptmalloc2-internal --> Expected: 1.3 This is on the trunk/v1.3 branch, yes. The default in v1.3 is that ptmalloc2 is *not* built into libopen- pal. This is different than v1.2, where ptmalloc2 *was* included in libopen-pal unless you specified --disable-memory-manager. -- Jeff Squyres Cisco Systems
[OMPI users] getting fortran90 to compile
I installed openmpi like ./configure --prefix= FC=/usr/bin/gfortran-4.2 make all install When i type mpif90 file1.f90 file2.f90 file3.f90 I get Unfortunately, this installation of Open MPI was not compiled with Fortran 90 support. As such, the mpif90 compiler is non-functional. What am i doing wrong? Zachary
Re: [OMPI users] Valgrind Functionality
Thanks, I've gotten to the point of building and running branch/1.3. However when I attempt to run my simple osu_latency test I get the following runtime error now, which I hadn't before on a repo pull of trunk/openmpi-1.3a1r18303 opal_memchecker_base_select failed --> Returned value -13 instead od OPAL_SUCCESS I checked the ompi_info and see the following memchecker MCA memchecker: parameter "memchecker" (current value: Default selection set of components for the memchecker framework so that looks ok, here is my configure $ ../configure --prefix=/opt/wkspace/openmpi-1.3 CC=gcc CXX=g++ --disable-mpi-f77 --enable-debug --enable-memchecker --with-psm=/usr/include --with-valgrind=/opt/wkspace/valgrind-3.3.0/ I think I'm close, TIA Tom --- On Sun, 7/13/08, Jeff Squyres wrote: From: Jeff Squyres Subject: Re: [OMPI users] Valgrind Functionality To: rarebit...@yahoo.com, "Open MPI Users" Cc: "Ashley Pittman" List-Post: users@lists.open-mpi.org Date: Sunday, July 13, 2008, 6:16 AM On Jul 13, 2008, at 9:11 AM, Tom Riddle wrote: > Does anyone know if this feature has been incorporated yet? I did a > ./configure --help but do not see the enable-ptmalloc2-internal > option. > > - The ptmalloc2 memory manager component is now by default built as > a standalone library named libopenmpi-malloc. Users wanting to > use leave_pinned with ptmalloc2 will now need to link the library > into their application explicitly. All other users will use the > libc-provided allocator instead of Open MPI's ptmalloc2. This > change > may be overriden with the configure option enable-ptmalloc2-internal > --> Expected: 1.3 This is on the trunk/v1.3 branch, yes. The default in v1.3 is that ptmalloc2 is *not* built into libopen- pal. This is different than v1.2, where ptmalloc2 *was* included in libopen-pal unless you specified --disable-memory-manager. -- Jeff Squyres Cisco Systems
Re: [OMPI users] getting fortran90 to compile
Use ./configure --prefix=/path/blah/blah FC=gfortran F77=gfortran I think configure will pick up on it? FC and F77 need to point to the full executable, not just the install path of the compiler, so if gfortran is not in your $PATH set it to the full path: FC=/usr/bin/gfortran-4.2/bin/gfortran Brock Palen www.umich.edu/~brockp Center for Advanced Computing bro...@umich.edu (734)936-1985 On Jul 13, 2008, at 11:58 AM, zach wrote: I installed openmpi like ./configure --prefix= FC=/usr/bin/gfortran-4.2 make all install When i type mpif90 file1.f90 file2.f90 file3.f90 I get Unfortunately, this installation of Open MPI was not compiled with Fortran 90 support. As such, the mpif90 compiler is non-functional. What am i doing wrong? Zachary ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Object Send Doubt
On 08:10 Sun 13 Jul , Carlos Henrique da Silva Santos wrote: > Ok. Gabriele, >But I would like to know, how can I define DATATYPE on send and > recv? Could you give me an example? >For example, my class has the following design and I want to > send/recv Test object. > > class Test { > private: > int coordinate; > vector s; > public: > void setD(int, vector); > double getParameter(int); > vector getAll(void); > } Hi Carlos, the problem with this object is that it contains a pointer to malloc'd memory (the vector). Since datatypes can only be used for objects with fixed size (and layout), you can't define an MPI_Datatype for this. I'd suggest you to use Boost.MPI in this case (http://www.boost.org/doc/libs/1_35_0/doc/html/mpi.html) Cheers -Andreas -- Andreas Schäfer Cluster and Metacomputing Working Group Friedrich-Schiller-Universität Jena, Germany 0049/3641-9-46376 PGP/GPG key via keyserver I'm a bright... http://www.the-brights.net (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination! pgpvbGkSR_wR2.pgp Description: PGP signature
Re: [OMPI users] Valgrind Functionality
Hello Tom, There was a bug in the configure.m4 of memchecker/valgrind, but it shouldn't happen for revision 18303. Now it fixed with r18899. Could you please svn update your source, and try again? Thanks, Shiqing Tom Riddle wrote: Thanks, I've gotten to the point of building and running branch/1.3. However when I attempt to run my simple osu_latency test I get the following runtime error now, which I hadn't before on a repo pull of trunk/openmpi-1.3a1r18303 opal_memchecker_base_select failed --> Returned value -13 instead od OPAL_SUCCESS I checked the ompi_info and see the following memchecker MCA memchecker: parameter "memchecker" (current value: Default selection set of components for the memchecker framework so that looks ok, here is my configure $ ../configure --prefix=/opt/wkspace/openmpi-1.3 CC=gcc CXX=g++ --disable-mpi-f77 --enable-debug --enable-memchecker --with-psm=/usr/include --with-valgrind=/opt/wkspace/valgrind-3.3.0/ I think I'm close, TIA Tom --- On *Sun, 7/13/08, Jeff Squyres //* wrote: From: Jeff Squyres Subject: Re: [OMPI users] Valgrind Functionality To: rarebit...@yahoo.com, "Open MPI Users" Cc: "Ashley Pittman" Date: Sunday, July 13, 2008, 6:16 AM On Jul 13, 2008, at 9:11 AM, Tom Riddle wrote: > Does anyone know if this feature has been incorporated yet? I did a > ./configure --help but do not see the enable-ptmalloc2-internal > option. > > - The ptmalloc2 memory manager component is now by default built as > a standalone library named libopenmpi-malloc. Users wanting to > use leave_pinned with ptmalloc2 will now need to link the library > into their application explicitly. All other users will use the > libc-provided allocator instead of Open MPI's ptmalloc2. This > change > may be overriden with the configure option enable-ptmalloc2-internal > --> Expected: 1.3 This is on the trunk/v1.3 branch, yes. The default in v1.3 is that ptmalloc2 is *not* built into libopen- pal. This is different than v1.2, where ptmalloc2 *was* included in libopen-pal unless you specified --disable-memory-manager. -- Jeff Squyres Cisco Systems ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- -- Shiqing Fan http://www.hlrs.de/people/fan High Performance ComputingTel.: +49 711 685 87234 Center Stuttgart (HLRS)Fax.: +49 711 685 65832 POSTAL:Nobelstrasse 19email: f...@hlrs.de ACTUAL:Allmandring 30 70569 Stuttgart
Re: [OMPI users] getting fortran90 to compile
Zachary, I believe you need to ad F90=/usr/bin/gfortran-4.2 (or something similar) to the configure arguments, FC= just gets f77 support. Doug Reeder On Jul 13, 2008, at 8:58 AM, zach wrote: I installed openmpi like ./configure --prefix= FC=/usr/bin/gfortran-4.2 make all install When i type mpif90 file1.f90 file2.f90 file3.f90 I get Unfortunately, this installation of Open MPI was not compiled with Fortran 90 support. As such, the mpif90 compiler is non-functional. What am i doing wrong? Zachary ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Object Send Doubt
Hi Carlos, but why you need to pass an object? I don't understand this. Usuall, in MPI, we don't need to do this. 2008/7/13 Andreas Schäfer : > On 08:10 Sun 13 Jul , Carlos Henrique da Silva Santos wrote: > > Ok. Gabriele, > >But I would like to know, how can I define DATATYPE on send and > > recv? Could you give me an example? > >For example, my class has the following design and I want to > > send/recv Test object. > > > > class Test { > > private: > > int coordinate; > > vector s; > > public: > > void setD(int, vector); > > double getParameter(int); > > vector getAll(void); > > } > > Hi Carlos, > > the problem with this object is that it contains a pointer to malloc'd > memory (the vector). Since datatypes can only be used for objects with > fixed size (and layout), you can't define an MPI_Datatype for > this. I'd suggest you to use Boost.MPI in this case > (http://www.boost.org/doc/libs/1_35_0/doc/html/mpi.html) > > Cheers > -Andreas > > > -- > > Andreas Schäfer > Cluster and Metacomputing Working Group > Friedrich-Schiller-Universität Jena, Germany > 0049/3641-9-46376 > PGP/GPG key via keyserver > I'm a bright... http://www.the-brights.net > > > (\___/) > (+'.'+) > (")_(") > This is Bunny. Copy and paste Bunny into your > signature to help him gain world domination! > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- Gabriele Fatigati CINECA Systems & Tecnologies Department Supercomputing Group Via Magnanelli 6/3, Casalecchio di Reno (BO) Italy www.cineca.it Tel: +39 051 6171722 g.fatig...@cineca.it
Re: [OMPI users] getting fortran90 to compile
On Sun, 2008-07-13 at 10:58 -0500, zach wrote: > I installed openmpi like > ./configure --prefix= FC=/usr/bin/gfortran-4.2 > make all install If gfortran is in your path (which is usually the best way to have it set up) then ./configure --prefix= should work. (It does for me.) Is there a particular reason you are trying to point to a particular version of gfortran? Is that gfortran different to the rest of your system gcc? If so, that's generally a bad idea. Ciao Terry