LLNL / H5Z-ZFP

A registered ZFP compression plugin for HDF5
Other
50 stars 22 forks source link

Add cc, ftn compilers #96

Closed markcmiller86 closed 1 year ago

markcmiller86 commented 1 year ago

There is logic in config.make which controls vanilla GNU make builds that sets flags based on compiler name string. This update adds yet another set of cases for cc and ftn compiler names.

Based on notes from Weiqun Zhang @ lbl (I don't have GitHub handle).

markcmiller86 commented 1 year ago

Weiqun also mentions...

What I have added assumes that cc and ftn are wrappers around gcc and gfortran. But that's not always the case, because cc and ftn are provided by Cray and they could be using clang or other compilers depending on which PrgEnv-* is loaded. So I am not sure how reliable this is.

You can try cc --version | head -n 1 or you can check the return value of module is-loaded PrgEnv-gnu, PrgEnv-cray etc. In any case, I think it's probably a good idea to add an else block to catch unknown CC and FC. Currently, if one uses cc and ftn, it will silently fail to set some import flags including PREPATH (which is still missing the PR). One will then get an error message later that is much harder to decipher due to missing -Wl,-rpath,.

markcmiller86 commented 1 year ago

We need a more robust solution.