LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running a program on two devices (https://www.linuxquestions.org/questions/linux-newbie-8/running-a-program-on-two-devices-4175479286/)

sryzdn 10-02-2013 01:32 AM

Running a program on two devices
 
Hi,

I have a laptopn Dell E6510. It has four real CPUs and 8GiB memory. I also have a PC it also has 4 CPUs and 8 GiB ram. On my laptop, I have fedora 19 and mpich. On the PC I have centos and mpich.

I want to know if there is any possibility that I can use the facilities of these two computers simultaneously for running my program. I mean is it possible to use 8 CPUs and 16GiB ram of these two devices together in parallel at the same time?

pan64 10-02-2013 01:42 AM

Yes, there are a lot of different solutions (I met with one of them in 1996 on HP-UX). Actually would be better to specify what do you really need. There are two different ways: 1. you can split your job into several tasks and you can execute those tasks on different hosts. 2. you will try to implement functions and invoke them (something like remote procedure call, RPC). Using C++ or java you can use a corba implementation (especially jacorb for java).

sryzdn 10-02-2013 01:46 AM

1996!!! So, there must be plenty of solutions right now. I'm happy.

The code I am running is written with fortran. I use mpich (mpif90 - mpirun), blas, lapack, blacks and scalapck to run it in parallel. I believe there is nothing I can do to split the job. So, I have to choose the second solution. Will you let me know about the sources I can read about this?

pan64 10-02-2013 01:54 AM

http://www.zdv.uni-mainz.de/cms-exte...d/prodg196.htm
You need to follow links (and need to be familiar with idl)

sryzdn 10-03-2013 04:02 AM

About my question above, someone told me that using memory across machines is often a failure and the speed would drop dramatically.
Does that mean, it is not worth the pain to try running a code on two machines?

pan64 10-03-2013 04:11 AM

yes, there is an overhead (looking for the available hosts, open connection and handle communication, etc). It is useful only if the original job is long enough (for example runs 2 hours on one host, but will run only 1 hour on two hosts. Overhead will require only a few seconds, minutes).
Of course it depends on the real situation therefore I cannot say what to do in your case.
Memory cannot be shared across machines.

sryzdn 10-03-2013 05:00 AM

Quote:

Originally Posted by pan64 (Post 5039129)
Memory cannot be shared across machines.

That's why I should quit thinking about this method. I need more ram. I'm sad :(

pan64 10-03-2013 05:08 AM

probably you misunderstood. You can invoke the same function on both hosts (from one single process) and the result will be returned to the same process. Also you can use multithreading to use not only one but all the CPUs you have. Actually it is not memory sharing across machines but allowing to access all of the resources like memory and cpu (on both hosts). Probably you need to redesign your code to be able to use these advantages, but I'm not really sure about that.


All times are GMT -5. The time now is 09:57 AM.