Hi Sebastian,  thanks for your reply!<br><br>At 2013-09-27 03:33:04,"Sebastian Pop" <spop@codeaurora.org> wrote:>Hi,<br>><br>>Star Tan wrote:<br>>> At 2013-09-03 00:12:56,"Tobias Grosser" <tobias@grosser.es> wrote:<br>>> <br>>> >On 09/02/2013 07:44 AM, Star Tan wrote:<br>>> >> At 2013-09-02 16:22:28,"Tobias Grosser" <tobias@grosser.es> wrote:<br>>> >><br>>> >>> On 09/01/2013 08:02 PM, Star Tan wrote:<br>>> >>>> Hi all,<br>>> >>>><br>>> >>>><br>>> >>>> Attached patch file to update lit config for Cloog. Without it, Polly always skips Cloog testings when we run "make check-polly".<br>>> >>><br>>> >>> Dear Star Tan,<br>>> >>><br>>> >>> thanks a lot for the patch. It looks very reasonable, but I am wondering<br>>> >>> why it was not needed before or what problem it fixes exactly. Could you<br>>> >>> add some information about this to the commit message.<br>>> >>><br>>> >> I am not sure why it was not needed before; maybe it has never worked well before. The problem is that Polly never executes Cloog specific testcases no matther whether Cloog is found or not. I find this problem because I put a new testcase in test/Cloog/CodeGen/, but it is never executed.<br>>> >> @Sebastian, you added the Cloog directory in r169159, including all testcases and the lit.local.cfg. The lit.local.cfg ensures that  cloog specific testcases are executed only with CLOOG_FOUND by adding the following lit commands in test/Cloog/lit.local.cfg:<br>>> >>          cloog = config.root.cloog_found<br>>> >>          if cloog not in ['TRUE', 'true'] :<br>>> >>              config.unsupported = True<br>>> >> However, there are two problems:<br>>> >> First, since the cloog_found is set as "@CLOOG_FOUND@",  I think the following "sed" command should be added into Makefile:<br>>> >>          sed -e "s#@CLOOG_FOUN@#$(CLOOG_FOUND)#g"<br>>> >> Unfortunately such command is missed in current Polly.  If it is not needed, I am curious how could Polly determine the value of @CLOOG_FOUND@ ?<br>>> >> Second, even if we add the "sed" command in Makefile, the config.root.cloog_found would be set as "yes" or null, but Polly currently compares it with "TRUE" or "true", which thus always fails and the Cloog testcases will never be executed.<br>>> >> @Sebastian, could you do me a favor to have a review of this problem?  FYI, I have re-attached the patch file.<br>>> ><br>>> >This is surprising. Even without your patch my test/lit.site.cfg file <br>>> >contains:<br>>> ><br>>> >config.enable_gpgpu_codegen = ""<br>>> >config.cloog_found = "TRUE"<br>>> ><br>>> >(With CLOOG enabled and GPGPU_codegen disabled). Also, the CLooG test <br>>> >are run (and are failing) as expected.<br>>> ><br>>> >I think it would be good to understand why this different behaviour can <br>>> >be observed. Sebastian, any ideas?<br>>> ><br>>> Interesting! In my computer, it shows as:<br>>> <br>>> config.enable_gpgpu_codegen = "@CUDALIB_FOUND@"<br>>> config.cloog_found = "@CLOOG_FOUND@"<br>><br>>I think the problem is:<br>><br>>lit.site.cfg.in:config.cloog_found = "@CLOOG_FOUND@"<br>><br>>it should be lower case letters as in:<br>><br>>Makefile.config.in:CLOOG_FOUND := @cloog_found@<br>><br>>because when we detect cloog, we use the function in find_lib_and_headers.m4<br>><br>>find_lib_and_headers([cloog], [cloog/isl/cloog.h], [cloog-isl])<br>><br>>./autoconf/m4/find_lib_and_headers.m4:    AC_SUBST([$1_found],["yes"])<br>><br>>and this will be instantiated as AC_SUBST([cloog_found],["yes"]).<br>><br>>A patch that changes lit.site.cfg.in<br>><br>>- config.enable_gpgpu_codegen = "@CUDALIB_FOUND@"<br>>- config.cloog_found = "@CLOOG_FOUND@"<br>>+ config.enable_gpgpu_codegen = "@cudalib_found@"<br>>+ config.cloog_found = "@cloog_found@"<br>><br>If you change "CLOOG_FOUND" to "cloog_found", which means the final lit.site.cfg will looks like:<br><br>    config.cloog_found = yes<br><br>However, the lit.local.cfg in Cloog directory is:<br><br>    cloog = config.root.cloog_found<br>    if cloog not in ['TRUE', 'true'] :<br>        config.unsupported = True<br><br>which means it will compare the config_found with 'TRUE'/'true',  not 'yes'.   So, it still does not work. That's why I propose to modify the lit.local.cfg to compare cloog_found with 'yes' rather than 'TRUE' or 'true'.<br>Did I miss something?<br><br>Star Tan