- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am working on an application, where we can specify all the compiler flags, floating point models (eg -fp-model source etc.) etc, in the Macros file.
In the code, I am offloading a certain section to the Xeon Phi. Is it possible to use a different floating point model for this computation on Xeon Phi?
For example, say the Macros file has the flag -fp-model source, and I want to use -fp-model fast=2 -fimf-precision=high for the computation on Xeon Phi.
Thanks,
Amlesh
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In most cases, you can choose different values of those settings for each compilation. It seems entirely normal to set -fp-model source for Xeon host and more aggressive settings for Xeon Phi.
I prefer more specific groups of options than -fp-model fast=2, but if you recognize all the consequences, including the implied -complex-limited-range, this should be OK. I have used -fp-model source -fno-prec-div -imf-domain-exclusion=common
and now I might try -fp-model fast=1 -fprotect-parens -imf-domain-exclusion=....
but I suspect -fprotect-parens may still prevent optimization of inner_product and the like.
A few implications of -fp-model fast (e.g. -ftz) apply only in a main program and you may want to check whether they have effect on MIC. If you happened to send denormals over from host it might be bad to have excluded correct handling on MIC by -fp-model-fast=2 or -imf-domain-exclusion. Note the warning against setting -fast-transcendentals (included in -fp-model fast) together with -fp-model strict.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tim,
In the application I am working, we can check the error growth over timesteps. Using fp-model fast=2 if fine.
Can you please also suggest how do I set different floating model for the Xeon Phi execution?
Thanks,
Amlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To pass different options for Xeon Phi compilation use
-qoffload-option,mic,compiler,”-fp-model fast –fimf-precision=high”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ravi.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page