www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D programs linked with C/MPI based libraries

reply Dominic Jones <dominic.jones qmul.ac.uk> writes:
Hello,

Is it possible to call within a D driver program library functions which are
programmed in C/C++ with the message passing interface (MPI)? I want to write
a program which makes use of the ParMetis library
(http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview).

Supposing it is possible, to compile and run C/MPI programs, wrapper commands
are used, such as mpicc and mpirun. What would be done in D?

Thank you,
Dominic Jones
Apr 07 2011
next sibling parent Kagamin <spam here.lot> writes:
Dominic Jones Wrote:

 Hello,
 
 Is it possible to call within a D driver program library functions which are
 programmed in C/C++ with the message passing interface (MPI)? I want to write
 a program which makes use of the ParMetis library
 (http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview).
 
 Supposing it is possible, to compile and run C/MPI programs, wrapper commands
 are used, such as mpicc and mpirun. What would be done in D?
Looks like MPI is just another C interface. You just need to write binding for it and call it.
Apr 07 2011
prev sibling parent Jesse Phillips <jessekphillips+D gmail.com> writes:
Dominic Jones Wrote:

 Hello,
 
 Is it possible to call within a D driver program library functions which are
 programmed in C/C++ with the message passing interface (MPI)? I want to write
 a program which makes use of the ParMetis library
 (http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview).
 
 Supposing it is possible, to compile and run C/MPI programs, wrapper commands
 are used, such as mpicc and mpirun. What would be done in D?
 
 Thank you,
 Dominic Jones
It is possible and I suppose everything not passing and retrieving messages would be done in D. There is probably a bunch of work involved in converting the headers, but there isn't any reason D can't call into MPI.
Apr 07 2011