1
votes

I have an MPI code which compiles and runs well. I would like to wrap the code to DLL and use the LabVIEW software to call the DLL. But I have no idea how to run an MPI in DLL. Can you give me some advice or alternative approaches? Thank you!

1
A MPI job is generally started with the mpirun command, that will in turn remote exec some proxies that will eventually fork&exec the MPI tasks. are you trying to wrap mpirun into a DLL ? or is LabVIEW already a MPI application that should somehow run your MPI code in a DLL ? - Gilles Gouaillardet
I just want to wrap the MPI which I was written, to a DLL and use the LabVIEW to call that. just like you said, the MPI must start with the "mpirun" or else commands. so when I wrap the MPI code to DLL by VS software, I can't start the parallel code with the command. and LabVIEW is just a commerce software. it can call the DLL to embed to his codes. but LabVIEW don't support to parallel process. in order to improve the computation speed of my code, I want to take advantage of the MPI to realize. thank you! - Gangwang

1 Answers

1
votes

here are several options

  • make a DLL that fork&exec the mpirun command
  • make a DLL that MPI_Comm_spawn() more tasks, do the parallel computation and then make the result available to LabVIEW
  • use a client/server architecture : the DLL issue a request to a third party server, and this server mpirun the computation job and send back the results to the DLL
  • if you are running on only one node, consider using an other parallel paradigm (such as OpenMP) instead of MPI, that would be trivial to wrap into a DLL