ctuning / reproduce-milepost-project

Collective Knowledge workflow for the MILEPOST GCC (machine learning based compiler). See how it is used in the collaborative project with the Raspberry Pi foundation to support collaborative research for multi-objective autotuning and machine learning techniques, and prototype reproducible papers with portable workflows:
http://cKnowledge.org/rpi-crowd-tuning
GNU General Public License v2.0
47 stars 6 forks source link

Failure to extract features for c++ programs #6

Closed twang15 closed 6 years ago

twang15 commented 6 years ago

There are error messages while extracting features of a c++ program. E.g.,

ML-FEAT-PROC Error (2): Error consulting featuresall.P: unrecoverable_error/++Error[XSB/Runtime/P]: [Unrecoverable!] ++Memory violation occurred during evaluation. ++Please report this problem using the XSB bug tracking system accessible from ++ http://sourceforge.net/projects/xsb ++Please supply the steps necessary to reproduce the bug. SourceForge XSB Download XSB for free. Logic Programming and Deductive Database system (Tabled Prolog) for Unix and Windows. [featuresall compiled, cpu time used: 1.0250 seconds] ML-FEAT-PROC Error (2): Error consulting featuresall.P: misc_error/++Error[XSB/Runtime/P]: [Miscellaneous] [Error in loading file ,./featuresall.xwam] ML-FEAT-PROC Error: Query Error: existence_error/++Error[XSB/Runtime/P]: [Existence (No procedure :(usermod,/(fn_bb_nr,2)) exists)]

twang15 commented 6 years ago

Also, not every function has a corresponding *.ft (feature file), which may be caused by the above error.

twang15 commented 6 years ago

It may be caused by concurrent access to certain files when invoking multiple g++ instance with make -jN, where N is >= 2.

Using single compilation thread can indeed eliminate the above error message.

gfursin commented 6 years ago

Good point and thanks for reporting! I added notes to readme: https://github.com/ctuning/reproduce-milepost-project#notes . By the way, this is yet another motivation to implement feature aggregation inside GCC/LLVM plugins rather than external Prolog files ...