Software Archive
Read-only legacy content
17061 Discussions

Offload compile File in wrong format

chenxu_w_
Beginner
211 Views

When i compile my codes with the following instructions,it will occur such problem.

#!/bin/bash
OP="-fomit-frame-pointer -O3 -funroll-loops -W -Wall -DARCH_INTEL64 -mavx -fopenmp"
#OPT="-DPARAM_OPT -DPOW_OPT -DCYG_OFFLOAD -DCYG_REACTION_OFFLOAD  -DCYG_MARCH_OFFLOAD -DNO_OUTPUT -fomit-frame-pointer -O2 -funroll-loops -DARCH_INTEL64 -fopenmp"
#OPT="-O3 -fopenmp"
source /WORK/app/osenv/ln1/set2.sh
#source /opt/intel/composer_xe_2013_sp1.2.144/bin/ifortvars.sh intel64
rm -rf *.o *.a ForestPose.exe
#module load gcc/4.9.2 
mpic++ $OPT -c meanshift.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
mpic++ $OPT -c CRTree.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
mpic++ $OPT -c ForestPose.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
mpic++ $OPT -c CRTree_mpi.cpp 
mpic++ $OPT *.o -o ForestPose.exe `pkg-config --cflags --libs gtk+-2.0`  -L/WORK/app/opencv/3.0.0/lib -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -Wl,-rpath-link /WORK/app/libgphoto2/2.5.8/lib

problem:

ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ld: ForestPoseMIC.o: Relocations in generic ELF (EM: 181)
ForestPoseMIC.o: could not read symbols: File in wrong format

 I change the way of compile.when I run, another problem occurs.

instrutions:

#!/bin/bash
#OP="-fomit-frame-pointer -O3 -funroll-loops -W -Wall -DARCH_INTEL64 -mavx -fopenmp"
OPT="-fomit-frame-pointer -O2 -funroll-loops -DARCH_INTEL64 -fopenmp -W -Wall  -g"
#OPT="-O3 -fopenmp"
source /WORK/app/osenv/ln1/set2.sh
rm -rf *.o *.a ForestPose.exe
#module load gcc/4.9.2 
/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared -c meanshift.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared -c CRTree.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared -c ForestPose.cpp `pkg-config --cflags --libs gtk+-2.0` -I/WORK/app/opencv/3.0.0/include
/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared -c CRTree_mpi.cpp 
xiar -qoffload-build rcs libCRTree.a meanshift.o CRTree.o ForestPose.o
/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared CRTree_mpi.o -o ForestPose.exe libCRTreeMIC.a libCRTree.a `pkg-config --cflags --libs gtk+-2.0`  -L/WORK/app/opencv/3.0.0/lib -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -Wl,-rpath-link /WORK/app/libgphoto2/2.5.8/lib
#/usr/local/mpi3-dynamic/bin/mpic++ $OPT -shared CRTree_mpi.o -o ForestPose.exe libCRTree.a `pkg-config --cflags --libs gtk+-2.0`  -L/WORK/app/opencv/3.0.0/lib -lopencv_highgui -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -Wl,-rpath-link /WORK/app/libgphoto2/2.5.8/lib

problem:

yhrun: error: cn10540: tasks 4-5: Segmentation fault

 

0 Kudos
0 Replies
Reply