/debug:parallel results in LNK2038 error

/debug:parallel results in LNK2038 error

Visual Studio 2010, Intel Compiler version 12.1.4.122.

This problem occurs in debug builds.

If /debug:parallel is set, pdbxinst.lib is included. It has a defaultlib directive pointing to libcpmt. If any module compiled with _DEBUG set uses libcpmt, a LNK2038 error results for _ITERATOR_DEBUG_LEVEL.

The workaround of /NODEFAULTLIB:libcpmt.lib when linkingseems to work, but has unknown side effects.

Either a debug version of pdbxinst.lib that links to libcpmtd.lib should be supplied and used in this case, or the dependency on libcpmt needs removing.

Orin

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Orin,

What's the reason for building with /debug:parallel? This option is for creating parallel debug checks used by the Intel Parallel Debugger Extension to detect data sharing events in OpenMP* parallelized code.

Same as: http://software.intel.com/en-us/forums/showthread.php?t=105411

Regards, Hubert.

Hubert,

My code is using OpenMP. I have /Qopenmp set too. I was chasing a memory overwrite problem and trying to make sure it wasn't hapenning in my code.

Orin.

Orin,
As said, /debug:parallel is for data sharing detection of multithreaded OpenMP code only. So even if you are debugging OpenMP you don't necessarily need /debug:parallel. For looking after memory problems the Intel Parallel Inspector may help. I doesn't look like you want to detect data races here (the Parallel Inspector would also be a good choice to detect them).
Of course we will takeyour reported issue seriously and try to reproduce this, but in your case I think you can safelyremove option /debug:parallel for now.
Regards, Hubert.

Hubert,

I've already run Parallel Inspector. Obviously, I wouldn't ship a product with /debug:parallel enabled and release builds don't produce the link error anyway.

I do have much data sharing going on and OpenMP is perhaps not the best solution, but it's the hand I've been dealt. It's tedious, but /debug:parallel does allow me to check whether the events it shows are real problems - ie. is the data protected by a mutex etc..

Orin.

Leave a Comment

Please sign in to add a comment. Not a member? Join today