<?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 MPI+linked list in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036227#M4239</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;as suggested by&amp;nbsp;Tim Prince, I ask the question about MPI here.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I would like to know if it is possible to send linked list from a processor to another in fortran+MPI&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
    <pubDate>Fri, 29 Aug 2014 17:45:38 GMT</pubDate>
    <dc:creator>diedro</dc:creator>
    <dc:date>2014-08-29T17:45:38Z</dc:date>
    <item>
      <title>MPI+linked list</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036227#M4239</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;as suggested by&amp;nbsp;Tim Prince, I ask the question about MPI here.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I would like to know if it is possible to send linked list from a processor to another in fortran+MPI&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2014 17:45:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036227#M4239</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-08-29T17:45:38Z</dc:date>
    </item>
    <item>
      <title>MPI sends data based on</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036228#M4240</link>
      <description>&lt;P&gt;MPI sends data based on several factors.&amp;nbsp; You provide the starting address (via variable name), length (via datatype and count), data layout if necessary (custom datatypes), ad how the data is encoded (datatype).&amp;nbsp; Since a linked list is not a contiguous datatype, and doesn't necessarily have a pre-defined structure, you cannot do this in a simple manner.&amp;nbsp; You would need to send each element of the linked list individually.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2014 18:42:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036228#M4240</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-08-29T18:42:54Z</dc:date>
    </item>
    <item>
      <title>Dear all,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036229#M4241</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;this means that I have to change strategy, am I right?&lt;/P&gt;

&lt;P&gt;This could be a problem because my program work with linked list.&lt;/P&gt;

&lt;P&gt;Do you have some suggestion?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 12:27:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036229#M4241</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-02T12:27:17Z</dc:date>
    </item>
    <item>
      <title>You could send one element at</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036230#M4242</link>
      <description>&lt;P&gt;You could send one element at a time and rebuild the linked list&amp;nbsp;in the receiving rank.&amp;nbsp; Or you could convert the linked list to an array, send that, and build a new linked list in the receiver.&amp;nbsp; But there is no trivial way to send a linked list.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 13:48:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036230#M4242</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-02T13:48:47Z</dc:date>
    </item>
    <item>
      <title>Dear James,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036231#M4243</link>
      <description>&lt;P&gt;Dear James,&lt;/P&gt;

&lt;P&gt;thanks a lot for the suggestion. I am totally new in MPI. Now I am learning how to divide the computational domain with&amp;nbsp;MPI_CART_CREATE and&amp;nbsp;MPI_CART_SHIFT. I have also learn the&amp;nbsp;MPI_CART_COORDS.&lt;/P&gt;

&lt;P&gt;I think that&amp;nbsp;&lt;SPAN style="font-size: 12.8000001907349px; line-height: 15.609601020813px;"&gt;MPI_CART_SHIFT is a problem with linked list. Am I right?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12.8000001907349px; line-height: 15.609601020813px;"&gt;Where I could learn how to send an array? Now I am only able to send single variable&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 15:20:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036231#M4243</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-02T15:20:21Z</dc:date>
    </item>
    <item>
      <title>A simple example of sending</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036232#M4244</link>
      <description>&lt;P&gt;A simple&amp;nbsp;example of sending an array:&lt;/P&gt;

&lt;P&gt;[plain]int array[10];&lt;/P&gt;

&lt;P&gt;int rank;&lt;/P&gt;

&lt;P&gt;// Initialize the array values however you prefer&lt;/P&gt;

&lt;P&gt;MPI_Comm_rank(&amp;amp;rank,MPI_COMM_WORLD);&lt;/P&gt;

&lt;P&gt;if (rank==0)&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;&amp;nbsp; MPI_Send(array,10,MPI_INT,1,0,MPI_COMM_WORLD);&lt;/P&gt;

&lt;P&gt;} else if (rank==1)&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;&amp;nbsp; MPI_Recv(array,10,MPI_INT,0,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE);&lt;/P&gt;

&lt;P&gt;}[/plain]&lt;/P&gt;

&lt;P&gt;The MPI_Comm_rank call gets the rank number within MPI_COMM_WORLD.&amp;nbsp; Every rank will have a unique number within any given communicator.&amp;nbsp; MPI_COMM_WORLD is the default communicator, and will contain all ranks that were part of the initial job.&amp;nbsp; You can spawn additional ranks after starting which aren't part of MPI_COMM_WORLD, but that's a separate topic.&lt;/P&gt;

&lt;P&gt;The conditional breaks execution into three possible paths, based on the rank number.&amp;nbsp; Any rank higher than rank 1 will not do anything here, and simply move to the next statement.&amp;nbsp; Rank 0 will send data, rank 1 will receive it.&amp;nbsp; Let's look at what the communication calls actually do.&lt;/P&gt;

&lt;P&gt;The first argument of each is the initial buffer address.&amp;nbsp; For the sending call, this is where to find the data to send.&amp;nbsp; For the receiving call, this is where to put the received data.&amp;nbsp; In this case, the variable array is a pointer to the first element of the array.&amp;nbsp; Keep in mind that the call here expects an address, not a value.&lt;/P&gt;

&lt;P&gt;The next argument is the count.&amp;nbsp; How many pieces of data will be sent?&amp;nbsp; The third argument defines the type of data.&amp;nbsp; Basic MPI datatypes are fairly simple, and sufficient for most cases.&amp;nbsp; Here, I'm using MPI_INT, which is the corresponding type for an int variable.&amp;nbsp; These two arguments define how much data to send and how to handle it.&amp;nbsp; For the most part, the "how to handle it" is irrelevant, but when you are using heterogeneous systems, this can become a factor.&amp;nbsp; I wouldn't worry about it at this time, other than to make sure you're sending the correct data type.&amp;nbsp; You can also make custom data types.&amp;nbsp; But these are still simple structures, boiling down to a combination of basic types, along with constant offsets.&lt;/P&gt;

&lt;P&gt;Argument 4 is different between the two calls.&amp;nbsp; In the sender, this is the destination rank.&amp;nbsp; In the receiver, this is the sending rank.&amp;nbsp; Argument 5 is the tag.&amp;nbsp; This is useful when you have multiple communication calls and want to differentiate them.&amp;nbsp; Unless you specify otherwise, a sender and receiver must have matching tags.&amp;nbsp; Argument 6 is the communicator to use.&amp;nbsp; When you are using custom communicators, this identifies which one to use.&lt;/P&gt;

&lt;P&gt;The final argument to MPI_Recv is the status.&amp;nbsp; Here, I just used MPI_STATUS_IGNORE.&amp;nbsp; This argument allows you to get more information about the message transmission, especially useful for error handling.&lt;/P&gt;

&lt;P&gt;Now, to your second point.&amp;nbsp; MPI_CART_CREATE and MPI_CART_SHIFT.&amp;nbsp; These will not help with linked lists.&amp;nbsp; These functions are intended to make a Cartesian grid from your ranks.&amp;nbsp; For example, if you have a 2-dimensional program, with a 2-dimensional data set, and you are splitting your data by location within the data set.&amp;nbsp; If you have 64 ranks, you could create a grid of 8x8 ranks.&amp;nbsp; MPI_CART_CREATE allows you to more easily reference neighbor ranks in both directions, rather than having to maintain your own map of which rank is where on your grid.&amp;nbsp; There are many uses for this, but this is irrelevant to using linked lists.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 15:47:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036232#M4244</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-02T15:47:07Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036233#M4245</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;I would have another question, and i do not if I could post it here or I have to create a new post.&lt;/P&gt;

&lt;P&gt;The question is this one:&lt;/P&gt;

&lt;P&gt;When I start a MPI code with:&lt;/P&gt;

&lt;PRE class="brush:;"&gt;   CALL MPI_INIT(MPI%iErr)
   CALL MPI_COMM_RANK(MPI_COMM_WORLD, MPI%myrank, MPI%iErr)
   CALL MPI_COMM_SIZE(MPI_COMM_WORLD, MPI%nCPU,   MPI%iErr)&lt;/PRE&gt;

&lt;P&gt;and then I allocate a vector with for example&lt;/P&gt;

&lt;PRE class="brush:;"&gt;  ALLOCATE(VECTOR(NX,NY))&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The question is this one:&lt;/P&gt;

&lt;P&gt;how many space I have allocated? I mean, if I have for example four processor the total number of allocated vector are&lt;/P&gt;

&lt;P&gt;4*VECTOR(NX,NY) and each vector have a different memory positions, am I right?&lt;/P&gt;

&lt;P&gt;Thanks alot&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:06:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036233#M4245</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-05T16:06:58Z</dc:date>
    </item>
    <item>
      <title>Each rank is a completely</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036234#M4246</link>
      <description>&lt;P&gt;Each rank is a completely separate program.&amp;nbsp; For example, if I run&lt;/P&gt;

&lt;P&gt;[plain]mpirun -n 4 hostname[/plain]&lt;/P&gt;

&lt;P&gt;I will in reality run hostname 4 times.&amp;nbsp; Since this isn't an MPI program, there will be no communication between them.&amp;nbsp; They'll all be started separately, all run, and all finish.&lt;/P&gt;

&lt;P&gt;When you call MPI_Init, that is when the ranks begin communicating with each other.&amp;nbsp; Here, the MPI communication space is initialized.&amp;nbsp; However, outside of MPI calls, the ranks are still independent of each other.&amp;nbsp;&amp;nbsp;When you call allocate, each rank will allocate its own copy of vector.&amp;nbsp; There is no overlap between them, no way for one rank to directly interact with vector in a different rank.&amp;nbsp; So yes, with 4 ranks, each calling allocate, you will have 4 completely independent instances of vector.&amp;nbsp; They will not share the same memory space.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Side note.&amp;nbsp; There are MPI functions that allow direct access to another rank's memory space.&amp;nbsp; With MPI-3, you can even allocate a "shared" portion of memory.&amp;nbsp; I &lt;STRONG&gt;highly&lt;/STRONG&gt; recommend you become more familiar with MPI before going here though.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Now, if you only wanted to allocate vector in one rank, that can be done fairly easily.&amp;nbsp; You've already called MPI_Comm_rank.&amp;nbsp; This gives you the rank number of the current rank within the communicator.&amp;nbsp; You can use this, along with logical statements, to control which rank does what.&lt;/P&gt;

&lt;P&gt;[plain]call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)&lt;/P&gt;

&lt;P&gt;if (rank .eq. 0) then&lt;/P&gt;

&lt;P&gt;&amp;nbsp; allocate(vector(nx,ny))&lt;/P&gt;

&lt;P&gt;end if[/plain]&lt;/P&gt;

&lt;P&gt;Here, only rank 0 would allocate vector.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:26:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036234#M4246</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-05T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036235#M4247</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;perfect, it what I need. Each rank has his own memory and data.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Now I have another question. In my test program to learn MPI need that some processor communicate. I have this simple program where the&amp;nbsp;nearby cells communicate their values:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;send_messageL = Q(MPI%iStart,MPI%jStart:MPI%jEnd)
CALL MPI_ISEND(send_messageL, MsgLength, MPI%AUTO_REAL, LCPU, 1, COMM_CART, send_request(1), MPI%iErr)&lt;/PRE&gt;

&lt;P&gt;In my case I have to communicate not only Q but other information such as particle positions ecc.&lt;/P&gt;

&lt;P&gt;It is possible to create a my variable type such as:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type particle
      integer                 :: rx
      integer                 :: ry
      integer                 :: QQ
end type particle&lt;/PRE&gt;

&lt;P&gt;and after that allocate a fix number of particle, to avoid the use of linked-list, and then share them?&lt;/P&gt;

&lt;P&gt;Does this slow myprogram?&lt;/P&gt;

&lt;P&gt;What do you suggest?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036235#M4247</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-11T14:08:53Z</dc:date>
    </item>
    <item>
      <title>First question.  Is that</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036236#M4248</link>
      <description>&lt;P&gt;First question.&amp;nbsp; Is that possible?&amp;nbsp; Absolutely.&amp;nbsp; There are two ways to go about doing that.&amp;nbsp; The simplest is to send your data as 3*elems integers.&lt;/P&gt;

&lt;P&gt;[plain]type (particle), dimension(:), allocatable :: parray&lt;/P&gt;

&lt;P&gt;integer elems,req,ierr&lt;/P&gt;

&lt;P&gt;elems=1000 ! Or whatever other method for setting it you prefer&lt;/P&gt;

&lt;P&gt;allocate(parray(elems))&lt;/P&gt;

&lt;P&gt;call MPI_ISEND(parray,3*elems,MPI_INTEGER,1,0,MPI_COMM_WORLD,req,ierr)[/plain]&lt;/P&gt;

&lt;P&gt;Each element of parray is 3 integers in size.&amp;nbsp; Sending 3*elems integers will send all of parray.&lt;/P&gt;

&lt;P&gt;You can also create your own MPI datatype.&amp;nbsp; You can use this to select only portions of the parray type to send.&amp;nbsp; Then, send that datatype.&lt;/P&gt;

&lt;P&gt;Second question, will it slow your performance?&amp;nbsp; It will actually improve your performance.&amp;nbsp; Every communication has some overhead.&amp;nbsp; It is almost always better to send all of your data at once, rather than a bit at a time.&amp;nbsp; If the dataset is large enough, it is possible that the MPI implementation or the fabric drivers could split the message.&amp;nbsp; And if the dataset is too large (2 GB), you need to do something else.&amp;nbsp; Either break it apart yourself or use derived datatypes to overcome internal limitations.&amp;nbsp; There could be some situations where sending data in pieces is better.&amp;nbsp; But if you just have an array, and it isn't huge, send it all at once.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:29:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036236#M4248</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-11T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036237#M4249</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;Thanks a lot. Another question. If I have understood correctly, in case of the following variable:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type particle
 integer                 :: rx
 integer                 :: ry
 real                    :: QQ(4)
end type particle&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;Each element of parray is 2 integers + 4*real size&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;and in this case I have to create my own MPI datatype. Am I correct?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 14.3999996185303px;"&gt;​The same thing when I&amp;nbsp;receive&amp;nbsp;the message, Is it true?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 14:43:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036237#M4249</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-11T14:43:03Z</dc:date>
    </item>
    <item>
      <title>Correct.  You'll want a</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036238#M4250</link>
      <description>&lt;P&gt;Correct.&amp;nbsp; You'll want a datatype of 2 integers followed by 4 reals.&amp;nbsp; The simplest way to do that would be MPI_TYPE_CREATE_STRUCT&lt;/P&gt;

&lt;P&gt;[plain]type(particle) dummy ! Used for calculation of displacement&lt;/P&gt;

&lt;P&gt;integer lengths(2), types(2), ierr&lt;/P&gt;

&lt;P&gt;integer(kind=MPI_ADDRESS_KIND) displacements&lt;/P&gt;

&lt;P&gt;integer mpi_particle_type&lt;/P&gt;

&lt;P&gt;types(1)=MPI_INTEGER&lt;/P&gt;

&lt;P&gt;types(2)=MPI_REAL&lt;/P&gt;

&lt;P&gt;lengths(1)=2&lt;/P&gt;

&lt;P&gt;lengths(2)=4&lt;/P&gt;

&lt;P&gt;displacements(1)=0&lt;/P&gt;

&lt;P&gt;displacements(2)=sizeof(dummy%rx)+sizeof(dummy%ry)&lt;/P&gt;

&lt;P&gt;call MPI_TYPE_CREATE_STRUCT(2,lengths,displacements,types,mpi_particle_type,ierr)&lt;/P&gt;

&lt;P&gt;call MPI_TYPE_COMMIT(mpi_particle_type,ierr)[/plain]&lt;/P&gt;

&lt;P&gt;I tried to be very general in calculating the second element of displacements, so you can see what goes into it.&amp;nbsp; There are several ways to get the displacements, the method I showed is the most true to what is really needed.&lt;/P&gt;

&lt;P&gt;Once you have defined the new type, you have to commit it before you can use it.&amp;nbsp; Once you're all done with it, call MPI_TYPE_FREE to release it and get the memory back.&lt;/P&gt;

&lt;P&gt;To use it, simply use mpi_particle_type as the datatype when necessary.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2014 15:24:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036238#M4250</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-11T15:24:48Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036239#M4251</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;really thanks. Sorry but I can not understand. If this is my variable:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type particle
 integer                 :: rx
 integer                 :: ry
 real                    :: QQ(4)
end type particle&lt;/PRE&gt;

&lt;P&gt;I have 2 integer and 4 real.&lt;/P&gt;

&lt;P&gt;So why in&amp;nbsp;call MPI_TYPE_CREATE_STRUCT Do you use&amp;nbsp;MPI_TYPE_CREATE_STRUCT(2,....&lt;/P&gt;

&lt;P&gt;and not &amp;nbsp;MPI_TYPE_CREATE_STRUCT(3,....&lt;/P&gt;

&lt;P&gt;The same thing for&amp;nbsp;displacements. I expect:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;displacements(1)=sizeof(dummy%rx)+sizeof(dummy%ry)
displacements(2)=sizeof(dummy%QQ)&lt;/PRE&gt;

&lt;P&gt;What Do I have not understood?&lt;/P&gt;

&lt;P&gt;Thanks a lot again&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:55:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036239#M4251</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-26T16:55:04Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036240#M4252</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;I think to have understood. The&amp;nbsp;DISPLACEMENTS variable gives the position where star rx and QQ, so we have:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;displacements(1)=0&lt;/PRE&gt;

&lt;P&gt;because the integer part of the type variable start from &amp;nbsp;0. And we have:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;displacements(2)=sizeof(dummy%rx)+sizeof(dummy%ry)&lt;/PRE&gt;

&lt;P&gt;because the real part start from the integer part.&lt;/P&gt;

&lt;P&gt;unfortunately, I have another question:&lt;/P&gt;

&lt;P&gt;Why do you use the following?&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;integer mpi_particle_type
&lt;/PRE&gt;

&lt;P&gt;why do you not use &amp;nbsp;real&amp;nbsp;mpi_particle_type, or are the same thing?&lt;/P&gt;

&lt;P&gt;Thanks again for you&amp;nbsp;indispensabile help&lt;/P&gt;</description>
      <pubDate>Sat, 27 Sep 2014 16:08:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036240#M4252</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-27T16:08:26Z</dc:date>
    </item>
    <item>
      <title>In Fortran, there are two</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036241#M4253</link>
      <description>&lt;P&gt;In Fortran, there are two ways to define MPI objects.&amp;nbsp; You can use integer, which creates a handle to the real datatype.&amp;nbsp; Or, as of MPI-3, the C bindings were made available to Fortran, so you could instead use TYPE(MPI_Datatype).&amp;nbsp; I use integer out of familiarity.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:07:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036241#M4253</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2014-09-29T14:07:21Z</dc:date>
    </item>
    <item>
      <title>Dear J.,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036242#M4254</link>
      <description>&lt;P&gt;Dear J.,&lt;/P&gt;

&lt;P&gt;Ok. It is clear. Really thanks for your explanation.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2014 14:11:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-linked-list/m-p/1036242#M4254</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2014-09-29T14:11:31Z</dc:date>
    </item>
  </channel>
</rss>

