How Much Architecture Knowledge Is Needed for Parallel Programming?

In summary: Once you have that down, you can start looking at more specialized methods, such as the mmx and sse instructions in Visual Studio.
  • #1
Einstein Mcfly
162
3
Hello folks. I just finished my phd in theoretical chemistry and my work thus far hasn't involved any parallel programming. In the future I'm sure I'll be expected to know and use parallel methods, so I'm trying to learn it now. The books that I'm reading from begin by describing the different cluster architectures and hardware details before getting to multi-threading etc etc before even talking about actually writing parallel code.

For those who use parallel programming often, how much of these details do I need to know? My impression of those that I work with is that they just sort of use parallel computing by including a few extra lines in their code and knowing that this will make the calculation faster.

Am I wasting my time learning it from a "computer scientist's" point of view, or is this the only way to go?

Thanks for any advice.
 
Technology news on Phys.org
  • #2
Link to zip of example multi-threaded C++ dos console program to copy a file. Mutexes, semaphores, waitformultipleobjects(), and link list fifo "messaging" between threads are demonstrated.

http://jeffareid.net/misc/mtcopy.zip

Support for MMX and SSE instructions in Visual Studio:
http://msdn.microsoft.com/en-us/library/y0dh78ez.aspx

There are also math library packages for multi-core cpus and gpus

Intel:
http://software.intel.com/en-us/intel-mkl

Amd:
http://developer.amd.com/cpu/Libraries/acml/Pages/default.aspx

Ati gpu:
http://developer.amd.com/gpu/acmlgpu/pages/default.aspx

Nividia gpu (CULA):
http://www.culatools.com
 
Last edited by a moderator:
  • #3
You should have a general understanding of different architectures. The sole purpose of parallel programming is to get stuff done faster than it would be in a single thread, and different architectures require different approaches. It's one thing to code for a Core2Quad (four processors, lots of fast shared and local memory). It's different to code for a GPU (two hundred processors, very limited local memory, serialized access to shared memory). It's something else entirely to code for a cluster of computers connected to each other with ethernet cables.

A good starting point would be to understand basic methods of threading and synchronization on a multicore machine, using pthread (Unix) or Windows threading APIs.
 

FAQ: How Much Architecture Knowledge Is Needed for Parallel Programming?

What is parallel programming?

Parallel programming is a type of programming that involves breaking down a large task into smaller subtasks that can be executed simultaneously on multiple processors. It allows for more efficient use of computer resources and can greatly improve the speed and performance of certain tasks.

What are the benefits of learning parallel programming?

Learning parallel programming can greatly improve your ability to write efficient and optimized code, leading to faster program execution and better use of computer resources. It can also open up opportunities for working on high-performance computing projects and tackling complex computational problems.

What are the main challenges of parallel programming?

The main challenges of parallel programming include understanding and implementing parallel algorithms, dealing with issues such as data sharing and synchronization between different threads or processes, and debugging and troubleshooting complex parallel code.

What are some common tools and languages used in parallel programming?

Some common tools and languages used in parallel programming include OpenMP, MPI, CUDA, and parallel versions of languages such as Python, Java, and C++. These tools and languages provide different levels of abstraction and control for writing parallel programs and are often used in combination.

How can I get started with learning parallel programming?

There are many online resources and tutorials available for learning parallel programming, including online courses, books, and documentation for specific tools and languages. It is also helpful to practice writing parallel programs and experimenting with different tools and languages on your own computer or through online coding platforms.

Back
Top