Opened 6 years ago

Closed 4 years ago

#8613 closed bug (worksforme)

simplifier ticks exhausted

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

(Sent by chrisreade@… ) Compiler giving up with simplifier ticks exhausted. Large amount of simplification may be going on to cause this. The problem goes away when using -fsimpl-tick-factor=1000 and the code runs. This is the session output without the flag (asking to have bug reported):

chris$   ghc -O2 -rtsopts RedBlackStencilOpt.hs -v
Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.4.2
Using binary package database: /Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/package.conf.d/package.cache
Using binary package database: /Users/chris/.ghc/x86_64-darwin-7.6.3/package.conf.d/package.cache
hiding package binary-0.5.1.1 to avoid conflict with later version binary-0.6.4.0
hiding package Cabal-1.16.0 to avoid conflict with later version Cabal-1.18.1.1
wired-in package ghc-prim mapped to ghc-prim-0.3.0.0-d5221a8c8a269b66ab9a07bdc23317dd
wired-in package integer-gmp mapped to integer-gmp-0.5.0.0-2f15426f5b53fe4c6490832f9b20d8d7
wired-in package base mapped to base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.8.0.0-c2c1b21dbbb37ace4b7dc26c966ec664
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
*** Chasing dependencies:
Chasing modules from: *RedBlackStencilOpt.hs
Stable obj: []
Stable BCO: []
Ready for upsweep
  [NONREC
      ModSummary {
         ms_hs_date = 2013-12-13 13:12:37 UTC
         ms_mod = main:RedBlackStencilOpt,
         ms_textual_imps = [import (implicit) Prelude,
                            import Data.Array.Repa.Stencil.Dim2 as A,
                            import Data.Array.Repa.Stencil as A, import Data.Array.Repa as A]
         ms_srcimps = []
      }]
*** Deleting temp files:
Deleting: 
compile: input file RedBlackStencilOpt.hs
Created temporary directory: /var/folders/dz/m1mks1yn1bsft72zgh105sw40000gn/T/ghc93155_0
*** Checking old interface for main:RedBlackStencilOpt:
[1 of 1] Compiling RedBlackStencilOpt ( RedBlackStencilOpt.hs, RedBlackStencilOpt.o )
*** Parser:
*** Renamer/typechecker:
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
*** gcc:
'/usr/bin/gcc' '-m64' '-fno-stack-protector' '-m64' '-L/Library/Frameworks/GHC.framework/Versions/7.6.3-x86_64/usr/lib/ghc-7.6.3/base-4.6.0.1' '--print-file-name' 'libiconv.dylib'
Loading package base ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package QuickCheck-2.6 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package primitive-0.5.0.1 ... linking ... done.
Loading package vector-0.10.0.1 ... linking ... done.
Loading package repa-3.2.3.3 ... linking ... done.
*** Simplify:
*** CorePrep:
*** ByteCodeGen:
*** Desugar:
Result size of Desugar (after optimization)
  = {terms: 900, types: 1,810, coercions: 340}
*** Simplifier:
Result size of Simplifier iteration=1
  = {terms: 834, types: 1,757, coercions: 567}
Result size of Simplifier iteration=2
  = {terms: 830, types: 1,721, coercions: 567}
Result size of Simplifier
  = {terms: 830, types: 1,721, coercions: 567}
*** Specialise:
Result size of Specialise
  = {terms: 830, types: 1,721, coercions: 567}
*** Float out(FOS {Lam = Just 0, Consts = True, PAPs = False}):
Result size of Float out(FOS {Lam = Just 0,
                              Consts = True,
                              PAPs = False})
  = {terms: 993, types: 2,131, coercions: 567}
*** Float inwards:
Result size of Float inwards
  = {terms: 993, types: 2,131, coercions: 567}
*** Simplifier:
*** Deleting temp files:
Deleting: /var/folders/dz/m1mks1yn1bsft72zgh105sw40000gn/T/ghc93155_0/ghc93155_0.s
Warning: deleting non-existent /var/folders/dz/m1mks1yn1bsft72zgh105sw40000gn/T/ghc93155_0/ghc93155_0.s
*** Deleting temp dirs:
Deleting: /var/folders/dz/m1mks1yn1bsft72zgh105sw40000gn/T/ghc93155_0
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for x86_64-apple-darwin):
	Simplifier ticks exhausted
    When trying RuleFired Class op szipWith
    To increase the limit, use -fsimpl-tick-factor=N (default 100)
    If you need to do this, let GHC HQ know, and what factor you needed
    To see detailed counts use -ddump-simpl-stats
    Total ticks: 60402

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Attachments (1)

RedBlackStencilOpt.hs (5.6 KB) - added by guest 6 years ago.
Uses Repa Library for Laplace solver

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by guest

Attachment: RedBlackStencilOpt.hs added

Uses Repa Library for Laplace solver

comment:1 Changed 5 years ago by nomeata

Description: modified (diff)

comment:2 Changed 5 years ago by dominic

Description: modified (diff)

I can reproduce this in 7.9:

ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.9.20140606 for x86_64-apple-darwin):
	Simplifier ticks exhausted
    When trying UnfoldingDone $fNumInt_$c*
    To increase the limit, use -fsimpl-tick-factor=N (default 100)
    If you need to do this, let GHC HQ know, and what factor you needed
    To see detailed counts use -ddump-simpl-stats
    Total ticks: 73680

comment:3 Changed 5 years ago by simonpj

Description: modified (diff)

comment:4 Changed 5 years ago by thomie

Architecture: x86_64 (amd64)Unknown/Multiple
Operating System: MacOS XUnknown/Multiple

The repa library is not compatible with base-4.8 yet (cabal hell), so I'm not able to reproduce this with HEAD at the moment.

comment:5 Changed 4 years ago by George

we need the 7.10.1 or later version of RedBlackStencilOpt.hs​ as the one attached here doesn't compile under 7.10.1

comment:6 Changed 4 years ago by thomie

Resolution: worksforme
Status: newclosed

GHC 7.10 actually started accepting this program again, with the default simpl-tick-factor program, but GHC 8.0 doesn't.

-fsimpl-tick-factor
GHC panic ok
7.10 90 95
8.0.1 110 115

This doesn't seem like a GHC bug. Either increase the tick factor a bit when compiling this program, or remove some of the INLINEs.

Thanks for reporting.

Note: See TracTickets for help on using tickets.