Multi-core processor
Hi everybody,
With the coming of multi-core processors sharing memory, is a protocole like MPI still interesting? Has anybody an experience on clusters of multi-core machines? Thanks a lot in advance. |
Re: Multi-core processor
Hello Jojo,
In order to take advantage from multi-core processors using languages like Fortran or C++, you have to write parallel programs using e.g. MPI. On clusters of multi-core machines you will request the number of processes with the mpirun command and the operating/MPI system distributes these processes among the available cores. Regards, Markus |
Re: Multi-core processor
I would think that to take advantage of multicore processors you need to write multithreaded code. Then the operating system schedules the threads transparently across the cores. Do Windows and Linux allow explicit user control of each core? One would still need MPI to explicitly schedule the equivalent of threads across machines. Am I wrong about this?
|
Re: Multi-core processor
It is sufficient to write MPI code. I have a workstation with two dual core opteron processors running Linux. In order to start a parallel program on the 4 available cores it is sufficient to use the MPI command
mpirun -np 4 executable As far as I know, the threads are a kind of 'lightweight' processes buried deep in the operating system, that will be accessed through the MPI layer. I don't think that it is possible to write multithreaded code using some high level language. |
Re: Multi-core processor
>>I don't think that it is possible to write multithreaded code using some high level language.
!!! There are several alternatives: e.g. with pthread library or OpenMP and ... |
Re: Multi-core processor
Jojo,
with multi-core processors, we need multithreading to use complete machine's power, so multithreading is essential In MPI library each process is executed as a thread so it works fine on multicore machines but on such machines there are more simpler solution, e.g. multithreading with HPF compiler, or OpenMP programming, or pthread library and other methods. A critical point: with MPI we usually divide global data to smaller sub-block so each process has good data locality (and so cache coherency), but with OpenMP and other multithreading lib. it is "traditional" (not essential, it is converted to a habit) to break loops and ... directly without increasing data locality and it is why we see that (in literature) MPI has better performance on shared memory machnes in contrast with OpenMP. |
Re: Multi-core processor
Hi, jojo,
I have a cluster consists of 6 workstations: 4 workstations have two dual-core CPUs and two workstations have one dual-core CPU, hence, a total of 20 CPU cores. All my projects involve free surface flow, hence, VOF-type solver. The drawback with a cluster with multi-core CPUs is that, memory bus may become the bottle-neck. phsieh2005 |
Re: Multi-core processor
Thanks to all of you for your answer.
|
No, you don't need multi-threading, as you can also use multiple processes (with MPI, Multi Process Communication).
|
All times are GMT -4. The time now is 16:44. |