<div class="gmail_quote">On Tue, May 29, 2012 at 10:56 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Perhaps the 'empty' flag check should be at the begining of the list..<br></blockquote><div><br></div><div>No, because most compilers ignore the pragmas when no options are given. I do not know of any portable way, short of running code, to determine whether a compiler used the OpenMP pragmas or ignored them.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
[we do have other places in configure where we fix the order in which<br>
flags are checked - due to similar conflicts between compilers]<br>
<span class="HOEnZb"><font color="#888888"><br>
Satish<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, 29 May 2012, Jed Brown wrote:<br>
<br>
> The OpenMP flags do not definitively identify that OpenMP is used. In<br>
> particular, IBM XL interprets Cray's option "-h omp" as being equivalent to<br>
> "-soname omp", then silently ignores the Open MP pragmas. We can perhaps<br>
> "fix" this instance by moving -qsmp up in the list, but we may eventually<br>
> need to move it to compilerOptions.py.<br>
><br>
>   def configureLibrary(self):<br>
>     ''' Checks for -fopenmp compiler flag'''<br>
>     ''' Needs to check if OpenMP actually exists and works '''<br>
>     self.setCompilers.pushLanguage('C')<br>
>     #<br>
>     for flag in ["-fopenmp", # Gnu<br>
>                  "-h omp",   # Cray<br>
>                  "-mp",      # Portland Group<br>
>                  "-Qopenmp", # Intel windows<br>
>                  "-openmp",  # Intel<br>
>                  " ",        # Empty, if compiler automatically accepts<br>
> openmp<br>
>                  "-xopenmp", # Sun<br>
>                  "+Oopenmp", # HP<br>
>                  "-qsmp",    # IBM XL C/c++<br>
>                  "/openmp"   # Microsoft Visual Studio<br>
>                  ]:<br>
>       if self.setCompilers.checkCompilerFlag(flag):<br>
>         ompflag = flag<br>
>         break<br>
><br>
<br>
</div></div></blockquote></div><br>