<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ///////// UPDATE 1 ///////// in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BLACS-context-value-and-multiple-MPI-communicators/m-p/952477#M15314</link>
    <description>&lt;P&gt;///////// UPDATE 1 /////////&lt;/P&gt;

&lt;P&gt;I have an update for my question which could be useful to find a solution or at least an explanation for the observed problem: the described problem is no more present if I initialize the first grid (the one making use of the global context) on a task grid whose size is such that all available MPI tasks are included, for example with MKL_INT i_nTaskRow(1) and MKL_INT i_nTaskCol(MPI_COMM_WORLD size). Is this behavior expected from BLACS? Many thanks again for your support!&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2014 16:41:48 GMT</pubDate>
    <dc:creator>jelich__christopher</dc:creator>
    <dc:date>2014-03-19T16:41:48Z</dc:date>
    <item>
      <title>BLACS context value and multiple MPI communicators</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BLACS-context-value-and-multiple-MPI-communicators/m-p/952476#M15313</link>
      <description>&lt;P&gt;Hello everybody, I am trying to make some tests with BLACS/Scalapack (C interface, Intel MKL version) making use multiple MPI communicators: particularly, what I am trying to obtain is a set of BLACS contexts/grids corresponding (one-to-one) to a set of (disjoint) MPI communicators. While I have no problems in working with a single "global" communicator (MPI_COMM_WORLD) I have some difficulties with the multiple communicator case. I hope that you could give me some suggestions for the following problem.&lt;/P&gt;

&lt;P&gt;I am a bit confused about the BLACS context variable value update after a call to Cblacs_gridinit: lets suppose to start with a "global" context corresponding to the MPI_COMM_WORLD communicator. I can obtain the corresponding BLACS context with the call:&lt;/P&gt;

&lt;P&gt;MPI_Comm globalCommunicator(MPI_COMM_WORLD);&lt;/P&gt;

&lt;P&gt;MKL_INT globalContext(Csys2blacs_handle(globalCommunicator));&lt;/P&gt;

&lt;P&gt;and create a grid on it with&lt;/P&gt;

&lt;P&gt;Cblacs_gridinit(&amp;amp;globalContext,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;c_blacsGridOrdering,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL_INT i_nTaskRow,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL_INT i_nTaskCol);&lt;/P&gt;

&lt;P&gt;with, for example, char c_blacsGridOrdering('R').&lt;/P&gt;

&lt;P&gt;The globalContext value in this case is 0.&lt;/P&gt;

&lt;P&gt;At some point in my code, which is running for example making use of 6 MPI tasks,&lt;BR /&gt;
	an MPI communicator (localCommunicator) corresponding to the group of 4 tasks with id [0;3] is being created: at this point I would like to create a new BLACS context (localContext) for this "local" communicator and a local grid on it. I can do that with the code&lt;/P&gt;

&lt;P&gt;MKL_INT localContext(Csys2blacs_handle(localCommunicator));&lt;/P&gt;

&lt;P&gt;Cblacs_gridinit(&amp;amp;localContext,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;c_blacsGridOrdering,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL_INT i_nTaskRowLocal,&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL_INT i_nTaskColLocal);&lt;/P&gt;

&lt;P&gt;where the above function call sequence is performed only by the tasks included in the local communicator.&lt;/P&gt;

&lt;P&gt;The localContext value, after the call to Csys2blacs_handle, is equal to 1 (for each task of the local communicator) but it is modified and set to 0 by the subsequent call to Cblacs_gridinit.&lt;/P&gt;

&lt;P&gt;Obviously this causes some problems in the rest of my code since, for example, if I try to retrieve the MPI communicator corresponding to localContext with a call to Cblacs2sys_handle I get a six task communicator corresponding to the initial globalCommunicator.&lt;/P&gt;

&lt;P&gt;Most likely I am making some very stupid error (missing call to some BLACS functions??) or it is not clear to me the interplay between multiple MPI communicators and BLACS context/grids but I can not find what is wrong with my code.&lt;/P&gt;

&lt;P&gt;Do you have some suggestions concerning the above problem? Many thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 08:11:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BLACS-context-value-and-multiple-MPI-communicators/m-p/952476#M15313</guid>
      <dc:creator>jelich__christopher</dc:creator>
      <dc:date>2014-03-19T08:11:11Z</dc:date>
    </item>
    <item>
      <title>///////// UPDATE 1 /////////</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BLACS-context-value-and-multiple-MPI-communicators/m-p/952477#M15314</link>
      <description>&lt;P&gt;///////// UPDATE 1 /////////&lt;/P&gt;

&lt;P&gt;I have an update for my question which could be useful to find a solution or at least an explanation for the observed problem: the described problem is no more present if I initialize the first grid (the one making use of the global context) on a task grid whose size is such that all available MPI tasks are included, for example with MKL_INT i_nTaskRow(1) and MKL_INT i_nTaskCol(MPI_COMM_WORLD size). Is this behavior expected from BLACS? Many thanks again for your support!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2014 16:41:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BLACS-context-value-and-multiple-MPI-communicators/m-p/952477#M15314</guid>
      <dc:creator>jelich__christopher</dc:creator>
      <dc:date>2014-03-19T16:41:48Z</dc:date>
    </item>
  </channel>
</rss>

