From aurelien at oist.jp Thu Oct 22 03:54:17 2009 From: aurelien at oist.jp (Aurelien Cassagnes) Date: Thu, 22 Oct 2009 10:54:17 +0900 Subject: [music-rfc] Linking with mpic++ under ubuntu. Message-ID: <002401ca52ba$93e7ff10$bbb7fd30$@jp> Hello. After trying to compile both examples from the MUSIC-Rfc document, I?ve several questions : ? Am I missing something or MPI_Comm is actually a MPI::Intracomm object ? ? MUSIC::setup ? MUSIC::Setup ? ? Music::port * ?MUSIC::ContOutputPort ? And so on (in waveconsumer I can?t see where ?width? has been declared). After fixing a lot of this by looking at the header files, I managed to compile, assemble but not link (using mpic++ under ubuntu). Is including ?usr/lib/music? not enough ? Please forgive me if the issues I raised are stupid/false I?m new under this environment. Thanks. .Aurelien. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.incf.org/pipermail/music-rfc/attachments/20091022/8905e7f3/attachment.htm From mikael at djurfeldt.com Thu Oct 22 08:48:46 2009 From: mikael at djurfeldt.com (Mikael Djurfeldt) Date: Thu, 22 Oct 2009 08:48:46 +0200 Subject: [music-rfc] Linking with mpic++ under ubuntu. In-Reply-To: <002401ca52ba$93e7ff10$bbb7fd30$@jp> References: <002401ca52ba$93e7ff10$bbb7fd30$@jp> Message-ID: <66e540fe0910212348i71a9c6d1k73ad3cacfb707fe@mail.gmail.com> On Thu, Oct 22, 2009 at 3:54 AM, Aurelien Cassagnes wrote: > Hello. Hi Aurelien, > After trying to compile both examples from the MUSIC-Rfc document, I?ve > several questions : The RFC document has now been superceded by the MUSIC users manual: http://software.incf.org/software/70/download-documentation/48/ The manual is also present in the MUSIC distribution (in the "doc" directory). The RFC (Request For Comments) was part of the process leading up to the MUSIC API with the purpose that the community working with large-scale modeling could give feedback. We got feedback and made changes to the API accordingly. The users manual is now the reference document. > ????????? Am I missing something or MPI_Comm is actually a MPI::Intracomm > object ? Both MPI and MUSIC have C and C++ interfaces. MPI_Comm is the type of a communicator (both intra- and inter-communicators have this type) in the MPI C interface while MPI::Intracomm is the type of an Intra-communicator in the MPI C++ API. These are actually distinct types, but the C++ API contains coercion rules so that it is possible to cast one into the other. > ????????? MUSIC::setup ? MUSIC::Setup ? > > ????????? Music::port * ?MUSIC::ContOutputPort ? > > And so on (in waveconsumer I can?t see where ?width? has been declared). Please refer to the manual. You'll also find waveconsumer.cc together with instructions how to compile it (README) in the directory "test". > After fixing a lot of this by looking at the header files, I managed to > compile, assemble but not link (using mpic++ under ubuntu). > > Is including ?usr/lib/music? not enough ? When you configure MUSIC (as when you configure any software built with GNU autotools), you can pass the configure script an argument telling where to install MUSIC: ./configure --prefix= If you don't give this option, will default to /usr/local When linking against a library that is not installed in any of the standard places, you have to give the linker the path to the library, in this case: mpic++ -L/lib -lmusic where is your object file. > Please forgive me if the issues I raised are stupid/false I?m new under this > environment. Please keep asking if you have problems. Best regards, Mikael Djurfeldt