Skip to content

Crash with par_apply_collect, debug, fortran order #899

Closed

Description

@nilgoyette

I think I found a bug.

use ndarray::{Array3, ShapeBuilder, Zip};

fn main() {
    let data = Array3::<f32>::from_elem((5, 5, 5).f(), 1.0);
    println!("{}", Zip::from(&data).par_apply_collect(|d| d));
}

It works flawlessly in --release, in 'c' order and with any size > 44. It crashes in 'f' order, debug and any array size from 1..45. The size part is really bizarre!

thread 'thread 'thread '<unnamed><unnamed>thread '<unnamed>thread '' panicked at '<unnamed>thread '' panicked at '' panicked at '<unnamed>assertion failed: `(left == right)`
  left: `true`,
 right: `false`'
... lot of scrambled text ...

Tested on Windows, WSL and Ubuntu. Latest version of ndarray and Rust.

Activity

  1. bluss commented on Jan 26, 2021

    @bluss
    Member

    Yes, the bug is in the debug assertion here so it is indeed doing the right thing in release mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions