Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCamlMPI problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-08 (07:32)
From: Rod <rodiney@g...>
Subject: Re: [Caml-list] OCamlMPI problem
Hi again folks!!
I'm really happy to announce you, guys, that, eventually, I got OcamlMPI
working good on my cluster. What I mean is: the problem about compiling and
executing the examples files provided by the latest release of OcamlMPI (i.e:
testmpi 'n test_mandel) is now definitely solved. Thus, once more, I would
like to thank Andres Varon and Rabih Chaar for helping me handling that
issue. You guys rock! :D
Well... let me to explain how I get OcamlMPI working nice with MPICH2. Then,
maybe, this could be useful for someone else. Here we go:

By watching the Makefile of OcamlMPI, I could understand that it is always
making reference to libmpi.a library (-lmpi). However, MPICH2 doesn't have
any libmpi.a. So, what to do then??
Well.. there isn't any libmpi.a but there is a lib called libmpich.a
Therefore, all I did was replace the '-lmpi' options found in such Makefile
with '-lmpich'. What this means it that the Makefile will now look for a lib
called libmpich.a (and no more libmpi.a) which exists in the MPICH2
implementation of MPI.
That is it!! After doing this and following some further instructions as we
can read in the README file (e.g.: ./configure, make, make install, etc)
found in the OcamlMPI install directory, everything worked good.

As mentioned earlier by our friend Andres Varon, the line "ocamlc -cc mpicc
-o testmpi unix.cma mpi.cma -ccopt -L." was enough to Ocaml for
proper compilation and linking.

OK. If MPICH2 is proper installed and configured on your cluster system,
there will be no problems for running the examples files (as well as others

So, OcamlMPI problem is now solved. Thanks y'all guys for everything you
Best regards,

                      Rodiney E.

On 9/18/07, Andres Varon <> wrote:
> I'm sure that the line I suggested will work just fine. Just give it a
> try.
> Andres
> On Sep 18, 2007, at 3:23 PM, Rod wrote:
> ocamlc -cc mpicc -o testmpi unix.cma mpi.cma -ccopt -L `locate
> libmpi.a`