I want to link a Java code with the parallel program I wrote five years ago in C. The program utilizes the Message Passing Interface (MPI) library from Argonne National Laboratory of the United States.
As far as I can imagine, there seems to be two alternative solutions for me so far.
The first one is to use Java Native Interface (JNI) technique to create a C header file the act as a stub linking a Java class to a native library -- in my case, I'm using Windows and Microsoft Visual C++ 2005 and the library will have to be a Dynamically Linked Library (DLL).
The second one, maybe, is to link the Java module and the C module by XML Web Services technology by using software tools such as Apache's Axis C++ or Microsoft's dot-Net technology plus SOAP messaging over the HTTP protocol. Microsoft .NET seems to be a whole new world for me and I don't think I have enough time and patience to learn it right now.
The solutions left are either to use JNI + C (a Java-wrapper solution) or C + Axis (a Web service-wrapper solution).
Now comes a common problem: my C code was written as an MPI parallel program and I want to retain the parallel processing functionality. MPI programs are supposed to be launched by a special launcher -- the "mpirun" script in the now outdated MPICH implementation or the "mpiexec" in the current MPICH2 implementation.
I don't want a solution that creates an operating system "shell" session from the Java or C code to execute mpirun/mpiexec and puts the name of the parallel program as the argument of the launcher. I am searching for a more elegant way to launch the parallel code programmatically.
Keywords: mpi, mpich2, parallel-computing, c, visual-c++
As far as I can imagine, there seems to be two alternative solutions for me so far.
The first one is to use Java Native Interface (JNI) technique to create a C header file the act as a stub linking a Java class to a native library -- in my case, I'm using Windows and Microsoft Visual C++ 2005 and the library will have to be a Dynamically Linked Library (DLL).
The second one, maybe, is to link the Java module and the C module by XML Web Services technology by using software tools such as Apache's Axis C++ or Microsoft's dot-Net technology plus SOAP messaging over the HTTP protocol. Microsoft .NET seems to be a whole new world for me and I don't think I have enough time and patience to learn it right now.
The solutions left are either to use JNI + C (a Java-wrapper solution) or C + Axis (a Web service-wrapper solution).
Now comes a common problem: my C code was written as an MPI parallel program and I want to retain the parallel processing functionality. MPI programs are supposed to be launched by a special launcher -- the "mpirun" script in the now outdated MPICH implementation or the "mpiexec" in the current MPICH2 implementation.
I don't want a solution that creates an operating system "shell" session from the Java or C code to execute mpirun/mpiexec and puts the name of the parallel program as the argument of the launcher. I am searching for a more elegant way to launch the parallel code programmatically.
Keywords: mpi, mpich2, parallel-computing, c, visual-c++
Comments