I am switching from one linux HPC system to another. I have noticed a big difference in performance with similar hardware. I was wondering whether it has something to do with compiler flags, could you let me know if it seems plausible
Fast old
rstan::get_cxxflags(model)
“CXXFLAGS = -02 -ftree-vectorize -march=native -fno-math-errno $(LTO)”
Slow new system
rstan::get_cxxflags(model)
“CXXFLAGS = -g -02 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g $(LTO)”
I wanted to try out whether -march=native was the key to success so I put it in ~/.R/Makevars like so
CXXFLAGS += -march=native -ftree-vectorize
and reloaded R, but RStan seems to have ignored this?