- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I a customized application using SCIF and launching the MIC program with "COIProcessCreateFromFile" and I am getting the following error:
COI ERROR << COIProcessCreateFromFile( engines, server, 0, NULL, false, envVarArray, true, NULL, 0, NULL, &(coiProcess) ) returned COI_DOES_NOT_EXIST
I was assuming that the error had to do with the coi_daemon either on the host side on the MIC side, but if I run any of the Intel COI examples (say "coi_simple") it works fine!
The compilation on for Intel's code and my own complete successfully but my own code produces the error mentioned before.
The compilation files that I am using for the Intel example follows:
DEV_FLAGS ?= -mmic -lcoi_device -rdynamic -Wl,--enable-new-dtags
HOST_FLAGS ?= -lcoi_host -Wl,--enable-new-dtags
DEBUG_FLAGS = -g -O0 -D_DEBUG
RELEASE_FLAGS = -DNDEBUG -O3
DEBUG_DIR = debug
RELEASE_DIR = releaseHOST_CC ?= g++
DEV_CC ?= icpcall: $(DEBUG_DIR)/coi_simple_source_host $(DEBUG_DIR)/coi_simple_sink_mic \
$(RELEASE_DIR)/coi_simple_source_host $(RELEASE_DIR)/coi_simple_sink_mic$(DEBUG_DIR)/coi_simple_source_host: coi_simple_source.cpp
mkdir -p $(DEBUG_DIR)
$(HOST_CC) $(HOST_FLAGS) $(DEBUG_FLAGS) -o $@ $<$(RELEASE_DIR)/coi_simple_source_host: coi_simple_source.cpp
mkdir -p $(RELEASE_DIR)
$(HOST_CC) $(HOST_FLAGS) $(RELEASE_FLAGS) -o $@ $<$(DEBUG_DIR)/coi_simple_sink_mic: coi_simple_sink.cpp
mkdir -p $(DEBUG_DIR)
$(DEV_CC) $(DEV_FLAGS) $(DEBUG_FLAGS) -o $@ $<$(RELEASE_DIR)/coi_simple_sink_mic: coi_simple_sink.cpp
mkdir -p $(RELEASE_DIR)
$(DEV_CC) $(DEV_FLAGS) $(RELEASE_FLAGS) -o $@ $<clean:
rm -rf debug
rm -rf release
and for my own code is, for the MIC side:
source /opt/mpss/3.5.2/environment-setup-k1om-mpss-linux
# Compiler flags
CXXFLAGS_SCIF="-O2 -m64 -Wall"
MIC_FLAGS="-DMKL_ILP64 -qopenmp -I${MKLROOT}/include "# Linker libraries
LIBS_MIC="-lscif -lrt"
LIBS_COI_MIC="-mmic -lcoi_device -rdynamic -Wl,--enable-new-dtags"
LIBS_MKL_MIC="-L${MKLROOT}/lib/mic -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl"# Include directories
COI_INCLUDE="/usr/include/intel-coi"# Compilers
MIC_CC=icpc# Compile & Lnik for MIC
$MIC_CC $LIBS_COI_MIC $CXXFLAGS_SCIF $MIC_FLAGS -I$COI_INCLUDE ./src/mic_server.cxx $LIBS_MIC $LIBS_MKL_MIC -o ./obj/mic_server
For the Host side:
#!/bin/bash
#source ./setup_env.sh
source /opt/mpss/3.5.2/environment-setup-k1om-mpss-linux# Compiler flags
CXXFLAGS="-O2 -m64 -Wall"
CXXFLAGS_SCIF="-O2 -m64 -Wall"
MIC_FLAGS="-DMKL_ILP64 -qopenmp -I${MKLROOT}/include -mmic"# Linker libraries
LIBS_HOST="-qopenmp -lrt"
LIBS_MIC="-lscif -lrt"
OFFLOAD_FLAG="-qoffload-attribute-target=mic"
LIBS_COI_HOST="-lcoi_host -lpthread -Wl,--enable-new-dtags"
LIBS_COI_MIC=" -lcoi_device -lpthread -rdynamic -Wl,--enable-new-dtags"
#LIBS_MKL_MIC="-Wl,--start-group ${MKLROOT}/lib/mic/libmkl_intel_ilp64.a ${MKLROOT}/lib/mic/libmkl_core.a ${MKLROOT}/lib/mic/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm -ldl"
LIBS_MKL_MIC="-L${MKLROOT}/lib/mic -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl"#-L/opt/intel/mic/coi/host-linux-release/lib
# Include directories
COI_INCLUDE="/usr/include/intel-coi"# Compilers
CXX=icpc
MIC_CC=icpc #k1om-mpss-linux-g++# Compile for Host
$CXX -c $CXXFLAGS -I${MKLROOT}/include -I$COI_INCLUDE ./src/test_scif_main.cxx $LIBS_HOST -o ./obj/test_scif_main.o
$CXX -c $CXXFLAGS -I$MKLROOT/include ./src/GetTime64.cxx -o ./obj/GetTime64.o
$CXX -c $CXXFLAGS $OFFLOAD_FLAG -I$MKLROOT/include ./src/utilities.cxx $LIBS_HOST -o ./obj/utilities.o$CXX -c $CXXFLAGS_SCIF $LIBS_COI_HOST -I$MKLROOT/include -I$COI_INCLUDE ./src/scif_utilities.cxx -o ./obj/scif_utilities.o$CXX -c $CXXFLAGS_SCIF $LIBS_COI_HOST -I$MKLROOT/include -I$COI_INCLUDE ./src/test_procs_scif.cxx -o ./obj/test_procs_scif.o
# Linking for Host
$CXX ./obj/test_scif_main.o ./obj/GetTime64.o ./obj/test_procs_scif.o ./obj/scif_utilities.o ./obj/utilities.o -lscif -lcoi_host -qopenmp -Wl,--start-group $MKLROOT/lib/intel64/libmkl_intel_lp64.a $MKLROOT/lib/intel64/libmkl_intel_thread.a $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -lrt -liomp5 -lpthread -lm -ldl -qoffload-option,mic,compiler," -qopenmp -Wl,--start-group $MKLROOT/lib/mic/libmkl_intel_lp64.a $MKLROOT/lib/mic/libmkl_intel_thread.a $MKLROOT/lib/mic/libmkl_core.a -Wl,--end-group -m64 -liomp5 -lpthread -lm -ldl" -o ./test_scif
Best regards,
David
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realized that upon installing MKL update 4 one of my relative paths had changed generating the "COI_DOES_NOT_EXIST" error.
This is related to the library dependencies managed by COI when using this interface to launch the MIC binary within the Host (CPU) and specifying s dependencies in the "SINK_LD_PRELOAD" environment variable that is not resolved successfully.
Just to clarify, when launching the application COI seems to read the environment variable mentioned to determine which libraries to transfer to the MIC.
If the "SINK_LD_PRELOAD" env is not defined or empty then a COI will exit with a "COI_MISSING_DEPENDENCY" error instead. In general missing dependencies will cause this error.
Hope it helps poor souls detecting runtime errors after upgrading MKL.
David

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page