[petsc-dev] OpenMP compiler options

Jed Brown jedbrown at mcs.anl.gov
Tue May 29 10:52:12 CDT 2012


The OpenMP flags do not definitively identify that OpenMP is used. In
particular, IBM XL interprets Cray's option "-h omp" as being equivalent to
"-soname omp", then silently ignores the Open MP pragmas. We can perhaps
"fix" this instance by moving -qsmp up in the list, but we may eventually
need to move it to compilerOptions.py.

  def configureLibrary(self):
    ''' Checks for -fopenmp compiler flag'''
    ''' Needs to check if OpenMP actually exists and works '''
    self.setCompilers.pushLanguage('C')
    #
    for flag in ["-fopenmp", # Gnu
                 "-h omp",   # Cray
                 "-mp",      # Portland Group
                 "-Qopenmp", # Intel windows
                 "-openmp",  # Intel
                 " ",        # Empty, if compiler automatically accepts
openmp
                 "-xopenmp", # Sun
                 "+Oopenmp", # HP
                 "-qsmp",    # IBM XL C/c++
                 "/openmp"   # Microsoft Visual Studio
                 ]:
      if self.setCompilers.checkCompilerFlag(flag):
        ompflag = flag
        break
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120529/cbdc2b8c/attachment.html>


More information about the petsc-dev mailing list