All, I'm currently a bit confused and I'm hoping the gfortran gurus can help.
To wit, I have a code on a system with both AMD EPYC (Milan) and Intel Cascade Lake nodes. The code in question I build on the Milans with either our "Release" flags: Fortran_FLAGS = -O3 -march=znver2 -mtune=generic -funroll-loops -g -ffree-line-length-none -fno-range-check -Wno-missing-include-dirs -fbacktrace -Wno-unused-dummy-argument -ffpe-trap=zero,overflow -fbacktrace -fallow-argument-mismatch -fallow-invalid-boz -falign-commons -fPIC -pthread -pthread -fopenmp or our "Aggressive" flags: Fortran_FLAGS = -O2 -march=native -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mno-fma -ffree-line-length-none -fno-range-check -Wno-missing-include-dirs -fbacktrace -Wno-unused-dummy-argument -g -fbacktrace -fallow-argument-mismatch -fallow-invalid-boz -falign-commons -fPIC -pthread -pthread -fopenmp The thing I'm a bit flummoxed by is that in both cases, a code built on AMD Milan is running on Intel Cascade Lake. I can sort of see how "-march=znver2 -mtune=generic" could maybe be clamping down instructions enough to make it boring enough to run on both, but how is "-march=native" doing that? Am I just very incorrect about how -march/-mtune work? Or am I just incredibly lucky this code seems to be portable (i.e., my code just doesn't get compiled with AMD-only instructions). (Note: even more odd, the AMD and Intel runs with Release are zero-diff as well. That sort of surprised me.) Thanks, Matt [signature_2578197698]<http://www.ssaihq.com/> Matt Thompson Lead Scientific Software Engineer/Supervisor Global Modeling and Assimilation Office Science Systems and Applications, Inc. Code 610.1, 8800 Greenbelt Rd, Greenbelt, MD 20771 o: 301-614-6712 matthew.thomp...@nasa.gov<mailto:matthew.thomp...@nasa.gov>