Reputation: 11
when I use ifx to link object which is generate by icx, it report some error.as follows
ifx -O3 -ffast-math -nofor-main -DSPEC_CPU_LP64 flincs.o fsettle.fppized.o fshake.o innerf.o flincsd.o fsettled.fppized.o fshaked.o 3dview.o atomprop.o binio.o block_tx.o bondfree.o buffer.o calcgrid.o calch.o calcmu.o calcvir.o clincs.o comlib.o confio.o constr.o copyrite.o coupling.o csettle.o disre.o do_fit.o do_gct.o dummies.o ebin.o edsam.o enxio.o ewald.o ewald_util.o f77_wrappers.o fatal.o ffscanf.o fftgrid.o filenm.o fnbf.o force.o futil.o gbutil.o gctio.o genalg.o ghat.o glaasje.o gmx_system_xdr.o gmxfio.o ifunc.o index.o init.o init_sh.o innerc.o invblock.o ionize.o libxdrf.o macros.o main.o maths.o matio.o md.o mdatom.o mdebin.o mdrun.o memdump.o minimize.o mshift.o mvdata.o mvxvf.o names.o network.o nrama.o nrjac.o nrnb.o ns.o nsb.o nsgrid.o orires.o pargs.o pbc.o pdbio.o pme.o poisson.o pppm.o princ.o psgather.o pssolve.o psspread.o pull.o pullinit.o pullio.o pullutil.o rando.o random.o rbin.o rdgroup.o readinp.o relax_sh.o replace.o rmpbc.o shakef.o shift_util.o sim_util.o smalloc.o sortwater.o splittop.o stat.o statutil.o strdb.o string2.o symtab.o synclib.o tables.o tgroup.o tpxio.o trnio.o trxio.o txtdump.o typedefs.o update.o vcm.o vec.o viewit.o wgms.o wman.o wnblist.o writeps.o xdrd.o xtcio.o xutils.o xvgr.o -lm -o gromacs
3dview.o: file not recognized: file format not recognized
I find the object generate by icx is not ELF Format.
root@lanlanxiyiji-PC:/home/speccpu2006-v1.0.1/benchspec/CPU2006/400.perlbench/run/build_base_x86_64_linux.0000# icx -c -o 3dview.o -DSPEC_CPU -DNDEBUG -DPERL_CORE -std=gnu89 -flto -O3 -ffast-math -funroll-loops -fomit-frame-pointer -ftree-vectorize -fprefetch-loop-arrays -DSPEC_CPU_LP64 -DSPEC_CPU_LINUX_X64 -include math.h -fno-strict-aliasing 3dview.c
icx: warning: optimization flag '-fprefetch-loop-arrays' is not supported [-Wignored-optimization-argument]
root@lanlanxiyiji-PC:/home/speccpu2006-v1.0.1/benchspec/CPU2006/400.perlbench/run/build_base_x86_64_linux.0000# readelf -h 3dview.o
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
icx version
Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0 (2023.0.0.20221201)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm
Configuration file: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/../bin/icx.cfg
Upvotes: 0
Views: 500
Reputation: 11
I have found the result. Because compile with -flto will not generate the object which use the ELF format. I add -flto with ifx to fix that. it works.
Upvotes: 1