[CSC 435] MPI and OpenMP

Andrew J. Pounds pounds_aj at mercer.edu
Tue Apr 23 09:32:47 EDT 2024


> Hi,
>
> I changed that in the script since the assignment said to limit the 
> number of threads per node to one.  (Or at least that is how I 
> interpreted the instructions.)  So I can change back to the way it was 
> but how do I keep the thread count limited to meet the requirements of 
> the assignment?  Or am I just reading it wrong?  Thanks.

The multinode scripts I have given you have all been limited to one 
process per node *with the flag on the mpirun command*. While you are 
welcome to rewrite the scripts to try different things -- the easiest 
thing to do is use one MPI process per node and then allow the on-node 
shared-memory parallelism to be controlled by either Pthreads or OpenMP.

In a naive approach you could just use more MPI processes per node, but 
this tends to overload the communication channels.  To account for this 
drawback, the HPC code that I write which needs to use multiple MPI 
processes uses one global communicator for work between nodes and a 
local communicator for work on the node with each node having a 
communication process, a process to break up the work on the node, and 
the worker processes.

Keep it simple for this exercise - one MPI process per node and OpenMP 
for on-node shared-memory parallelism.  If you use a big enough matrix 
you should see marked speedups when you go from 1 to 8 OpenMP threads 
per node.


-- 
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA 31207 (478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20240423/2046213d/attachment.html>


More information about the csc435 mailing list