Hi again buddies!!
First, thanks for replying me.
Well... I just tried to locate 'libmpi.a' as you can see below:

[rodiney@homer ocamlmpi-1.01]$ locate libmpi.a
/usr/lib/lam/libmpi.a

Then, I tried the following:

[rodiney@homer ocamlmpi-1.01]$ ocamlc -o testmpi mpi.cma unix.cma test.ml -ccopt -L /usr/lib/lam/libmpi.a

File "test.ml", line 144, characters 6-9:
Warning Y: unused variable res.
/usr/bin/ld: cannot find -lcamlmpi
collect2: ld returned 1 exit status
Error while building custom runtime system

and then I tried to do the following as well:

[rodiney@homer ocamlmpi-1.01]$ ocamlc -cc mpicc -o testmpi unix.cma mpi.cma test.ml -ccopt -L `locate libmpi.a`

File "test.ml", line 144, characters 6-9:
Warning Y: unused variable res.
/usr/bin/ld: cannot find -lcamlmpi
collect2: ld returned 1 exit status
Error while building custom runtime system

Damn it!! The build system is now asking for 'libcamlmpi.a'
So, I used 'locate' once again:

[rodiney@homer ocamlmpi-1.01]$ locate libcamlmpi
/home/rodiney/ocamlmpi-1.01/libcamlmpi.a
/usr/lib/ocaml/ocamlmpi/libcamlmpi.a

Which 'libcamlmpi.a' should I use??
So, there is a new problem! How can I solve it?? Please, any suggestion?
Thanks again!!

On 9/18/07, Andres Varon <avaron@gmail.com> wrote:
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: