Compiler Flag -fast

512 views
Skip to first unread message

dundar yilmaz

unread,
Jan 7, 2013, 10:50:37 PM1/7/13
to dislin...@googlegroups.com
Hi,
I want to use dislin libraries with my project. I successfully compiled my code by linking libraries.
However when I want to use -fast flag (processor dependent optimization for intel) it gives a linker error.
Which optimization level used to create dislin libraries? Can I recompile it from source code (if available) with
-fast flag ?
dundar.

Helmut Michels

unread,
Jan 8, 2013, 3:32:07 AM1/8/13
to dislin...@googlegroups.com
Hi Dundar,

The Dislin libraries for Intel Fortran are compiled on Linux with gcc and the optimization option -O2,
on Windows with ifort and MS Visual C++ with the option -Ox. The ifort option -fast should work on
Linux, but not on Windows. The -fast option contains the option /Qipo for interprocedural optimizations
between files, which is not compatible to the Dislin libraries for Intel Fortran on Windows. You have to
use the option -Ox or -O3 instead of -fast, or to disable the option /Qipo.

Best regards,

Helmut


 

Dundar Yilmaz

unread,
Jan 8, 2013, 9:22:31 PM1/8/13
to dislin...@googlegroups.com
Hi Helmut
When I compile with -fast flag ifort on a linux machine I got these warnings:
ipo: warning #11021: unresolved glReadBuffer
        Referenced in libdislin.a(qqwini.o)
ipo: warning #11021: unresolved glClearColor
        Referenced in libdislin.a(qqwini.o)
ipo: warning #11021: unresolved XMapWindow
        Referenced in libdislin.a(qqwini.o)

and the compiler crashes.
dundar.

Dundar Yilmaz

unread,
Jan 9, 2013, 12:11:30 AM1/9/13
to dislin...@googlegroups.com
Hi,
I have another problem but this is kinda different than the previous one.
My code is running on a node of a cluster system. It is not possible to share DISLIN libraries with nodes. Thus I need 
to compile it with static libraries instead of shared.
In my source code folder
SRC/
   DISLIN/ dislin installed here
   Version_007/ main source code here
So to compile I use the following make file (trimmed out unrelavant parts :


 fcc = ifort
### fcc = /opt/intel/Compiler/11.1/072/bin/intel64/ifort
 SUFFX= -c 
 FLAGS= -O3 -finline-limit=100 -inline-forceinline  -unroll=30  -openmp 
 
 FLAGDEBUG= -debug
#-check all -traceback
 suffix=-c $(FLAGS)
#-O3  -debug -g ## -vec-report2  ##-parallel -par-report2
 version= _007
 mkllibs=-L~/opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/ \
         -liomp5 -lpthread ##-lmkl_intel_thread -lmkl_intel_lp64
 Charpak=-L./ charpak_lib.a dislin-10.2.a
 DISLININC=-I../DISLIN/ifc/
 objects = mathlibs.o structures_module.o smtables_module.o    \
           main.o global_variables.o parameters_module.o \
           elementmap_module.o energy_module.o opt_parent_module.o \
           opt_simplexb_module.o cost_functions_module.o mask_module.o\
           analysis_module.o user_interface_module.o opt_montecarlo_module.o graphics.o
#para_type.o types.o enforcefunctions.o inout.o \
           initializers.o analysis.o opt.o main.o 
#enforce.o  analysis.o  inout.o main.o \
                md.o opt.o tests.o initializers.o
EXE=oops
EXE_debug=oops_debug
EXEFLAG=  $(FLAGS) -o 
#debug: FLAGS +=-g -debug
#debug: $(EXE)
DATE            =`date `
all:$(EXE)
$(EXE):$(objects)
        $(fcc) $(EXEFLAG) $@ $(objects) $(mkllibs) $(Charpak) $(DISLININC)
        cp oops ../../Test


 graphics.o :parameters_module.o graphics_module$(version).f90
        $(fcc) $(suffix) $(DISLININC) graphics_module$(version).f90 -o graphics.o





and I use 
------
use dislin
-------

statement at graphics module.
Receive the following type of errors
qw_unx.c:(.text+0x134ed): undefined reference to `XAllocColorCells'
dislin-10.2.a(qqwini.o): In function `qqwini':
qqw_unx.c:(.text+0x135fe): undefined reference to `XOpenDisplay'
qqw_unx.c:(.text+0x13612): undefined reference to `XVendorRelease'
qqw_unx.c:(.text+0x13631): undefined reference to `XDefaultScreenOfDisplay'
qqw_unx.c:(.text+0x1363d): undefined reference to `XDefaultScreen'



I think I am not linking libraries properly.
Any idea what I am doing wrong?

dundar

On Jan 8, 2013, at 3:32 AM, Helmut Michels wrote:

Helmut Michels

unread,
Jan 9, 2013, 2:48:08 AM1/9/13
to dislin...@googlegroups.com
Hi Dundar,


When I compile with -fast flag ifort on a linux machine I got these warnings:
ipo: warning #11021: unresolved glReadBuffer
        Referenced in libdislin.a(qqwini.o)
ipo: warning #11021: unresolved glClearColor
        Referenced in libdislin.a(qqwini.o)
ipo: warning #11021: unresolved XMapWindow
        Referenced in libdislin.a(qqwini.o)

and the compiler crashes.
dundar.


it seems that you have forgotten to link with the X11 and OpenGL libraries, which are
necessary if you are linking with the static library of Dislin. The following was working
for me with ifort 11.1 on a SUSE 64-bit system:

      ifort -c -fast -I$DISLIN/ifc  exa_f90.f90
      ifort exa_f90.o  -L$DISLIN -ldislin                  linking with the shareable Dislin library

or
      ifort -c -fast -I$DISLIN/ifc  exa_f90.f90
      ifort exa_f90.o $DISLIN/libdislin.a -L/usr/X11R6/lib64 -lGL -lXm -lXt -lX11

for linking with the static library of Dislin.

Best regards,

Helmut

Reply all
Reply to author
Forward
0 new messages