Skip to content
This repository

Crash when trying mandelbrot_tasks #379

mattwalsh opened this Issue · 5 comments

3 participants

Matt Walsh Jean-Luc Duprat Matt Pharr
Matt Walsh

Pulled down the latest ispc today (9-13-2012); got this error when doing a make:

[ mandelbrot_tasks]$ make
/bin/mkdir -p objs/
ispc -O2 --arch=x86-64 --target=sse2,sse4-x2,avx-x2 mandelbrot.ispc -o objs/mandelbrot_ispc.o -h objs/mandelbrot_ispc.h
ispc: /usr/pic1/llvm/llvm-3.1.src/include/llvm/CodeGen/LiveInterval.h:130: llvm::LiveRange::LiveRange(llvm::SlotIndex, llvm::SlotIndex, llvm::VNInfo*): Assertion `S < E && "Cannot create empty or backwards range"' failed.
main.cpp(207): FATAL ERROR: Unhandled signal sent to process; terminating.

*** Please file a bug report at
*** (Including as much information as you can about how to reproduce this error).
*** You have apparently encountered a bug in the compiler that we'd like to fix!

make: *** [objs/mandelbrot_ispc.h] Aborted
make: *** Deleting file `objs/mandelbrot_ispc.h'

Jean-Luc Duprat
Matt Walsh


Matt Walsh

Here's another reproducer. If you compile it with

ispc -DTASK_MODE torture.ispc -o blah.o

it fails.

Interestingly, if you omit the -o switch, it works.

It also seems to be sensitive to the kernel; if I for instance eliminate the switch statement altogether it works

#ifdef TASK_MODE
    uniform float _inp1[], uniform float _inp2[],
    uniform int _mode[],   uniform float _outp[],
    uniform int span,
    uniform int PTS) {

    #ifdef TASK_MODE
    uniform int start = taskIndex*span;
    uniform int end   = min((taskIndex+1)*span, PTS);
    uniform int start = 0;
    uniform int end   = PTS;

    foreach (i = start ... end) {
        float inp1 = _inp1[i];
        float inp2 = _inp2[i];
        int mode = _mode[i];
        float outp;

    outp = 0.0f;
        float tmp = 0.0f;
        switch (mode) {
            case 0:
                for (int k = 0; k < 100; k++)
                {   tmp += .1f;
                    outp += pow(2.0f + tmp,(inp1 + inp2));
            case 1:
                for (int k = 0; k < 90; k++)
                {   tmp += .2f;
                    outp += pow(2.2f + tmp,(inp1 - inp2 + tmp));


        _outp[i] = outp;

export void torture_ispc(
    uniform float _inp1[], uniform float _inp2[],
    uniform int _mode[],   uniform float _outp[],
    uniform int PTS) {

    #if defined TASK_MODE
    uniform int span = PTS/16;
    launch[PTS/span] torture_ispc_task(_inp1, _inp2, _mode, _outp, span, PTS);
        _inp1, _inp2, _mode, _outp, PTS, PTS);
Matt Walsh

I should add one thing; in my Makefile I have to eliminate the -static switch thing else it won't compile on my machine, that is...

ifeq ($(ARCH_OS),Linux)
  # try to link everything statically under Linux (including libstdc++) so
  # that the binaries we generate will be portable across distributions...
#    LDFLAGS=-static
Matt Pharr

I tried this on ubuntu 12.04 and couldn't reproduce there. (Will dig further, though.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.