[fpc-devel] MPI (MPICH) - Leopard
jideel
jideel at free.fr
Sun Oct 19 23:27:23 CEST 2008
Le 19 oct. 08 à 17:10, Jonas Maebe a écrit :
>
> On 19 Oct 2008, at 13:12, jideel wrote:
>
>> If i try to compile using the following command line : fpc -k/Users/
>> jideel/mpich2/lib/libmpich.a -k/Users/jideel/mpich2/lib/libpmpich.a
>> HelloWorld1.pp , it builds and executes succesfully.
>> I was not aware of this behaviour on Mac OS X.
>
> I don't know whether it is specific to Mac OS X that the linker
> prefers dynamic over static libraries. You were also specifying the
> wrong library name to the linker (mpi rather than mpich). The system-
> installed version is called libmpi, the one you want is libmpich
> (and apparently also libmpich). You might also be able to use {$l
> libmpich.a} and {$l libpmpich.a} in the source (*not* {$linklib
> libmpich.a}) to explicitly refer the static libraries.
>
During investigation, i did some renaming (mpich to mpi) to check
whether it changes something or not, that's why the library name was
wrong.
thanks for the directive's tip.
>> Many thanks for your quick response.
>> I removed the openmpi dynamic libs provided with Leopard,
>
> I hope that in the future you will restore this library before
> reporting any problems, as it might be caused by you removing system-
> supplied libraries (including general system instability and what
> not). In general, I would strong recommend against removing system
> libraries (regardless of whether you're on Mac OS X, Linux or
> Windows).
>
By 'removing', i meant 'move to a temporary location' :)
I did this because it seemed to have been installed by the XCode
package, but perhaps i'm wrong.
I do agree with you about system manipulations, so i'll follow your
suggestion and restore them.
>> do you think i should enable shared libs while building MPICH2 ("--
>> enable-sharedlibs"), and thus be able to avoid the -k switches ?
>
> That would be an option. But then you will also have to learn about
> library install names on Mac OS X if you intend to distribute your
> program to other people. And at least in this case, simply linking
> against mpich/pmich rather than against mpi will also solve your
> problem.
>
>
This is not intended to be distributed, this is rather an
experimentation (pathfinding, comparison with Erlang (as long as it
can be compared...)).
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
By the way, it seems that the MPI implementation provided by Apple is
OpenMPI rather than MPICH2 (from their site : "MPICH2 currently does
not support heterogeneous platforms.", that's why i looked at OpenMPI).
I tried h2pas with it to generate some bindings, but (of course) my
first attempt failed, i'll try again this week.
Thanks again,
Jd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20081019/43c32671/attachment.html>
More information about the fpc-devel
mailing list