Opened 5 years ago

Closed 5 years ago

#2837 closed bug (worksforme)

Vectoriser should give a better error message

Reported by: chak Owned by: rl
Priority: normal Milestone:
Component: Data Parallel Haskell Version: 6.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Given

{-# LANGUAGE PArr, ParallelListComp #-}
{-# OPTIONS -fvectorise #-}

module DotP (dotp_double)
where

import qualified Prelude
import Data.Array.Parallel.Prelude
import Data.Array.Parallel.Prelude.Double

dotp_double :: [:Double:] -> [:Double:] -> Double
dotp_double xs ys = sumP [:x * y | x <- xs | y <- ys:]

We can compile with dph-par

TacticalGrace chak 12 (.../haskell/ndp): ghc -c -Odph -funbox-strict-fields -fcpr-off -threaded -package dph-par dotp.hs

but not with dph-seq

TacticalGrace chak 11 (.../haskell/ndp): ghc -c -Odph -funbox-strict-fields -fcpr-off -threaded -package dph-seq dotp.hs 
*** Vectorisation error ***
    Variable not vectorised:
        Data.Array.Parallel.Prelude.Base.Double.sumP

Change History (2)

comment:1 Changed 5 years ago by chak

  • Summary changed from Vectoriser doesn't work with dph-seq to Vectoriser should give a better error message

Resolved on IRC. The additional flag -fdph-seq has been missing from the invocation. However, the error message should be better (or both flags be combined into one).

comment:2 Changed 5 years ago by chak

  • Resolution set to worksforme
  • Status changed from new to closed

It turns out that just providing -fdph-seq or -fdph-par is actually already sufficient (the correct package flag is being implied).

Note: See TracTickets for help on using tickets.