-fast option with graphics libraries

-fast option with graphics libraries


I have two questions about -fast option.

1- Although , in my code, returns around %20 performance increase -fast option makes compile time really long. Usually around 20 minutes.

I can live with that but is it normal? Is there any tricks at the coding level to decrease compile time?

2- In my project I am trying to use DISLIN package which requires X11 and OpenGL libraries. I have successfully linked using

-L/usr/lib64/ -lX11 -lGL .

With this link I can compile &run my code if I use -O3 optimization level. However if I try to use -fast option compiler returns with

cannot find -lX11. I don't want to sacrifice with -fast option but also want to use DISLIN package.


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

-fast is a short way of selecting several options that generally improve performance, but usually at the expense of compile time. Principal among these are -O3 and -ipo.

What does your makefile look like? What command is used for linking?

Retired 12/31/2016

Regarding (2):  Since -fast implies too "-static", the linker will look for the static version of the X11 library ( libX1.a); very likely you only have the shared library libX11.so and thus you see the link failure.

As Steve mentioned already, -fast is an alias for a set of options. See the compiler manual for the specific details for your compiler. For the latest one (13.0) it is "-ipo -O3 -no-prec-div -static -XHost".  You can use these switches explicitly without "-static" then

Leave a Comment

Please sign in to add a comment. Not a member? Join today