[music-rfc] Linking with mpic++ under ubuntu.

Mikael Djurfeldt mikael at djurfeldt.com
Thu Oct 22 08:48:46 CEST 2009


On Thu, Oct 22, 2009 at 3:54 AM, Aurelien Cassagnes <aurelien at oist.jp> 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=<PATH>

If you don't give this option, <PATH> 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++ <OBJECT> -L<PATH>/lib -lmusic

where <OBJECT> 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


More information about the music-rfc mailing list