[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59952] Octave parallel package: Command line
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #59952] Octave parallel package: Command line function call issues |
Date: |
Tue, 26 Jan 2021 23:48:38 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?59952>
Summary: Octave parallel package: Command line function call
issues
Project: GNU Octave
Submitted by: None
Submitted on: Wed 27 Jan 2021 04:48:36 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Stavros Kousidis
Originator Email: st.kousidis@gmail.com
Open/Closed: Open
Release: 6.1.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
I have trouble calling a command line function with pararrayfun (likewise for
parcellfun). When I execute the following code:
pkg load parallel
function retval = mul(x,y)
retval = x*y;
endfunction
vector_x = 1:2^3;
vector_y = 1:2^3;
vector_z = pararrayfun(nproc, @(x,y) mul(x,y), vector_x, vector_y)
vector_z = pararrayfun(nproc, @(x,y) x*y, vector_x, vector_y)
I get the following output:
vector_z =
-1 -1 -1 -1 -1 -1 -1 -1
vector_z =
1 4 9 16 25 36 49 64
That is, the call to the command line function does not seem to work, whereas
the same as an anonymous function calling the built-in multiplication is
working.
The maching is x86_64 with Debian bullseye and 5.10.0-1-amd64 kernel. Octave's
version is 6.1.1~hg.2020.12.27-1. The `pkg list` command gives me:
Package Name | Version | Installation directory
--------------+---------+-----------------------
dataframe | 1.2.0 | /usr/share/octave/packages/dataframe-1.2.0
parallel *| 4.0.0 | /usr/share/octave/packages/parallel-4.0.0
struct *| 1.0.16 | /usr/share/octave/packages/struct-1.0.16
The same code works flawless on armv7l with Debian buster and
4.14.150-odroidxu4 kernel. That is the call to the command line function and
the built-in multiplication function produce the output:
parcellfun: 8/8 jobs done
vector_z =
1 4 9 16 25 36 49 64
parcellfun: 8/8 jobs done
vector_z =
1 4 9 16 25 36 49 64
On that machine Octave's version is 4.4.1 and `pkg list` gives:
Package Name | Version | Installation directory
--------------+---------+-----------------------
dataframe | 1.2.0 | /usr/share/octave/packages/dataframe-1.2.0
parallel *| 3.1.3 | /usr/share/octave/packages/parallel-3.1.3
struct *| 1.0.15 | /usr/share/octave/packages/struct-1.0.15
This behavior with a workaround has been posted on Stack Overflow here:
https://stackoverflow.com/q/65898175/15081838
<https://stackoverflow.com/q/65898175/15081838>
It has also been suggested to submit it as a potential bug.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59952>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59952] Octave parallel package: Command line function call issues,
anonymous <=