OCamlPro / flambda-task-force

13 stars 1 forks source link

Irmin tests' compilation never complete #95

Open samoht opened 8 years ago

samoht commented 8 years ago

How to reproduce:

opam switch 4.03+flamba
opam pin add sexplib https://github.com/samoht/sexplib.git -n
opam pin add ezjsonm --dev -n
opam install irmin-unix mirage-git alcotest
opam source irmin
cd irmin.0.10.1
./configure --enable-tests --enable-examples
make
[...]
/Users/thomas/.opam/4.03.0+flambda/bin/ocamlfind ocamlopt -c -g -annot -bin-annot -short-paths -I lib -I lib/mem -I lib/git -I lib/fs -I lib/http -I lib/unix -package alcotest -package cohttp.lwt -package cohttp.lwt-core -package cstruct -package dolog -package ezjsonm -package ezjsonm.lwt -package git -package git.unix -package hex -package lwt -package mstruct -package ocamlgraph -package re -package re.pcre -package re.perl -package stringext -package tc -package uri -warn-error +1..49 -w A-4-41-44 -I lib_test -I lib -I lib/mem -I lib/unix -o lib_test/test.cmx lib_test/test.ml

The compilation never ends and connecting gdb to the running process seems to show that it is busy doing GC. Going into _build and using -no-functor-heuristics fixes the issue:

cd _build
$ /Users/thomas/.opam/4.03.0+flambda/bin/ocamlfind ocamlopt -c -g -annot -bin-annot -short-paths -I lib -I lib/mem -I lib/git -I lib/fs -I lib/http -I lib/unix -package alcotest -package cohttp.lwt -package cohttp.lwt-core -package cstruct -package dolog -package ezjsonm -package ezjsonm.lwt -package git -package git.unix -package hex -package lwt -package mstruct -package ocamlgraph -package re -package re.pcre -package re.perl -package stringext -package tc -package uri -warn-error +1..49 -w A-4-41-44 -I lib_test -I lib -I lib/mem -I lib/unix -o lib_test/test.cmx lib_test/test.ml -no-functor-heuristics
mshinwell commented 8 years ago

This should be helped (hopefully fixed) when the functor heuristics are rewritten.

mshinwell commented 8 years ago

@samoht Please try again, with a fresh build of the flambda compiler. You should be able to use the "-O3" optimization option, e.g.

OCAMLPARAM="_,O3=1"

in your environment.