[test-suite] r311413 - [test-suite] Adding the Pathfinder Benchmark

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 16:31:58 PDT 2017


On 08/23/2017 06:23 PM, Adrian Prantl wrote:
> This patch fixes the UBSAN errors:
>
> diff --git a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
> index a4ef5d05..d0145857 100644
> --- a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
> +++ b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
> @@ -47,21 +47,21 @@
>       options->doStatistics = false;
>       options->writeOutputFile = false;
>       options->outputFile = NULL;
>       options->buildType = endNodesOnly;
>       return(options);
>    }
>   
>    Configuration* Configuration_new()
>    {
>       Configuration *new = malloc(sizeof(Configuration));
> -    SearchOptions *options = malloc(sizeof(SearchOptions));
> +    SearchOptions *options = SearchOptions_new();
>       if ( !new || !options )
>       {
>           if ( new ) free(new);
>           if ( options ) free(options);
>           return(NULL);
>       }
>       new->graphs = NULL;
>       new->signatures = NULL;
>       new->searchOptions = options;
>       new->qThreadCount = 0;
>
>
> ... and it also fixes the bi-modal results, but now I'm always getting the "Total 44669 legs found" result, which is not what the benchmark reference solution expects (it expects 117563).
>
> Ideas?

That's funny :( -- thanks for tracking this down! I imagine this is 
because whatever random data malloc() gives you corresponds to different 
search options from the default options produced by SearchOptions_new(). 
Feel free to revert this test if fixing it isn't your idea of fun right 
now. I'll need to fit it and make sure that it's sanitizer clean before 
recommitting.

  -Hal

>
> -- adrian
>
>
>> On Aug 23, 2017, at 4:13 PM, Adrian Prantl via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> Hello Hal,
>>
>> thanks for fixing the warnings, I think I have found another problem with the Pathfinder code!
>>
>> To reproduce:
>>
>> $ clang --version
>> clang version 6.0.0 (trunk 311476) (llvm/trunk 311467)
>> $ rm -f /tmp/pathfinder
>> $ clang bitfield.c configuration.c gettime.c graph.c graphGen.c main.c node.c parsing.c searchAlgorithms.c searchDiagram.c statistics.c systemCallMap.c utils.c vectorUtils.c yaml.c -o /tmp/pathfinder -isysroot "/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/"
>> $ for i in `seq 8`; do /tmp/pathfinder -x /Data/llvm/projects/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/medsmall1.adj_list |grep 'legs found' & done
>> $ [...]
>>> Total 44669 legs found
>>> Total 44669 legs found
>>> Total 117563 legs found
>>> Total 117563 legs found
>>> Total 117563 legs found
>>> Total 117563 legs found
>>> Total 117563 legs found
>>> Total 117563 legs found
>>
>> I think the code is somehow bi-modal in its output. This is causing all of our internal LNT bots to fail at the moment. For some reason it does not seem to reproduce on green dragon though.
>>
>> I tried the obvious and compiled the code with ASAN+UBSAN:
>>
>>> Immediately before parallel
>>> Immediately before nested for's
>>> searchAlgorithms.c:269:46: runtime error: load of value 190, which is not a valid value for type 'bool'
>>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:269:46 in
>>>
>>> 117563 found for 137641 searches. Overall Time: 0:0:0.000
>>> searchAlgorithms.c:658:19: runtime error: load of value 190, which is not a valid value for type 'bool'
>>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:658:19 in
>>> searchAlgorithms.c:664:19: runtime error: load of value 190, which is not a valid value for type 'bool'
>>> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior searchAlgorithms.c:664:19 in
>>>
>>>
>>> Total 117563 legs found
>> Could you please take a look at these issues?
>> -- adrian
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list