[mpich-discuss] Adding libraries to the mpicc wrapper
Matthieu Dorier
matthieu.dorier at irisa.fr
Wed Jan 15 10:13:03 CST 2014
Since the library is called by Mpich itself, I want to end up with:
gcc ... -lmpich -lmylibrary
otherwise mpich will complain that it doesn't find the symbols.
Matthieu Dorier
PhD student at ENS Rennes
http://people.irisa.fr/Matthieu.Dorier
----- Mail original -----
> De: "Pavan Balaji" <balaji at mcs.anl.gov>
> À: discuss at mpich.org
> Envoyé: Mercredi 15 Janvier 2014 17:07:49
> Objet: Re: [mpich-discuss] Adding libraries to the mpicc wrapper
>
>
> User libraries are prioritized over MPICH and other libraries when
> passed to mpicc.
>
> So mpicc foo.c -lmylibrary will result in:
>
> gcc foo.c -lmylibrary -lmpich
>
> Is that what you want to do? If then, I’d recommend Jeff’s approach
> of creating a wrapper mpicc.new script that internally calls mpicc.
>
> — Pavan
>
> On Jan 15, 2014, at 8:55 AM, Matthieu Dorier
> <matthieu.dorier at irisa.fr> wrote:
>
> > Hello,
> >
> > I have written an ADIO backend that depends on a library. So far to
> > make the use of the library transparent when compiling a program,
> > I added the library at line 226 of the mpicc wrapper (mpilibs="
> > -lmpich -lmylibrary"). I'd like to know if there is a "cleaner"
> > way of adding it: mpicc being generated from a template, there
> > should be a way to simply set a variable somewhere for that,
> > shouldn't it? How is it done for other ADIO backends?
> >
> > Thank you,
> >
> > Matthieu Dorier
> > PhD student at ENS Rennes
> > http://people.irisa.fr/Matthieu.Dorier
> > _______________________________________________
> > discuss mailing list discuss at mpich.org
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
More information about the discuss
mailing list