[mpich-discuss] Linking to personal libraries

Pavan Balaji balaji at mcs.anl.gov
Fri Jun 7 08:32:45 CDT 2013


static vs. dynamic linking has nothing to do with the NFS.  With static 
linking, the executable needs to be available on all nodes (either 
through the NFS or through explicit copies).  With dynamic linking, the 
executable and all its dependency libraries need to be available on all 
nodes (again, either through the NFS or through explicit copies).

So far, mpich used static builds by default.  All released versions so 
far use this model.  You can ask it to build dynamic libraries as well 
by passing --enable-shared to configure.

We recently moved to building mpich as a dynamic library by default as 
well (both static and dynamic libraries will be built, but the dynamic 
library is prioritized for linking).  You'll see this model in the 
upcoming mpich-3.1.x series and beyond.

  -- Pavan

On 06/07/2013 06:48 AM, Alejandro Allievi wrote:
> Good morning Wesley,
>
> Under NFS, is there a way to bypass dynamic linking and "force" static
> linking??
>
> Thanks.
>
> Alejandro
>
>
> On Thu, Jun 6, 2013 at 3:52 PM, Alejandro Allievi
> <alejandro.allievi at gmail.com <mailto:alejandro.allievi at gmail.com>> wrote:
>
>     Thanks!!
>
>
>     On Thu, Jun 6, 2013 at 3:44 PM, Wesley Bland <wbland at mcs.anl.gov
>     <mailto:wbland at mcs.anl.gov>> wrote:
>
>         No, this is the correct way to do it.
>
>         On Jun 6, 2013, at 11:12 AM, Alejandro Allievi
>         <alejandro.allievi at gmail.com
>         <mailto:alejandro.allievi at gmail.com>> wrote:
>
>>         Is there a better way??
>>
>>
>>         On Thu, Jun 6, 2013 at 3:40 PM, Wesley Bland
>>         <wbland at mcs.anl.gov <mailto:wbland at mcs.anl.gov>> wrote:
>>
>>             That's true and for most smallish clusters, that's how
>>             people use it.
>>
>>             On Jun 6, 2013, at 11:09 AM, Alejandro Allievi
>>             <alejandro.allievi at gmail.com
>>             <mailto:alejandro.allievi at gmail.com>> wrote:
>>
>>>             Hi Wesley,
>>>
>>>             Just to clarify myself: provided our NFS mirrors my home
>>>             directory and that LD_LIBRARY_PATH is set correctly, the
>>>             dynamic compile/link step for the user (me) is the same
>>>             as for static compile/link??
>>>
>>>             Thanks again Wesley!!
>>>
>>>             Alejandro
>>>
>>>
>>>             On Thu, Jun 6, 2013 at 11:15 AM, Wesley Bland
>>>             <wbland at mcs.anl.gov <mailto:wbland at mcs.anl.gov>> wrote:
>>>
>>>                 It depends on whether you are linking your library
>>>                 statically or dynamically. If you are linking
>>>                 statically, the linker puts everything in one
>>>                 executable that is sent to all of the nodes. If you
>>>                 do it dynamically, you need to make sure your
>>>                 libraries are available on all of the nodes you will
>>>                 be using (usually by using something like NFS to
>>>                 mirror your home directory across the cluster. You
>>>                 will also need to make sure your environment is set
>>>                 up correctly to allow the libraries to be found on
>>>                 the remote process, usually via an environment
>>>                 variable such as LD_LIBRARY_PATH.
>>>
>>>                 Wesley
>>>
>>>
>>>                 On Jun 6, 2013, at 6:18 AM, Alejandro Allievi
>>>                 <alejandro.allievi at gmail.com
>>>                 <mailto:alejandro.allievi at gmail.com>> wrote:
>>>
>>>>                 H
>>>>                 i
>>>>
>>>>                 When linking to personal libraries using MPICH2, how
>>>>                 does each process access them in a distributed
>>>>                 environment?? Does the linker actually
>>>>                 combines
>>>>                 everything
>>>>                 into a single
>>>>                 executable
>>>>                 program
>>>>                 and "sends a copy" of entire executable to each
>>>>                 process even though not all processes may use the
>>>>                 libraries?? Can somebody shed some light on the
>>>>                 entire linking process??
>>>>
>>>>                 Thanks for any help!!
>>>>
>>>>                 Alejandro
>>>>                 _______________________________________________
>>>>                 discuss mailing list discuss at mpich.org
>>>>                 <mailto:discuss at mpich.org>
>>>>                 To manage subscription options or unsubscribe:
>>>>                 https://lists.mpich.org/mailman/listinfo/discuss
>>>
>>>                 _______________________________________________
>>>                 discuss mailing list discuss at mpich.org
>>>                 <mailto:discuss at mpich.org>
>>>                 To manage subscription options or unsubscribe:
>>>                 https://lists.mpich.org/mailman/listinfo/discuss
>>>
>>>
>>>
>>>
>>>             --
>>>             Alejandro Allievi
>>>             http://www.ace-net.ca/wiki/Alejandro_Allievi
>>>             "Tenez, mon ami, si vous y pensez bien, vous trouverez
>>>             qu'en tout, notre véritable sentiment n'est pas celui
>>>             dans lequel nous n'avons jamais vacillé; mais celui
>>>             auquel nous sommes le plus habituellement revenus". Denis
>>>             Diderot.
>>>             Este e-mail esta consignado sólo para el destinatario
>>>             designado en el mismo y puede contener información
>>>             confidencial y privilegiada. Su distribución o copiado
>>>             está prohibido. Si Usted no fuera el destinatario
>>>             designado, por favor notifíquenos de inmediato y destruya
>>>             este e-mail en forma permanente así como todas las copias
>>>             del mismo. _Ce courriel peut renfermer des renseignements
>>>             confidentiels et privilégiés et s'adresse au destinataire
>>>             désigné seulement. La distribution ou la copie de ce
>>>             courriel est interdit. Si vous n'êtes pas le destinataire
>>>             désigné, veuillez nous en aviser immédiatement et
>>>             détruire de façon permanente ce courriel ainsi que toute
>>>             copie de celui-ci_. This e-mail may contain confidential
>>>             information, and is intended only for the named recipient
>>>             and may be privileged. Distribution or copying of this
>>>             email is prohibited. If you are not the named recipient,
>>>             please notify us immediately and permanently destroy this
>>>             email and all copies of it.
>>>             _______________________________________________
>>>             discuss mailing list discuss at mpich.org
>>>             <mailto:discuss at mpich.org>
>>>             To manage subscription options or unsubscribe:
>>>             https://lists.mpich.org/mailman/listinfo/discuss
>>
>>
>>             _______________________________________________
>>             discuss mailing list discuss at mpich.org
>>             <mailto:discuss at mpich.org>
>>             To manage subscription options or unsubscribe:
>>             https://lists.mpich.org/mailman/listinfo/discuss
>>
>>
>>
>>
>>         --
>>         Alejandro Allievi
>>         http://www.ace-net.ca/wiki/Alejandro_Allievi
>>         "Tenez, mon ami, si vous y pensez bien, vous trouverez qu'en
>>         tout, notre véritable sentiment n'est pas celui dans lequel
>>         nous n'avons jamais vacillé; mais celui auquel nous sommes le
>>         plus habituellement revenus". Denis Diderot.
>>         Este e-mail esta consignado sólo para el destinatario
>>         designado en el mismo y puede contener información
>>         confidencial y privilegiada. Su distribución o copiado está
>>         prohibido. Si Usted no fuera el destinatario designado, por
>>         favor notifíquenos de inmediato y destruya este e-mail en
>>         forma permanente así como todas las copias del mismo. _Ce
>>         courriel peut renfermer des renseignements confidentiels et
>>         privilégiés et s'adresse au destinataire désigné seulement. La
>>         distribution ou la copie de ce courriel est interdit. Si vous
>>         n'êtes pas le destinataire désigné, veuillez nous en aviser
>>         immédiatement et détruire de façon permanente ce courriel
>>         ainsi que toute copie de celui-ci_. This e-mail may contain
>>         confidential information, and is intended only for the named
>>         recipient and may be privileged. Distribution or copying of
>>         this email is prohibited. If you are not the named recipient,
>>         please notify us immediately and permanently destroy this
>>         email and all copies of it.
>>         _______________________________________________
>>         discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>>         To manage subscription options or unsubscribe:
>>         https://lists.mpich.org/mailman/listinfo/discuss
>
>
>         _______________________________________________
>         discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>         To manage subscription options or unsubscribe:
>         https://lists.mpich.org/mailman/listinfo/discuss
>
>
>
>
>     --
>     Alejandro Allievi
>     http://www.ace-net.ca/wiki/Alejandro_Allievi
>     "Tenez, mon ami, si vous y pensez bien, vous trouverez qu'en tout,
>     notre véritable sentiment n'est pas celui dans lequel nous n'avons
>     jamais vacillé; mais celui auquel nous sommes le plus habituellement
>     revenus". Denis Diderot.
>     Este e-mail esta consignado sólo para el destinatario designado en
>     el mismo y puede contener información confidencial y privilegiada.
>     Su distribución o copiado está prohibido. Si Usted no fuera el
>     destinatario designado, por favor notifíquenos de inmediato y
>     destruya este e-mail en forma permanente así como todas las copias
>     del mismo. _Ce courriel peut renfermer des renseignements
>     confidentiels et privilégiés et s'adresse au destinataire désigné
>     seulement. La distribution ou la copie de ce courriel est interdit.
>     Si vous n'êtes pas le destinataire désigné, veuillez nous en aviser
>     immédiatement et détruire de façon permanente ce courriel ainsi que
>     toute copie de celui-ci_. This e-mail may contain confidential
>     information, and is intended only for the named recipient and may be
>     privileged. Distribution or copying of this email is prohibited. If
>     you are not the named recipient, please notify us immediately and
>     permanently destroy this email and all copies of it.
>
>
>
>
> --
> Alejandro Allievi
> http://www.ace-net.ca/wiki/Alejandro_Allievi
> "Tenez, mon ami, si vous y pensez bien, vous trouverez qu'en tout, notre
> véritable sentiment n'est pas celui dans lequel nous n'avons jamais
> vacillé; mais celui auquel nous sommes le plus habituellement revenus".
> Denis Diderot.
> Este e-mail esta consignado sólo para el destinatario designado en el
> mismo y puede contener información confidencial y privilegiada. Su
> distribución o copiado está prohibido. Si Usted no fuera el destinatario
> designado, por favor notifíquenos de inmediato y destruya este e-mail en
> forma permanente así como todas las copias del mismo. _Ce courriel peut
> renfermer des renseignements confidentiels et privilégiés et s'adresse
> au destinataire désigné seulement. La distribution ou la copie de ce
> courriel est interdit. Si vous n'êtes pas le destinataire désigné,
> veuillez nous en aviser immédiatement et détruire de façon permanente ce
> courriel ainsi que toute copie de celui-ci_. This e-mail may contain
> confidential information, and is intended only for the named recipient
> and may be privileged. Distribution or copying of this email is
> prohibited. If you are not the named recipient, please notify us
> immediately and permanently destroy this email and all copies of it.
>
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji



More information about the discuss mailing list