- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I can compile fortran programs with ifort 9.0 but they can not be linked.
My platform is an Intel@Xenon@ dual em64t and the operating system is RedHat Enterprise 4.0-U1
I try to compile some fortran programs and link them with Intel mkl 8.0. These are my settings
Compiler options:
-FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML
Linker Flags:
-L/opt/intel/fce/9.0/lib -L/opt/intel/mkl/8.0/lib/em64t -Vaxlib -static-libcxa -pthread
Preprocessor flags
'-DParallel'
R_LIB (MKL LIBRARIES):
-lmkl_lapack -lmkl_em64t -lguide
The next is a sample but I ve got it for all programs. Moreover, the error is the same (during the link procedure)....
ifort -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -c symmetso.f
.
. (all the rest of F90 programs)
.
ifort -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -c volofb.f
NO ERRORS SO, ALL OF THEM ARE COMPILED BUT STILL NOT LINKED (because option -c).
NOW THE LINK, such us works with others previous linux kernels.
ifort -o ./symmetso -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML symmetso.o (all the rest of F90 programs compiled, *.o) volofb.o -L/opt/intel/fce/9.0/lib -L/opt/intel/mkl/8.0/lib/em64t -Vaxlib -static-libcxa -pthread
ld: option `--sort-section' not recognized
ld: use option --help for more information
make: *** [symmetso] Error 1
SEEMS LIKE THE LD-LINKER OF REDHAT ENTERPRISE 4 DOES NOT MATCH WITH THE INTEL FORTRAN COMPILER INSTRUCTIONS-TO-LINK.
OR LD-LINKER OF REDHAT ENTERPRISE 4 HAVE TO BE CONFIGURATED FOR INTEL FORTRAN COMPILER AND MKL LIBS (I do not know how)
Someone can say something about my bash.profile.
.... here you are the file for any comment:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:/opt/intel/mkl/8.0/lib/em64t:/opt/intel/fce/9.0/lib:/opt/intel/cce/9.0/lib:/opt/intel/cce/9.0/bin:/opt/intel/fce/9.0/bin
export PATH
# set up environment for mkl libs in LD_LIBRARY_PATH
LD_LIBRARY_PATH=/opt/intel/mkl/8.0/lib/em64t:/opt/intel/fce/9.0/lib:/opt/intel/cce/9.0/lib
export LD_LIBRARY_PATH
# On Red Hat* Enterprise Linux, in order to ensure that the
# correct
# support libraries are linked, the environment variable
# LD_ASSUME_KERNEL must be set
export LD_ASSUME_KERNEL=2.6.11
unset USERNAME
or something about ld.so.conf and *.conf in /etc/ld.so.conf.d
...... here you are the file for any comment:
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/X11R6/lib64
/opt/intel/mkl/8.0/lib/em64t
/opt/intel/fce/9.0/lib
No idea about what is going wrong, my conclusion is the actual INTEL compilers can not work in RHE4_WS. Is it true?
Thanks in advance.
Cesar
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
on Itanium applying to EM64T as well. Your problem doesn't appear
to be associated with ld bugs. Could you try running the link step
with documented options, and report more details of what happens, if there is
still a problem?
I don't know if -Vaxlib has any effect for ifort 9.0. I don't know what -pthread
would do. I don't see how it could be interpreted as -lpthread, if that is
intended, nor can I see in what order you are trying to link libraries.
I don't see that you are posing a problem which would be different on EL4 from
another version of linux.
You don't accomplish anything by putting /lib/ directories in PATH. Normally, you
would put the compilers you want used at the beginning of PATH, but you can find out
by 'ifort -V' whether you are getting the intended one.
What are you doing with -DINTEL_VML? The documented way to make libsvml calls from
ifort is to encourage ifort to vectorize, e.g. by passing -xW option, both in compile
and link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Frist of all, I m not a developer software, just a simple and quite limited user.
But follow your comments as close as I could.
I can say you that all the options I ve included are normally used by other people
in other platforms but noone of them use RedHat Enterprise 4
(I know at least one person that can work fine in RedHat Enterprise 3
using the arch x86_64 with 2 processors).
Your comments about most of the compiler options used are quite usefull.
After reading the ifort manual I found that some of the can be modified clearly, others have no sense.
Even though I have same the problem.
To ilustrate you, I used a much more easy example where the problem is about the same.
I build the next program (not uses any mkl library):
PROGRAM TEST1
INTEGER SUM, INC
DATA SUM/-1/, INC/1/
CALL ANY(SUM,INC)
WRITE(*,*) 'SUM=',SUM
PAUSE
STOP
END
SUBROUTINE ANY(SUM,INC)
INTEGER SUM,INC
DO I=1,5,INC
SUM=SUM+I
END DO
RETURN
END
It should be fine compiled by ifort.
So, I ve tried the next commands, more or less in the same style as
showed in the frist message:
ifort -O1 -c test1.f (it is ok, so it is compiled but not linked)
but ....
ifort -o test1 test1.o
ld: option `--sort-section' not recognised
ld: use option --help for information
Moreover, I ve tried to see if ifort does not pass
the correct parameters to ld-linker and that is the different result.
ld -o outtest test1.o
ld: aviso: no se puede encontrar el smbolo de entrada _start;
usando por omisin 00000000004000e8 (more or less it say that
"ld: warn: can not find the incoming symbol _start;
used by default 00000000004000e8")
test1.o(.text+0x9): En la funcin `MAIN__':
: undefined reference to `__intel_proc_init'
test1.o(.text+0x24): En la funcin `MAIN__':
: undefined reference to `for_set_reentrancy'
test1.o(.text+0x70): En la funcin `MAIN__':
: undefined reference to `for_write_seq_lis'
test1.o(.text+0x8d): En la funcin `MAIN__':
: undefined reference to `for_write_seq_lis_xmit'
test1.o(.text+0x9b): En la funcin `MAIN__':
: undefined reference to `for_pause'
test1.o(.text+0xb3): En la funcin `MAIN__':
: undefined reference to `for_stop_core'
Maybe I doing something wrong ???? but using this easy program i m having the same problem!.
Thanks in advance for your comments.
Cesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried your example with ifort 9.0.028, and it runs without problem, even though some would think it a contradiction to mix f90 free form source with redefinition of f90 intrinsic names.
Do you have some environment variable set, or some alias, which is causing ld to get unexpected arguments?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No I do not think so.
I ve just set LD_LIBRARY_PATH and LD_KERNEL_ASSUME as environment variable, after re-installing RedHat Enterprise WS 4 (sp1), and of course, Intel fortran (9.0), cpp (9.0) compilers and the mkl libs (8.0).
To ilustrate you....
...this is the bash profile where I only set the PATH and
the LD_LIBRARY_PATH and LD_KERNEL_ASSUME
[cesar@smc2 test_fortran]$ set
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="00" [2]="15" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu")
BASH_VERSION='3.00.15(1)-release'
COLORS=/etc/DIR_COLORS.xterm
COLORTERM=gnome-terminal
COLUMNS=80
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ky13wlfpnC
DESKTOP_SESSION=default
DIRSTACK=()
DISPLAY=:0.0
EUID=500
GDMSESSION=default
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/tmp/keyring-USA0Bd/socket
GROUPS=()
GTK_RC_FILES=/etc/gtk/gtkrc:/home/cesar/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=1
HISTFILE=/home/cesar/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/home/cesar
HOSTNAME=smc2.cps.unizar.es
HOSTTYPE=x86_64
IFS=$' '
INPUTRC=/etc/inputrc
KDEDIR=/usr
LANG=es_ES.UTF-8
LD_KERNEL_ASSUME=2.6.11
LD_LIBRARY_PATH=/opt/intel/mkl/8.0/lib/em64t:/opt/intel/fce/9.0/lib:/opt/intel/cce/9.0/lib
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=cesar
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=x86_64-redhat-linux-gnu
MAIL=/var/spool/mail/cesar
MAILCHECK=60
OLDPWD=/home/cesar
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/cesar/bin:/opt/intel/fce/9.0/bin:/opt/intel/cce/9.0/bin
PIPESTATUS=([0]="0")
PPID=10153
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}07"'
PS1='[u@h W]$ '
PS2='> '
PS4='+ '
PWD=/home/cesar/test_fortran
QTDIR=/usr/lib64/qt-3.3
SESSION_MANAGER=local/smc2.cps.unizar.es:/tmp/.ICE-unix/10012
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=10040
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-EvOvX10039/agent.10039
SUPPORTED=es_ES.UTF-8:es_ES:es
TERM=xterm
UID=500
USER=cesar
WINDOWID=37748815
XAUTHORITY=/home/cesar/.Xauthority
_=test1.o
[cesar@smc2 test_fortran]$ ifort -O1 -c test1.f
[cesar@smc2 test_fortran]$ ifort -o outtest test1.o
ld: opcin `--sort-section' no reconocida
ld: use la opcin --help para informacin de modo de empleo
To show you...
this is the parameters s end by my ifort to my ld by using the option -# you mentioned before.
Maybe you could find something wrong
[cesar@smc2 test_fortran]$ ifort -o outtest -# test1.o
/opt/intel/fce/9.0/bin/fortcom
-mP1OPT_version=900
-mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90
-mGLOB_tune_for_fort
-mGLOB_use_fort_dope_vector
-mP2OPT_static_promotion
-mP1OPT_print_version=FALSE
-mP3OPT_use_mspp_call_convention
-mCG_use_gas_got_workaround=F
-mP2OPT_align_option_used=TRUE
"-mGLOB_options_string=-o outtest -#"
-mGLOB_cxx_limited_range=FALSE
-mGLOB_as_output_backup_file_name=/tmp/ifortkBx8nsas_
-mGLOB_lp64
-mGLOB_machine_model=GLOB_MACHINE_MODEL_EFI2
-mP3OPT_honor_float_conversion=1
-mP3OPT_honor_double_conversion=1
-mP2OPT_subs_out_of_bound=FALSE
-mIPOPT_args_in_regs=0
-mPGOPTI_value_profile_use=T
-mIPOPT_activate
-mP2OPT_hlo_level=2
-mP2OPT_hlo
-mIPOPT_link
-mIPOPT_ipo_activate
-mIPOPT_whole_program
-mIPOPT_ipo_mo_activate
-mIPOPT_ipo_mo_nfiles=1
-mIPOPT_source_files_list=/tmp/ifortMfVBRklst
-mIPOPT_link_script_file=/tmp/ifortZDpj2Hscript
-mIPOPT_global_data
"-mIPOPT_link_version=versin 2.15.92.0.2 20040927"
-mIPOPT_cmdline_objs="test1.o"
"-mIPOPT_cmdline_link="/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crt1.o" "/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crti.o" "/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtbegin.o" "--eh-frame-hdr" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "outtest" "/opt/intel/fce/9.0/lib/for_main.o" "test1.o" "-L/opt/intel/fce/9.0/lib" "-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/" "-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64" "-Bstatic" "-lsvml" "-lifport" "-lifcore" "-Bdynamic" "-limf" "-lm" "-Bstatic" "-lirc" "-Bdynamic" "-lgcc_s" "-lgcc" "-Bdynamic" "-lc" "-lgcc_s" "-lgcc" "-Bstatic" "-lirc_s" "/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtend.o" "/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crtn.o""
-mIPOPT_save_il0
-mIPOPT_il_in_obj
-mIPOPT_link_silent
-mIPOPT_obj_output_file_name=/tmp/ipo_ifortQcnfwA.o
"-mGLOB_linker_version=versin 2.15.92.0.2 20040927"
-mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS
-mGLOB_obj_output_file=/tmp/ipo_ifortQcnfwA.o
-mP1OPT_source_file_name=/tmp/ipo_ifortQcnfwA.f
test1.o
-mIPOPT_object_files=/tmp/ifortBofVGXtxt
ifort: warning: couldn't open multi-file optimizations object list
ld
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtbegin.o
--eh-frame-hdr
-dynamic-linker
/lib64/ld-linux-x86-64.so.2
-o
outtest
/opt/intel/fce/9.0/lib/for_main.o
-L/opt/intel/fce/9.0/lib
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64
-Bsta tic
-lsvml
-lifport
-lifcore
-Bdynamic
-limf
-lm
-Bstatic
-lirc
-Bdynamic
-lgcc_s
-lgcc
-Bdynamic
-lc
-lgcc_s
-lgcc
-Bstatic
-lirc_s
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crtn.o
--sort-section (>>>>>>>>>>>>THIS IS A WRONG OPTION FOR LD)
name
rm /tmp/ifortBofVGXtxt
rm /tmp/ifortMfVBRklst
rm /tmp/ifortZDpj2Hscript
rm /tmp/ipo_ifortQcnfwA.o
rm /tmp/iforteTO1c5gas
rm /tmp/ifortkBx8nsas_
rm /tmp/ifort1XehzPld
rm /tmp/ifortyvr3Lcarg
Message Edited by cesarzinn on 12-13-2005 09:12 AM
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page