<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Dear Colleague </span><br>
</p>
<div style="color: rgb(0, 0, 0);">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi </p>
<p>I am working on hybrid MPI -OpenMp code and face with a problem. I can not run the code as the way that I want.</p>
<p>I can run pure mpi code and also pure openmp code, but not hybrid one.</p>
<p>I used "<span>export OMP_NUM_THREADS=6" and then "<span>mpirun -np 4 ./hybrid.exe > output.txt"</span></span></p>
<p><span><span>It run but I noticed that It used only virtual threads of CPUs not physical threads.</span></span></p>
<p><span><span>I have both OpenMpi and Mpich on my computer.</span></span></p>
<p><span><span>My problem is I want to use mpi for communication between nodes and <span>sockets and Openmp for cores which are inside of sockets and nodes, I do not know how to pin cpu to each other in each socket and nodes. I could find some material on internet
such as </span></span></span></p>
<p><span><span><span><a href="https://aciref.org/how-to-gain-hybrid-mpi-openmp-code-performance-without-changing-a-line-of-code-a-k-a-dealing-with-task-affinity/" class="OWAAutoLink" id="LPlnk414519" previewremoved="true">https://aciref.org/how-to-gain-hybrid-mpi-openmp-code-performance-without-changing-a-line-of-code-a-k-a-dealing-with-task-affinity/</a></span></span></span></p>
<div id="LPBorder_GT_15027259703330.05737522342994139" style="margin-bottom:20px; overflow:auto; width:100%; text-indent:0px">
<table id="LPContainer_15027259703320.03866375815070722" cellspacing="0" style="width:90%; background-color:rgb(255,255,255); overflow:auto; padding-top:20px; padding-bottom:20px; margin-top:20px; border-top:1px dotted rgb(200,200,200); border-bottom:1px dotted rgb(200,200,200)">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td id="TextCell_15027259703320.8494599750069711" colspan="2" style="vertical-align: top; padding: 0px; display: table-cell; position: relative;">
<div id="LPRemovePreviewContainer_15027259703320.10751931885288735"></div>
<div id="LPTitle_15027259703320.03219168287371388" style="top:0px; color:rgb(47,144,196); font-weight:normal; font-size:21px; font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height:21px">
<a id="LPUrlAnchor_15027259703330.46886915420183417" href="https://aciref.org/how-to-gain-hybrid-mpi-openmp-code-performance-without-changing-a-line-of-code-a-k-a-dealing-with-task-affinity/" target="_blank" style="text-decoration:none">How to gain hybrid MPI-OpenMP
code performance without ...</a></div>
<div id="LPMetadata_15027259703330.7652394405040659" style="margin:10px 0px 16px; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:14px; line-height:14px">
aciref.org</div>
<div id="LPDescription_15027259703330.06789216161048972" style="display:block; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:14px; line-height:20px; max-height:100px; overflow:hidden">
How to gain hybrid MPI-OpenMP code performance without changing a line of code a.k.a. dealing with task affinity</div>
</td>
</tr>
</tbody>
</table>
</div>
But it did not work, I think I need a PBS file to assign those commands on my grid with qsub command.
<p></p>
<p><span><span><span><br>
</span></span></span></p>
<p><span><span><span>If you need more information please let me know. </span></span></span></p>
<p><span><span><span>I am looking forward to hearing from you,</span></span></span></p>
<p><span><span><span>Best regards.</span></span></span></p>
<p><span><span><span>Pasha</span></span></span></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<hr style="width:320px; height:4px; border-width:0px; background-color:#fd7832; margin-left:0px">
<p><font color="#fd7832">Pasha Pashaei </font><br>
<br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>