<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 19 oct. 08 à 17:10, Jonas Maebe a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On 19 Oct 2008, at 13:12, jideel wrote:<br><br><blockquote type="cite">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.<br></blockquote><blockquote type="cite">I was not aware of this behaviour on Mac OS X.<br></blockquote><br>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.<br><br></div></blockquote><div><br></div><div>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.</div><div>thanks for the directive's tip.</div><div><br></div><br><blockquote type="cite"><div><blockquote type="cite">Many thanks for your quick response.<br></blockquote><blockquote type="cite">I removed the openmpi dynamic libs provided with Leopard,<br></blockquote><br>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).<br><br></div></blockquote><div><br></div><div>By 'removing', i meant 'move to a temporary location' :)</div><div>I did this because it seemed to have been installed by the XCode package, but perhaps i'm wrong.</div><div>I do agree with you about system manipulations, so i'll follow your suggestion and restore them. </div><br><blockquote type="cite"><div><blockquote type="cite">do you think i should enable shared libs while building MPICH2 ("--enable-sharedlibs"), and thus be able to avoid the -k switches ?<br></blockquote><br>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.<br><br><br></div></blockquote><div><br></div><div>This is not intended to be distributed, this is rather an experimentation (pathfinding, comparison with Erlang (as long as it can be compared...)).</div><div><br></div><br><blockquote type="cite"><div>Jonas<br>_______________________________________________<br>fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br><a href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a><br></div></blockquote><br></div><div>By the way, it seems that the MPI implementation provided by Apple is OpenMPI rather than MPICH2 (from their site : "<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; line-height: 17px; ">MPICH2 currently does not support heterogeneous platforms.<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; line-height: normal; ">", that's why i looked at OpenMPI).</span></span></div><div>I tried h2pas with it to generate some bindings, but (of course) my first attempt failed, i'll try again this week.</div><div><br></div><div>Thanks again,</div><div><br></div><div>Jd</div><div><br></div><br></body></html>