You need to use mpicc as the C compiler and linker. That will take care of passing whatever flags are needed for proper compilation and linking. You can pass it to ocaml with:

ocamlc -cc mpicc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.



Andres


On Sep 17, 2007, at 5:08 PM, Rod wrote:

Hi all,

    I'm trying to compile the test file using ocamlmpi, but just what I have is this message
-------------------------------------------------------------------------------
ocamlc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.
File "test.ml", line 144, characters 6-9:
Warning Y: unused variable res.
/usr/bin/ld: cannot find -lmpi
collect2: ld returned 1 exit status
Error while building custom runtime system
-----------------------------------------------------------------------------

I'm using mpich2-1.0.5p4.

Thanks in advance for any answer.

Cheer,
Rodiney

_______________________________________________
Caml-list mailing list. Subscription management: