Community
cancel
Showing results for 
Search instead for 
Did you mean: 
99 Views

vdRngUniform vs. I-7 2920?

We are experiencing a crash or hang in vdRngUniform when run on Dell M6600 (I7 2920 processor) when the same operation succeeds on other platforms, e.g. Dell M6500 (I7 x920).
0 Kudos
6 Replies
Sridevi_A_Intel
Employee
99 Views

Hi David,

Could you please provide me a testcase(sample sourcecode)?I'll try to reproduce the Issue and figure out root cause.

Thanks,
Sridevi
99 Views

Sridevi,

Will do. I am working with developers in Europe on this issue, have already requested such a test case. There is limited access to M6600 so the test has to be run at a different site! We definitely don't want to make you look at the fully integrated application.

DME
Gennady_F_Intel
Moderator
99 Views

David, in the case if it's the private code, then you can attach this test case into this private thread, then only few intel's engineers and you will not have acess to this communications..
--Gennady
Andrey_N_Intel
Employee
99 Views

Hello David,
In addition to the test case that reproduces the issue can you please shortly describe your environment (OS, build line/compiler, Intel MKL version)? Which basic random number generator do you use for initialization of the random stream?
Thanks,
Andrey
99 Views

The problem is ocurring with on M6600s with MKL 10.2.5 and we have confirmed that it doesn't fail on M6600s with MKL 10.3.6.

The application is built as a 64-bit application with MSFT VS2010 C++ compiler and is failing when run under Windows 7 64 on a Dell M6600 (I7 2920) but not failing when run on a Dell M6500 (I7 X920) under either Vista 64 or Windows 7 64-bit.
[bash]#include 

#include 
#include 
using namespace std;

int
main() {

    int len = 198;
    char buf[198];
    mkl_get_version_string(buf,len);
    cout<<"TestingRandomGeneratorinMKLversion:nt"<<<

/******************************************************************
RandomNumber: Constructors
*******************************************************************/

RandomNumber::RandomNumber() : stream_(NULL) {
}

RandomNumber::~RandomNumber() {
  freeRand();
}

void
RandomNumber::setUpRand(const int seed) {
  freeRand();
  vslNewStream(&stream_, VSL_BRNG_R250, seed);
}

void
RandomNumber::freeRand() {
  if (stream_ != NULL)
    vslDeleteStream(&stream_);
}

double
RandomNumber::getRandUniform() const {
  double d = 0.;
  vdRngUniform(VSL_METHOD_DUNIFORM_STD, stream_, 1, &d, 0., 1.);
  return d;
}

double
RandomNumber::getRandGaussian() const {
  double d = 0.;
  vdRngGaussian(VSL_METHOD_DGAUSSIAN_BOXMULLER, stream_, 1, &d, 0., 1.);
  return d;
}

#pragma once

#include 
#include 

typedef void* VSLStreamStatePtr;

/******************************************************************
Name   : RandomNumber
Desc   : Class for testing the random number generator.
*******************************************************************/

class RandomNumber {
private:
  VSLStreamStatePtr stream_;

public:
  RandomNumber();
  ~RandomNumber();

  void   setUpRand(const int seed);
  void   freeRand();
  double getRandUniform() const;
  double getRandGaussian() const;
};

[/bash]
Todd_R_Intel
Employee
99 Views

We have reproduced this problem on systems withprocessors that support Intel AVX instructions, but withoperating systems that do not support Intel AVX instructions.

In version 10.2, Intel MKL had a problem with the code that determines which optimized code-path to take. The dispatcher would test to see if the processor supports AVX instructions, but it did not check for the required support in the operating system.Many of the Intel MKLfunctions required an additional instruction to 'enable' these code-paths, but the vector mathfunctions (VML) and Random number generators (VSL) functions were unintentionally enabled by default. Intel AVX instructions are only supported in Windows 7 SP1 and Windows Server 2008R2 SP1. They are not supported in Vista or Windows XP. Linux users should likewise check that their kernel supports Intel AVX instructions.

In version 10.3, the problem was fixed by check that the operating system indeed supports the Intel AVX instruction set.

Summary:

Users of MKL 10.2.* may encounter a crash or hang if

  • they use a processor supporting Intel AVX instructions
  • AND
  • they use an operating system that does *not* support Intel AVX instructions
  • AND
  • they use either
    • VML or VSL functions
    • OR
    • anyIntel MKLfunction after explicitly enabling the Intel AVX optimizations using the mkl_enable_instructions function

Fixes:

Update your operating system to a version withIntel AVX supporton all systems with processors that support Intel AVX

Use the latest version of Intel MKL. All versions since the release of Intel MKL 10.3 (available in Intel Composer XE 2011) have been fixed to avoid this problem.

Support:

As always let us know if you have any questions or problems employing these fixes.

In addtion, this issue is also addressed in Intel MKL Known issues at: http://software.intel.com/en-us/articles/vml-and-vsl-functions-issue-on-cpu-types-supported-avx-inst...

Reply