- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just wondering, is there any actual difference between these 2 arguments from the compilers perspective?
-xavx
-march=corei7-avx
They both appear to do basically the same exact thing from what I can tell in the manual?
I'm running code on an i5-2400 which supports avx, so I'm trying to figure out which one would be best or if it even matters.
Thanks!
Morgan
-xavx
-march=corei7-avx
They both appear to do basically the same exact thing from what I can tell in the manual?
I'm running code on an i5-2400 which supports avx, so I'm trying to figure out which one would be best or if it even matters.
Thanks!
Morgan
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there is a difference. The -xavx version may do additional optimizations and will add a test for CPU type at the beginning of the program. If you know you will be running on an Intel processor, use the -x variant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On the other hand, -mavx or -march=corei7-avx (gfortran option for Sandy Bridge) work well, in my experience, so the main consideration may be whether you want a clear text message in case it's not recognized as an Intel AVX CPU.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page