-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fixes #70
base: master
Are you sure you want to change the base?
Conversation
@@ -1,21 +1,25 @@ | |||
NUM_NODES = 10 | |||
WORLD_SIZE = 1000 | |||
|
|||
COMMON_CFLAGS = -g -std=gnu99 -O2 -mcpu=native -fomit-frame-pointer -Wall -Wextra | |||
COMMON_CFLAGS = -std=gnu99 -O2 -march=native -fomit-frame-pointer -Wall -Wextra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-march=native
is not equivalent to -mcpu=native
. It needs to be -march=native -mtune=native
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-march implies -mtune, see https://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/i386-and-x86_002d64-Options.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not documented to work like that in the GCC ARM docs. Also, the options accepted by -march are generic architectures, while the options accepted by -mtune are specific cores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But previously the makefile didn't even specify -mtune
. -march
at least implies -mcpu
.
@lgeek, I apologise for not making myself more clear. My intention with this pr was not to invest to much time in your LPathBench project. I just wanted to share the changes I needed to make it work well for me. Feel free to reject this pr, apply it or do whatever you want with it. Sorry, but I don't have either the time or the interest in working more on it. |
@bjourne Sorry if this is wasn't clear, but this is not my project. I just wrote the |
I think |
A few little compiler warnings cleanups and makefile improvements. I also think you should consider changing
-O2
to-O3
as that makes the c_fast benchmark much faster when compiled with clang. Clang in general beats gcc on my machine.