performance measurements

Each table row shows performance measurements for this F# Mono program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
500,000Failed  329   

Read the ↓ make, command line, and program output logs to see how this program was run.

Read thread-ring benchmark to see what this program should do.

 notes

F# Compiler for F# 3.1 (Open Source Edition)

Mono JIT compiler version 4.1.0 (master/435cc01 Wed May 20 22:58:47 PDT 2015)
LLVM: yes(3.6.0svn-mono-master/ce4fcec)
GC: sgen

 thread-ring F# Mono #3 program source code

(*  The Computer Language Benchmarks Game
    http://benchmarksgame.alioth.debian.org/

    Contributed by Jomo Fisher

    Uses F# asyncs. Asyncs are triggered by tailcall in sequence as progress is 
    made around the ring. 
*)
let ringLength = 503

let cells = Array.zeroCreate ringLength
let threads = Array.zeroCreate ringLength
let answer = ref -1

let createWorker i = 
    let next = (i+1)%ringLength
    async { let value = cells.[i]
            if false then () 
            match value with
            | 0 -> answer := i+1
            | _ -> 
                cells.[next] <- value - 1 
                return! threads.[next] }
    
[<EntryPoint>]
let main args = 
    cells.[0] <- if args.Length>0 then int args.[0] else 50000000
    for i in 0..ringLength-1 do 
        threads.[i]<-createWorker i

    let result = Async.StartImmediate(threads.[0])
    printfn "%d" !answer
    0


 make, command-line, and program output logs

Fri, 22 May 2015 20:31:22 GMT

MAKE:
mv threadring.fsharp-3.fsharp threadring.fsharp-3.fs
/usr/local/bin/fsharpc --target:exe --platform:x64 -O  -o threadring.fsharp-3.fsharp_run.exe threadring.fsharp-3.fs
F# Compiler for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License

/home/dunham/benchmarksgame_onecore/threadring/tmp/threadring.fsharp-3.fs(9,1): warning FS0221: The declarations in this file will be placed in an implicit module 'Threadring.fsharp-3' based on the file name 'threadring.fsharp-3.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
rm threadring.fsharp-3.fs
3.96s to complete and log all make actions

COMMAND LINE:
/usr/local/bin/mono --llvm threadring.fsharp-3.fsharp_run.exe 500000

PROGRAM FAILED 


PROGRAM OUTPUT:

mono: /usr/local/src/llvm/include/llvm/IR/Instructions.h:999: void llvm::ICmpInst::AssertOK(): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!"' failed.
Stacktrace:

  at <unknown> <0xffffffff>
  at Microsoft.FSharp.Core.PrintfModule.PrintFormatLineToTextWriter<T_REF> (System.IO.TextWriter,Microsoft.FSharp.Core.PrintfFormat`4<T_REF, System.IO.TextWriter, Microsoft.FSharp.Core.Unit, Microsoft.FSharp.Core.Unit>) <0x0004a>
  at Threadring.fsharp-3.main (string[]) <0x000e3>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/usr/local/bin/mono() [0x61d0e0]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7fd727c91d10]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7fd7276d6267]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fd7276d7eca]
	/lib/x86_64-linux-gnu/libc.so.6(+0x2e03d) [0x7fd7276cf03d]
	/lib/x86_64-linux-gnu/libc.so.6(+0x2e0f2) [0x7fd7276cf0f2]
	/usr/local/bin/mono() [0x7da6c6]
	/usr/local/bin/mono(LLVMBuildICmp+0x47) [0x112b6c7]
	/usr/local/bin/mono() [0x658617]
	/usr/local/bin/mono() [0x6922b9]
	/usr/local/bin/mono() [0x6930b7]
	/usr/local/bin/mono() [0x59ee7c]
	/usr/local/bin/mono() [0x59f4bb]
	/usr/local/bin/mono() [0x61e370]
	[0x4072e166]

Debug info from gdb:


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Revised BSD license

  Home   Conclusions   License   Play