diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.36k stars 165 forks source link

Error running `futhark test` #2065

Closed samestep closed 6 months ago

samestep commented 6 months ago

I'm using Futhark 0.25.11 installed from Homebrew on my 2020 MacBook Pro with M1 chip. Following the futhark test section from the book, I first created this file called matmul.fut:

entry matmul [n][m][p] (x: [n][m]i32) (y: [m][p]i32): [n][p]i32 =
  map (\xr -> map (\yc -> reduce (+) 0 (map2 (*) xr yc))
                  (transpose y))
      x

-- Matrix multiplication.
-- ==
-- entry: matmul
-- input { [[1, 2]] [[3], [4]] }
-- output { [[11]] }
-- input { [[1, 2], [3, 4]] [[5, 6], [7, 8]] }
-- output { [[19, 22], [43, 50]] }

And then I ran it via this command:

futhark test matmul.fut

I am getting the following error:

matmul.fut: getDirectoryContents:openDirStream: does not exist (No such file or directory)
athas commented 6 months ago

Just to be sure, you're in the right directory when you run futhark test, right? cat matmul.fut works? That error is what you get when the provided file cannot be found.

samestep commented 6 months ago

@athas you're absolutely right, I'm very sorry :joy: should have gone to sleep earlier last night...