error in compilation with gfortran 5.4.0, -march=native


Click here for full thread
Clicked A Few Times
Dear all,

I compiled nwchem-6.3 on CentOS release 6.8, with gfortran-5.4.0, mpich2-1.5.
I got the following error message:




gfortran -c -m64 -ffast-math -fdefault-integer-8 -Warray-bounds -O3 -mfpmath=sse -ffast-math -fprefetch-loop-arrays -fno-aggressive-loop-optimizations -march=native -mtune=native -I. -I/export/home/ylniu/program/nwchem/nwchem-6.3-gfortran/src/include -I/export/home/ylniu/program/nwchem/nwchem-6.3-gfortran/src/tools/install/include -DGFORTRAN -DEXT_INT -DLINUX -DLINUX64 -DCHKUNDFLW -DGCC4 -DGCC46 -DPARALLEL_DIAG geom_hnd.F
/tmp/cctq1pa4.s: Assembler messages:
/tmp/cctq1pa4.s:358: Error: no such instruction: `vpbroadcastq %xmm6,%ymm0'
/tmp/cctq1pa4.s:359: Error: suffix or operands invalid for `vpaddq'
/tmp/cctq1pa4.s:373: Error: suffix or operands invalid for `vpaddq'
/tmp/cctq1pa4.s:693: Error: no such instruction: `vgatherqpd %ymm12,(%r8,%ymm2,8),%ymm3'
/tmp/cctq1pa4.s:695: Error: no such instruction: `vgatherqpd %ymm13,(%r8,%ymm10,8),%ymm2'
/tmp/cctq1pa4.s:707: Error: no such instruction: `vgatherqpd %ymm15,(%r8,%ymm3,8),%ymm2'




I found that when I delete "-march=native" option, there is no error output.

And I found that in the file: src/config/makefile.h
1987 ifeq ($(GNU_GE_4_6),true)
1988 FOPTIMIZE += -march=native -mtune=native
1989 else

I searched the option of gfortran compiler:
http://www.linuxcommand.org/man_pages/gfortran1.html
      gfortran [-c?-S?-E]
[-g] [-pg] [-Olevel]
[-Wwarn...] [-pedantic]
[-Idir...] [-Ldir...]
[-Dmacro[=defn]...] [-Umacro]
[-foption...] [-mmachine-option...]
[-o outfile] infile...

So, my question is:
What does "-march=native -mtune=native" mean? Is it necessary to keep this option? Can I delete this option for the whole compilation?