octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45294] octave-forge-mpi issues with struct (w


From: Alexander Barth
Subject: [Octave-bug-tracker] [bug #45294] octave-forge-mpi issues with struct (with test case and patch)
Date: Wed, 10 Jun 2015 12:23:39 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.gnu.org/bugs/?45294>

                 Summary: octave-forge-mpi issues with struct (with test case
and patch)
                 Project: GNU Octave
            Submitted by: abarth
            Submitted on: Wed 10 Jun 2015 12:23:37 PM GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Alexander Barth
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:



It seems that the MPI package cannot send scalar structures. e.g.
simple structs created by:


message.f1 = 12.3
message.f2 = 45.6


I get the error message: 
error: MPI_Send: unsupported class scalar struct

I you send a array struct, it is transformed into a scalar struct at the
receiving end. 

The attached script test_mpi_send_receive shows this issue. I think that there
is also problem in the code when sending a structure to multiple nodes: It
makes a loop over all ranks (rankrec), but within the loop it send again the
message to all nodes instead to only the current node.


  // Now we start the big loop
  const octave_idx_type *rankrec_ptr = rankrec.fortran_vec ();
  for (octave_idx_type i = 0; i < rankrec.nelem (); i++)
    {
[...]

      // iterate through keys(fnames)

      for (octave_map::const_iterator p = map.begin (); p != map.end (); p++)
        {

          // *** inside the loop over all ranks, the message is send to all
ranks (instead of only rank i ***

          info = send_class (comm, key, rankrec, ntagkey);
          if (info != MPI_SUCCESS) return info;

         [...]          
        }
    }


I have prepared a patch which corrects these issues.
There is also a problem with cells, but it leave this for later.

I hope that you accept the attached patch. It would be great if you can also
include the test-case (test_mpi_send_receive.m) which also tests other data
types.

Best regards,
Alex






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 10 Jun 2015 12:23:37 PM GMT  Name: mpi_struct.patch  Size: 8kB   By:
abarth

<http://savannah.gnu.org/bugs/download.php?file_id=34192>
-------------------------------------------------------
Date: Wed 10 Jun 2015 12:23:37 PM GMT  Name: test_mpi_send_receive.m  Size:
4kB   By: abarth

<http://savannah.gnu.org/bugs/download.php?file_id=34193>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45294>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]