<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 24, 2017, at 1:10 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class=""><p class=""><br class="">
    </p>
    <div class="moz-cite-prefix">On 08/24/2017 03:03 PM, Adrian Prantl
      wrote:<br class="">
    </div>
    <blockquote cite="mid:7750B7FF-1342-4691-BBCF-9E82B3618AAC@apple.com" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252" class="">
      <br class="">
      <div class="">
        <blockquote type="cite" class="">
          <div class="">On Aug 24, 2017, at 12:04 PM, Hal Finkel <<a moz-do-not-send="true" href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class=""><br style="font-family: Menlo-Regular;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              text-align: start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">On 08/23/2017 06:23 PM,
              Adrian Prantl wrote:</span><br style="font-family:
              Menlo-Regular; font-size: 12px; font-style: normal;
              font-variant-caps: normal; font-weight: normal;
              letter-spacing: normal; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
            <blockquote type="cite" style="font-family: Menlo-Regular;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-size-adjust: auto;
              -webkit-text-stroke-width: 0px;" class="">This patch fixes
              the UBSAN errors:<br class="">
              <br class="">
              diff --git
              a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c
b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c<br class="">
              index a4ef5d05..d0145857 100644<br class="">
              ---
              a/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c<br class="">
              +++
              b/MultiSource/Benchmarks/DOE-ProxyApps-C/Pathfinder/configuration.c<br class="">
              @@ -47,21 +47,21 @@<br class="">
                   options->doStatistics = false;<br class="">
                   options->writeOutputFile = false;<br class="">
                   options->outputFile = NULL;<br class="">
                   options->buildType = endNodesOnly;<br class="">
                   return(options);<br class="">
                }<br class="">
                  Configuration* Configuration_new()<br class="">
                {<br class="">
                   Configuration *new = malloc(sizeof(Configuration));<br class="">
              -    SearchOptions *options =
              malloc(sizeof(SearchOptions));<br class="">
              +    SearchOptions *options = SearchOptions_new();<br class="">
                   if ( !new || !options )<br class="">
                   {<br class="">
                       if ( new ) free(new);<br class="">
                       if ( options ) free(options);<br class="">
                       return(NULL);<br class="">
                   }<br class="">
                   new->graphs = NULL;<br class="">
                   new->signatures = NULL;<br class="">
                   new->searchOptions = options;<br class="">
                   new->qThreadCount = 0;<br class="">
              <br class="">
              <br class="">
              ... 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).<br class="">
              <br class="">
              Ideas?<br class="">
            </blockquote>
            <br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">This looks like the only
              change necessary, and does still match the reference. I'll
              fix this shortly.</span><br style="font-family:
              Menlo-Regular; font-size: 12px; font-style: normal;
              font-variant-caps: normal; font-weight: normal;
              letter-spacing: normal; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
          </div>
        </blockquote>
        <div class=""><br class="">
        </div>
        <div class="">Have you tested this on a system without OpenMP (like
          macOS)?</div>
      </div>
    </blockquote>
    <br class="">
    I've not tested it on Mac, but the OpenMP support has been disabled
    in all of my testing.<br class=""></div></div></blockquote><div><br class=""></div><div>Works for me. I was worried because when I tried this yesterday I always a different result than the reference output, and the "running nested for" line was the only other diff, which I assumed to mean "no openmp".</div><div><br class=""></div><div>-- adrian</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
    <br class="">
     -Hal<br class="">
    <br class="">
    <blockquote cite="mid:7750B7FF-1342-4691-BBCF-9E82B3618AAC@apple.com" type="cite" class="">
      <div class="">
        <div class=""><br class="">
        </div>
        <div class="">-- adrian</div>
        <br class="">
        <blockquote type="cite" class="">
          <div class=""><br style="font-family: Menlo-Regular;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              text-align: start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Thanks again,</span><br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Hal</span><br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <blockquote type="cite" style="font-family: Menlo-Regular;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-size-adjust: auto;
              -webkit-text-stroke-width: 0px;" class=""><br class="">
              -- adrian<br class="">
              <br class="">
              <br class="">
              <blockquote type="cite" class="">On Aug 23, 2017, at 4:13
                PM, Adrian Prantl via llvm-commits <<a moz-do-not-send="true" href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>>
                wrote:<br class="">
                <br class="">
                Hello Hal,<br class="">
                <br class="">
                thanks for fixing the warnings, I think I have found
                another problem with the Pathfinder code!<br class="">
                <br class="">
                To reproduce:<br class="">
                <br class="">
                $ clang --version<br class="">
                clang version 6.0.0 (trunk 311476) (llvm/trunk 311467)<br class="">
                $ rm -f /tmp/pathfinder<br class="">
                $ 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/"<br class="">
                $ 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<br class="">
                $ [...]<br class="">
                <blockquote type="cite" class="">Total 44669 legs found<br class="">
                  Total 44669 legs found<br class="">
                  Total 117563 legs found<br class="">
                  Total 117563 legs found<br class="">
                  Total 117563 legs found<br class="">
                  Total 117563 legs found<br class="">
                  Total 117563 legs found<br class="">
                  Total 117563 legs found<br class="">
                </blockquote>
                <br class="">
                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.<br class="">
                <br class="">
                I tried the obvious and compiled the code with
                ASAN+UBSAN:<br class="">
                <br class="">
                <blockquote type="cite" class="">Immediately before
                  parallel<br class="">
                  Immediately before nested for's<br class="">
                  searchAlgorithms.c:269:46: runtime error: load of
                  value 190, which is not a valid value for type 'bool'<br class="">
                  SUMMARY: UndefinedBehaviorSanitizer:
                  undefined-behavior searchAlgorithms.c:269:46 in<br class="">
                  <br class="">
                  117563 found for 137641 searches. Overall Time:
                  0:0:0.000<br class="">
                  searchAlgorithms.c:658:19: runtime error: load of
                  value 190, which is not a valid value for type 'bool'<br class="">
                  SUMMARY: UndefinedBehaviorSanitizer:
                  undefined-behavior searchAlgorithms.c:658:19 in<br class="">
                  searchAlgorithms.c:664:19: runtime error: load of
                  value 190, which is not a valid value for type 'bool'<br class="">
                  SUMMARY: UndefinedBehaviorSanitizer:
                  undefined-behavior searchAlgorithms.c:664:19 in<br class="">
                  <br class="">
                  <br class="">
                  Total 117563 legs found<br class="">
                </blockquote>
                Could you please take a look at these issues?<br class="">
                -- adrian<br class="">
                _______________________________________________<br class="">
                llvm-commits mailing list<br class="">
                <a moz-do-not-send="true" href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
              </blockquote>
            </blockquote>
            <br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Hal Finkel</span><br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Lead, Compiler Technology and
              Programming Languages</span><br style="font-family:
              Menlo-Regular; font-size: 12px; font-style: normal;
              font-variant-caps: normal; font-weight: normal;
              letter-spacing: normal; text-align: start; text-indent:
              0px; text-transform: none; white-space: normal;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Leadership Computing Facility</span><br style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px;" class="">
            <span style="font-family: Menlo-Regular; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; text-align:
              start; text-indent: 0px; text-transform: none;
              white-space: normal; word-spacing: 0px;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">Argonne National Laboratory</span></div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </div>

</div></blockquote></div><br class=""></body></html>