PRUNERS / FLiT

A project to quickly detect discrepancies in floating point computation across hardware, compilers, libraries and software.
Other
36 stars 6 forks source link

Issue125 compiler specific flags #301

Closed mikebentley15 closed 4 years ago

mikebentley15 commented 4 years ago

Fixes #125

Description: We wanted a way to specify compiler flags specific to only one of the compilers and not all of them. In this pull request, I added two settings for each compiler in the flit-config.toml file.

Currently, these are tied to the compiler type instead of the compiler name, and therefore we still only support one of each supported compiler types. We hope to change that with issue #40.

The flags placed into these two settings get put into the generated Makefile. For a gcc type compiler, these variables are GCC_CXXFLAGS and GCC_LDFLAGS respectively.

Question Do we want to remove the automatic insertion of the --gcc-toolchain flag for Clang compilers? Now that it is documented, we could expect users to specify that flag. Currently, if the user wants to specify a different libstdc++ version to use than the GCC compiler specified in flit-config.toml, then there is no clear way to do that.

However, if we were to do such a change, we could potentially break backward functionality compatibility and cause successful uses of flit to no longer work without fixing flit-config.toml. Also, it may make FLiT harder to use since you now have to worry about which standard library your Clang and Intel compilers are using. Granted, I think it's helpful to understand what's going on, I also understand many people don't have the time for that.

@IanBriggs what do you think? Should we remove it and expect the user to be more explicit and hope s/he reads the manual? Or should we keep it for ease of use and for backward compatibility? I really don't like that there is no way to change the automatically inserted --gcc-toolchain flag.

Documentation:

Tests: I added two test cases

IanBriggs commented 4 years ago

I say we should break backwards compatibility in this case. It should be safe to assume that users wanting to mix compilers should know how, and if they don't we have documentation.

mikebentley15 commented 4 years ago

Thanks for the input. I agree. Besides, if we have any users besides us, I don't know about them...

mikebentley15 commented 4 years ago

I've removed the insertion of the --gcc-toolchain flag from the generated Makefile and updated documentation accordingly. I also updated tests for this change.