SmeeBobFred
Technical User
Hi,
I've been trying to optimise some FORTRAN code and I've managed to make it about 4 times quicker (largely due to the -O3 switch in g95). I've been trying to use the -march switch to possibly optimise further but nothing I set it equal to is recognised. This is my basic compile command:
g95 -o "test.exe" "master.f95" "parameters.f95" -O3 -ftree-vectorize -funroll-loops
I've tried adding all of these (I have a Core i7-920):
-march=native
-march=corei7
-march=core2
-march=x86-64
but ALL of them give me the following error (with "native" replaced with whatever I've specified):
error: bad value (native) for -march= switch
error: bad value (native) for -mtune= switch
The only one I've found that DOES work is -march=i386 but presumably this is the default value since it changes nothing.
Does anyone have any idea why this doesn't work? I've tried using both the "stable" and "snapshot" versions of g95 (MinGW), both are the same.
I've been trying to optimise some FORTRAN code and I've managed to make it about 4 times quicker (largely due to the -O3 switch in g95). I've been trying to use the -march switch to possibly optimise further but nothing I set it equal to is recognised. This is my basic compile command:
g95 -o "test.exe" "master.f95" "parameters.f95" -O3 -ftree-vectorize -funroll-loops
I've tried adding all of these (I have a Core i7-920):
-march=native
-march=corei7
-march=core2
-march=x86-64
but ALL of them give me the following error (with "native" replaced with whatever I've specified):
error: bad value (native) for -march= switch
error: bad value (native) for -mtune= switch
The only one I've found that DOES work is -march=i386 but presumably this is the default value since it changes nothing.
Does anyone have any idea why this doesn't work? I've tried using both the "stable" and "snapshot" versions of g95 (MinGW), both are the same.