- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am facing a crash problem with our driver code (written in C)when we compile the code with with Intel C Compiler ver 8.0 or 9.0. Our code uses both Microsoft cl compiler and ICL compiler. The C files where we need to optimize in terms of processor cycle counts are compiled with Intel compilerwhile the other files are compiled using Microsoft cl compiler.
I have been able to isolate the problem to a memcpy call. The memcpy call is put in a separate C file and when I compile this memcpy with ICL(Intel C Compiler) ver 8.0 and run some python scripts for testing, the driver crashes. The assembly shows that the memcpy is replaced by "intel_fast_memcpy" call. The same memcpy function if I compile with Microsoft cl or ICL ver 7.0 then the driver works fine with the python scripts With CL and icl ver 7.0 there is no "intel_fast_memcpy" call.
Has anyone faced code crash issue with "intel_fast_memcpy" call ??
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have successfully used this simple method.
Regards,
Steve
- Create a simple source file
intel_hack.c
that contains this:
#include
void *
_intel_fast_memset(void *s, int c, size_t n)
{
memset(s, c, n);
}
void *
_intel_fast_memcpy(void *t, void *s, size_t n)
{
memcpy(t, s, n);
}
void *
_intel_fast_memcmp(void *t, void *s, size_t n)
{
memcmp(t, s, n);
} - Compile it:
make intel_hack.o
- Put it in a library:
ar r libintel.a intel_hack.o
- Put the library somewhere in the lib path:
cp libintel.a /usr/local/lib
- Specify
LIBS='-lintel'
as needed. For example, I ran into this problem while compiling PHP5 with mysql support, so I ran its configure program like:
LIBS='-lintel' ./configure --with-mysql=/usr/local/mysql ...
You can usually specify this as an argument to make, as well:
make "LIBS = -lintel"
(Note that spaces around=
are allowed in themake
context but not in the shell context.)
libintel.a
library to resolve the Intel references to the regular (non-Intel) routines.Regards,
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page