I am unit testing a managed C++/CLI wrapper class around a native C++ class where the native C++ class uses OpenMP. When trying to unit test with OpenMP enabled in the native code, I get the exception OpenMPWithMultipleAppdomainsException from minternal.h in the constructor (type initialization) of my managed assembly that references the native assembly using OpenMP.
inline void __cdecl DoDllLanguageSupportValidation()
#else /* _PARTIAL_TRUST_OBJ */
_MRTIMP void __cdecl DoDllLanguageSupportValidation()
#endif /* _PARTIAL_TRUST_OBJ */
if (!AppDomain::CurrentDomain->IsDefaultAppDomain() && IsUsingOpenMP())
throw gcnew OpenMPWithMultipleAppdomainsException();
} // namespace __identifier("<CrtImplementationDetails>")
I have tried the various modes in NUnit 2.5 to launch with different default domain usage and different default process models but no combination seems to work. I found the following post online from September 2008 where it seems someone had a similar issue and the reply at the time was that NUnit did not support testing managed assemblies that referenced other libs using OpenMP.
Is this an unsupported feature or a bug? Or, Is there a workaround for testing this scenario?
Log in to post a comment.