[test-suite] r311413 - [test-suite] Adding the Pathfinder Benchmark
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 13:10:24 PDT 2017
On 08/24/2017 03:03 PM, Adrian Prantl wrote:
>
>> On Aug 24, 2017, at 12:04 PM, Hal Finkel <hfinkel at anl.gov
>> <mailto:hfinkel at anl.gov>> wrote:
>>
>>
>> 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?
>>
>> This looks like the only change necessary, and does still match the
>> reference. I'll fix this shortly.
>
> Have you tested this on a system without OpenMP (like macOS)?
I've not tested it on Mac, but the OpenMP support has been disabled in
all of my testing.
-Hal
>
> -- adrian
>
>>
>> Thanks again,
>> Hal
>>
>>>
>>> -- adrian
>>>
>>>
>>>> On Aug 23, 2017, at 4:13 PM, Adrian Prantl via llvm-commits
>>>> <llvm-commits at lists.llvm.org <mailto: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 <mailto: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
>
--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170824/f7b23d10/attachment.html>
More information about the llvm-commits
mailing list