Hi Frank,
We have compiled OpenSees in Linux Redhat Enterprise Ed. on 3 GHz, 64-bit processors. It compiles fine, however runs very slow (i.e. 4 times slower than in a 2 GHz, 32-bit Win32 machine). We suspect the Linux version may be a DEBUG version, however the DEBUG_FLAG in Makefile.def appears to be undefined.
Do you have any thoughts on how to optimize the Linux version so that it runs faster?
Thanks!!!! We appreciate your help.
Kathryn & Pedro
Compiler Optimizations in Linux Redhat Enterprise
Moderators: silvia, selimgunay, Moderators
Hi Frank!
The flags we are using are the default flags in makefile.def for Linux RedHat Enterprise Ed (shown below). The DEBUG_FLAG is not defined so I assumed it is blank. I notice that FFLAGS = -Wall. I imagine this will have an effect on the LAPACK, BLAS, etc libraries and therefore on the solution time. I'l try later using -O2 for these flags. I'll also try to use the precompiled versions of these libraries; available in the default RedHat distribution for 32 and 64 bit machines. Any other suggestion is welcome!!
C++FLAGS = -D_LINUX -D_UNIX -D_TCL84 -D_MYSQL $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) -funroll-loops -fcse-follow-jumps \
-fthread-jumps -fcse-skip-blocks -frerun-cse-after-loop \
-felide-constructors \
-fcaller-saves -ffloat-store -fforce-addr \
-fschedule-insns -fschedule-insns2 -D_LINUX -D_UNIX \
-fexpensive-optimizations \
-fforce-addr -fforce-mem -finline-functions \
-fkeep-inline-functions \
-fno-function-cse -fno-inline -fno-peephole \
-fomit-frame-pointer \
-fschedule-insns -fschedule-insns2 \
-fstrength-reduce -fthread-jumps
CFLAGS = -O2 $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic
The flags we are using are the default flags in makefile.def for Linux RedHat Enterprise Ed (shown below). The DEBUG_FLAG is not defined so I assumed it is blank. I notice that FFLAGS = -Wall. I imagine this will have an effect on the LAPACK, BLAS, etc libraries and therefore on the solution time. I'l try later using -O2 for these flags. I'll also try to use the precompiled versions of these libraries; available in the default RedHat distribution for 32 and 64 bit machines. Any other suggestion is welcome!!
C++FLAGS = -D_LINUX -D_UNIX -D_TCL84 -D_MYSQL $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) -funroll-loops -fcse-follow-jumps \
-fthread-jumps -fcse-skip-blocks -frerun-cse-after-loop \
-felide-constructors \
-fcaller-saves -ffloat-store -fforce-addr \
-fschedule-insns -fschedule-insns2 -D_LINUX -D_UNIX \
-fexpensive-optimizations \
-fforce-addr -fforce-mem -finline-functions \
-fkeep-inline-functions \
-fno-function-cse -fno-inline -fno-peephole \
-fomit-frame-pointer \
-fschedule-insns -fschedule-insns2 \
-fstrength-reduce -fthread-jumps
CFLAGS = -O2 $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic
Pedro, Kathryn,
i am running gcc version 4.0. ; here is what i am using at the moment:
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL84 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) \
$(PROGRAMMING_FLAG) -O3 -ffloat-store
CFLAGS = -Wall -O2
FFLAGS = -Wall -O
note: it will be faster w/o the -float-store option .. i was having problems with the steel material running w/o it .. but you can try .. as you can read from the gcc man it may have
an effect on results.
i am running gcc version 4.0. ; here is what i am using at the moment:
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL84 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) \
$(PROGRAMMING_FLAG) -O3 -ffloat-store
CFLAGS = -Wall -O2
FFLAGS = -Wall -O
note: it will be faster w/o the -float-store option .. i was having problems with the steel material running w/o it .. but you can try .. as you can read from the gcc man it may have
an effect on results.