<html><body>
<p>1 new commit in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/0b86fcb15765/">https://bitbucket.org/yt_analysis/yt/commits/0b86fcb15765/</a> Changeset:   0b86fcb15765 Branch:      yt User:        ngoldbaum Date:        2016-05-11 18:20:59+00:00 Summary:     Merged in atmyers/yt (pull request #2160)</p>
<p>Print out some useful diagnostic information if check_for_openmp() fails. Closes Issue #1089. Affected #:  1 file</p>
<p>diff -r 6db4d26078e523630af50bde111952bbee7a1018 -r 0b86fcb157653daf6f3abafcb65518cec55b5a50 setupext.py --- a/setupext.py +++ b/setupext.py @@ -1,10 +1,11 @@</p>
<pre>import os
from pkg_resources import resource_filename
import shutil</pre>
<p>-import subprocess +from subprocess import Popen, PIPE</p>
<pre>import sys
import tempfile
</pre>
<p>+</p>
<pre>def check_for_openmp():
    """Returns True if local setup supports OpenMP, False otherwise"""
</pre>
<p>@@ -37,13 +38,21 @@</p>
<pre>"}"
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = subprocess.call(compiler + ['-fopenmp', filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-fopenmp', filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Compilation of OpenMP test code failed with the error: ") +            print(err) +            print("Disabling OpenMP support. ")</p>
<pre>    # Clean up
    file.close()
except OSError:</pre>
<p>+        print("check_for_openmp() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler)</p>
<pre>    return False
finally:
    os.chdir(curdir)</pre>
<p>@@ -82,12 +91,11 @@</p>
<pre>        except IOError:
            rd = '/usr/local'
</pre>
<ul><li><p>fail_msg = ("Pyembree is installed, but I could not compile Embree test code. \n"</p></li>
<li><p>“I attempted to find Embree headers in %s. \n”</p></li></ul>
<p>+    fail_msg = ("I attempted to find Embree headers in %s. \n"</p>
<pre>"If this is not correct, please set your correct embree location \n"
"using EMBREE_DIR environment variable or your embree.cfg file. \n"
"Please see http://yt-project.org/docs/dev/visualizing/unstructured_mesh_rendering.html "</pre>
<ul><li><p>“for more information.” % rd)</p></li></ul>
<p>+                “for more information. \n” % rd)</p>
<pre># Create a temporary directory
tmpdir = tempfile.mkdtemp()</pre>
<p>@@ -110,23 +118,29 @@</p>
<pre>'}'
         )
         file.flush()</pre>
<ul><li><p>with open(os.devnull, ‘w’) as fnull:</p></li>
<li><p>exit_code = subprocess.call(compiler + ['-I%s/include/' % rd, filename],</p></li>
<li><p>stdout=fnull, stderr=fnull)</p></li></ul>
<p>+        p = Popen(compiler + ['-I%s/include/' % rd, filename], +                  stdin=PIPE, stdout=PIPE, stderr=PIPE) +        output, err = p.communicate() +        exit_code = p.returncode + +        if exit_code != 0: +            print("Pyembree is installed, but I could not compile Embree test code.") +            print("The error message was: ") +            print(err) +            print(fail_msg)</p>
<pre>        # Clean up
        file.close()

    except OSError:</pre>
<ul><li><p>print(fail_msg)</p></li></ul>
<p>+        print("read_embree_location() could not find your C compiler. " +              "Attempted to use ‘%s’. " % compiler) +        return False</p>
<pre>    finally:
        os.chdir(curdir)
        shutil.rmtree(tmpdir)
</pre>
<ul><li><p>if exit_code != 0:</p></li>
<li><p>print(fail_msg)</p></li></ul>
<p>–</p>
<pre>return rd</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>

<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BxR9gN8WU5kWH-2F3lq5QAXQXyxf-2BE8dfyArlS8oyo7YJJUgSxBRKL2qZjBbErE3m6KmnBVHcrTFYwX4ylec2Hp7jeVG0nKlvt4iLCdoeUd-2BZBxNe2J-2FmWx-2BK17LWJIx0-2BssZHEALXcDF-2BXaxvkEvUD88DKZJo0-2B0vEjlgdBhmbJxN1Zek22J1-2BFy6G6-2FXF9cq4-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>