* [sisyphus] Оптимизация gcc под процессоры
@ 2013-12-16 9:33 Sergei Epiphanov
0 siblings, 0 replies; only message in thread
From: Sergei Epiphanov @ 2013-12-16 9:33 UTC (permalink / raw)
To: sisyphus
Года 3 назад при сборке программ через gcc я начал использовать параметр
-march=prescott
Тогда получил хорошее ускорение. Сейчас же этот параметр почему-то начал
мутить воду. Программа на Фортране (кусок, test.f90)
program test
real t
integer n
t=5.005
n=INT(t)
write(*,*)n
end program test
При сборке никаких проблем нет. Параметры сборки:
MAIN_FF_OPTS:=-O2 -pedantic -Wall -fno-automatic -funroll-all-loops -
march=prescott -ffast-math
MAIN_C_OPTS:=-std=gnu99 -O2 -pedantic -Wall -funroll-all-loops -march=prescott
-ffast-math
LIBS_OPTS:=-lpthread -lncurses -lrt
DEBUG_OPT_FIXED:=$(MAIN_FF_OPTS)
DEBUG_OPT_FREE:=$(MAIN_FF_OPTS) -ffree-form -ffree-line-length-none
test: test.o
gfortran $(DEBUG_OPT_FIXED) -o $@ $^ $(LIBS_OPTS)
%.o: %.f90
gfortran $(DEBUG_OPT_FREE) -c -o $@ $<
При запуске программа падает на строке 'n=INT(t)' по сигналу SIGILL с трейсом
стека. Если вместо t поставить 5.005, то всё работает как надо.
Компилятор gcc4.7-4.7.2-alt7, других компиляторов не стоит. Убрал
-march=prescott
и проблема решилась. Поиск мало чего дал, кроме как рекомендацию не
использовать этот параметр для процессоров Intel (начиная с версии 4.5). Что-
то слышно ещё про этот параметр?
--
С уважением, Епифанов Сергей
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-16 9:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 9:33 [sisyphus] Оптимизация gcc под процессоры Sergei Epiphanov
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git