locked
Visual Studio 2012: Unit Test Crash when using OpenMP RRS feed

  • General discussion

  • I'm using Visual Studio 2012 Premium, update 3 (C++ project and code) under Win 7 

    When a Unit Test calls a method using OpenMP (of course i change under project settings->C++->Language->Open MP support to "yes(/openmp)") the unit test crashes most of the times (the crash happens after running the test).

    Any Ideas ?

    In order to reproduce the crash:

    1. open new test project for C++

    2. Change project setting to support OpenMP (project settings->C++->Language->Open MP support to "yes(/openmp)

    3.  Add new class to the project.

    4. Add the following method to the class:

    void dummy_for_omp::do_it()
    {
    #pragma omp parallel for 
    	for(int a = 0; a < 3453; a++)
    	{
    		int sss =0;
    	}
    
    }

    5. Call the method from a test:

    TEST_METHOD(TestMethod1)
    		{
    			dummy_for_omp dummy_obj;
    			dummy_obj.do_it();
    			Assert::IsTrue(true);
    		}
    6. Run the unit test few times - it will crash in some of the runs..


    • Edited by Ido Yme Wednesday, August 14, 2013 10:12 AM
    Wednesday, August 14, 2013 10:12 AM

All replies

  • Hello,

    I have tried your scenario on my side with VS2012 update 3. When I run the test, the test run crashes.

    I am researching this issue. If it is urgent, you could submit this feedback to Microsoft Connect

    feedback portal: http://connect.microsoft.com,
    Microsoft engineers will evaluate them seriously. Thanks for your
    understanding. After you submit the feedback, you can post the link here which
    will be beneficial for other members with the similar issue. And I will help
    you to vote it.

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    • Edited by Amanda Zhu Saturday, August 17, 2013 9:39 AM edit
    Friday, August 16, 2013 10:30 AM
  • Thank you Amanda,

    I did submit this issue to the feedback portal.The link is here.

    BR,

    Ido

    Tuesday, August 20, 2013 5:54 AM