<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785332#M1796</link>
    <description>Hi Andrey,&lt;BR /&gt;&lt;BR /&gt;Thank you for your example. It works fine. I guess I need the interface block in my code. If I have main program calls subroutine A, and subroutine A calls subroutine B. I need interface block in subroutine A before calling subroutine B, am I right? &lt;BR /&gt;&lt;BR /&gt;Sherry</description>
    <pubDate>Tue, 03 Apr 2012 21:33:05 GMT</pubDate>
    <dc:creator>xiaomingg</dc:creator>
    <dc:date>2012-04-03T21:33:05Z</dc:date>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785323#M1787</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I try to change a fortran 77 program using IMSL to a fortran 90 program using MKL. I got the error message:&lt;BR /&gt;&lt;BR /&gt;MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform. &lt;BR /&gt;&lt;BR /&gt;I don't know what does it mean. How to fix the problem. Thank you.&lt;BR /&gt;&lt;BR /&gt;Sherry&lt;BR /&gt;&lt;BR /&gt;My program looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;INCLUDE 'mkl_vsl.fi' &lt;BR /&gt;
 PROGRAM MYPROG&lt;BR /&gt;
 USE LINK &lt;BR /&gt;
 USE MKL_VSL&lt;BR /&gt;
 USE MKL_VSL_TYPE&lt;BR /&gt;
 USE F95_PRECISION&lt;BR /&gt;
 USE BLAS95&lt;BR /&gt;
 USE LAPACK95&lt;BR /&gt;
 IMPLICIT INTEGER*4 (I-N), REAL(8) (A-H,O-Z)&lt;BR /&gt;
 INTEGER, PARAMETER:: ISEED=123&lt;BR /&gt;
 ...&lt;BR /&gt;
 ...&lt;BR /&gt;
!*****************************************************************************&lt;BR /&gt;
! RANDOM GENERATOR&lt;BR /&gt;
!*****************************************************************************&lt;BR /&gt;
  TYPE (VSL_STREAM_STATE) :: STREAM&lt;BR /&gt;
 INTEGER :: BRNG, METHOD, STATUS = 0, INFO = 0 &lt;BR /&gt;
 integer(kind=4) ERRCODE&lt;BR /&gt;
!-----------------------------------------------------------------------------&lt;BR /&gt;
! INITIALIZE FOR RANDOM SAMPLING&lt;BR /&gt;
!-----------------------------------------------------------------------------&lt;BR /&gt;
 BRNG = VSL_BRNG_MCG59 &lt;BR /&gt;
 ERRCODE=VSLNEWSTREAM( STREAM, BRNG, ISEED )&lt;BR /&gt;
 IF (ERRCODE /= VSL_ERROR_OK) THEN&lt;BR /&gt;
  PRINT *, 'CREATING RANDOM STREAM ERROR: ', ERRCODE&lt;BR /&gt;
 ENDIF&lt;BR /&gt;
&lt;BR /&gt;
  DO 30 I1=1,M &lt;BR /&gt;
    CALL CALC(I,....)&lt;BR /&gt;
30 continue &lt;BR /&gt;
 ...&lt;BR /&gt;
 ...&lt;BR /&gt;
 STOP&lt;BR /&gt;
 END PROGRAM MYPROG&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 SUBROUTINE CALC(I,....)&lt;BR /&gt;
 ...&lt;BR /&gt;
 ...&lt;BR /&gt;
 IMPLICIT INTEGER*4 (I-N), REAL(8) (A-H,O-Z)&lt;BR /&gt;
!*****************************************************************************&lt;BR /&gt;
! RANDOM GENERATOR&lt;BR /&gt;
!*****************************************************************************&lt;BR /&gt;
!   TYPE (VSL_STREAM_STATE) :: STREAM&lt;BR /&gt;
!  INTEGER :: BRNG, METHOD, STATUS = 0, INFO = 0 &lt;BR /&gt;
!  integer(kind=4) ERRCODE&lt;BR /&gt;
&lt;BR /&gt;
 METHOD = VSL_METHOD_DUNIFORM_STD&lt;BR /&gt;
 STATUS = VDRNGUNIFORM( METHOD, STREAM, 100, R, 0, 1.0 )&lt;BR /&gt;
&lt;BR /&gt;
 IF (STATUS /= VSL_ERROR_OK) THEN&lt;BR /&gt;
 PRINT *, 'GENERATING ERROR FOR X: ', STATUS&lt;BR /&gt;
 ENDIF&lt;BR /&gt;
 ....&lt;BR /&gt;
 ....&lt;BR /&gt;
 ....&lt;BR /&gt;
 RETURN&lt;BR /&gt;
 END</description>
      <pubDate>Sat, 24 Mar 2012 01:26:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785323#M1787</guid>
      <dc:creator>xiaomingg</dc:creator>
      <dc:date>2012-03-24T01:26:01Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785324#M1788</link>
      <description>Why did you make the TYPE and other declarations inoperative in your subroutine by making them comment lines, causing STREAM to become REAL, etc., because of the implicit typing?&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Mar 2012 01:37:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785324#M1788</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-03-24T01:37:36Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785325#M1789</link>
      <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=9662" class="basic" href="https://community.intel.com/en-us/profile/9662/"&gt;mecej4&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Why did you make the TYPE and other declarations inoperative in your subroutine by making them comment lines, causing STREAM to become REAL, etc., because of the implicit typing?&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;If I don't comment them out, I get error message when I compile.&lt;/P&gt;&lt;P&gt;error #6633: The type of the actual argument differs from the type of the dummy argument. [STREAM]&lt;BR /&gt;
 ERRCODE=VSLNEWSTREAM( STREAM, BRNG, ISEED )&lt;BR /&gt;
 ------------------------------^&lt;BR /&gt;
patterncnty1_2.f90(272): error #6633: The type of the actual argument differs from the type of the dummy argument. [BRNG]&lt;BR /&gt;
 ERRCODE=VSLNEWSTREAM( STREAM, BRNG, ISEED )&lt;BR /&gt;
 --------------------------------------^&lt;BR /&gt;
patterncnty1_2.f90(1077): error #6457: This derived type name has not been declared. [VSL_STREAM_STATE]&lt;BR /&gt;
 TYPE (VSL_STREAM_STATE) :: STREAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Mar 2012 13:56:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785325#M1789</guid>
      <dc:creator>xiaomingg</dc:creator>
      <dc:date>2012-03-24T13:56:23Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785326#M1790</link>
      <description>why don't you use the existing examples? see - &lt;MKL_ROOT_INSTALL&gt;\examples\vslf\sources\vdrnguniform.f.&lt;/MKL_ROOT_INSTALL&gt;</description>
      <pubDate>Sat, 24 Mar 2012 15:31:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785326#M1790</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-03-24T15:31:12Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785327#M1791</link>
      <description>&lt;I&gt;&amp;gt; If I don't comment them out, I get error message when I compile. &lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;Killing the messenger does not prevent bad things from happening. By relying incorrectly on implicit typing, you promoted the compile time errors to run time aborts.&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Mar 2012 16:40:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785327#M1791</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-03-24T16:40:50Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785328#M1792</link>
      <description>Yes, I try to follow the example. The example has everything in one program. My program has a few subroutines. I have to sample uniform, binomial, normal in my subroutine.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Mar 2012 22:06:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785328#M1792</guid>
      <dc:creator>xiaomingg</dc:creator>
      <dc:date>2012-03-24T22:06:51Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785329#M1793</link>
      <description>Yes, you are absolutely right. &lt;BR /&gt;&lt;BR /&gt;I use IMPLICIT NONE now, but I still get the following compile time errors. I don't know what the error messages mean. &lt;BR /&gt;&lt;BR /&gt;Can anyone please help? Thank you very much.&lt;BR /&gt;&lt;BR /&gt;error #6457: This derived type name has not been declared. [VSL_STREAM_STATE]&lt;BR /&gt; TYPE (VSL_STREAM_STATE) :: STREAM &lt;BR /&gt;------------^&lt;BR /&gt;error #6404: This name does not have a type, and must have an explicit type. [VSL_METHOD_DUNIFORM_STD]&lt;BR /&gt; METHOD = VSL_METHOD_DUNIFORM_STD&lt;BR /&gt;-----------------^&lt;BR /&gt;error #6404: This name does not have a type, and must have an explicit type. [VDRNGUNIFORM]&lt;BR /&gt; STATUS = VDRNGUNIFORM( METHOD, STREAM, II, OMEGA, a, b )&lt;BR /&gt;-----------------^&lt;BR /&gt;error #6404: This name does not have a type, and must have an explicit type. [VSL_ERROR_OK]&lt;BR /&gt; IF (STATUS /= VSL_ERROR_OK) THEN&lt;BR /&gt;----------------------^&lt;BR /&gt;compilation aborted for patterncnty1_2.f90 (code 1)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Mar 2012 22:12:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785329#M1793</guid>
      <dc:creator>xiaomingg</dc:creator>
      <dc:date>2012-03-24T22:12:42Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785330#M1794</link>
      <description>If you have have both the f77 vsl include file and the f90 USE, as you showed at the top, that may account for the error.</description>
      <pubDate>Sun, 25 Mar 2012 02:04:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785330#M1794</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-03-25T02:04:29Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785331#M1795</link>
      <description>Hello Sherry,&lt;BR /&gt;&lt;BR /&gt;I developed a short test case that demonstrates use of Intel MKL generators in the application that does random number generation inthe subroutine. I tried to reproduce your code as much as possible. The test case, whichis built using Intel Fortran compiler, runs and printsrandom numbers obtained as result of call to Intel MKL Uniform RNG. Please, let me know if this helps to resolve the compilation and runissues on your side.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Andrey&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;INCLUDE 'mkl_vsl.fi' &lt;/P&gt;&lt;P&gt;PROGRAM MYPROG&lt;/P&gt;&lt;P&gt;USE MKL_VSL&lt;/P&gt;&lt;P&gt;USE MKL_VSL_TYPE&lt;/P&gt;&lt;P&gt;INTEGER, PARAMETER:: ISEED=123&lt;/P&gt;&lt;P&gt;TYPE (VSL_STREAM_STATE) :: STREAM&lt;/P&gt;&lt;P&gt;INTEGER :: BRNG, METHOD, STATUS = 0, INFO = 0 &lt;/P&gt;&lt;P&gt;integer(kind=4) ERRCODE&lt;/P&gt;&lt;P&gt;INTERFACE&lt;/P&gt;&lt;P&gt;SUBROUTINE CALC(I, STREAM)&lt;/P&gt;&lt;P&gt;USE MKL_VSL&lt;/P&gt;&lt;P&gt;USE MKL_VSL_TYPE&lt;/P&gt;&lt;P&gt;INTEGER I&lt;/P&gt;&lt;P&gt;TYPE (VSL_STREAM_STATE) :: STREAM&lt;/P&gt;&lt;P&gt;END SUBROUTINE &lt;/P&gt;&lt;P&gt;END INTERFACE&lt;/P&gt;&lt;P&gt;BRNG = VSL_BRNG_MCG59 &lt;/P&gt;&lt;P&gt;ERRCODE=VSLNEWSTREAM( STREAM, BRNG, ISEED )&lt;/P&gt;&lt;P&gt;IF (ERRCODE /= VSL_ERROR_OK) THEN&lt;/P&gt;&lt;P&gt;PRINT *, 'CREATING RANDOM STREAM ERROR: ', ERRCODE&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;CALL CALC(1, STREAM)&lt;/P&gt;&lt;P&gt;ERRCODE=VSLDELETESTREAM( STREAM )&lt;/P&gt;&lt;P&gt;IF (ERRCODE /= VSL_ERROR_OK) THEN&lt;/P&gt;&lt;P&gt;PRINT *, 'DELETING RANDOM STREAM ERROR: ', ERRCODE&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;STOP&lt;/P&gt;&lt;P&gt;END PROGRAM MYPROG&lt;/P&gt;&lt;P&gt;SUBROUTINE CALC(I, STREAM)&lt;/P&gt;&lt;P&gt;USE MKL_VSL&lt;/P&gt;&lt;P&gt;USE MKL_VSL_TYPE&lt;/P&gt;&lt;P&gt;INTEGER I&lt;/P&gt;&lt;P&gt;TYPE (VSL_STREAM_STATE) :: STREAM&lt;/P&gt;&lt;P&gt;REAL(KIND=8) R(100)&lt;/P&gt;&lt;P&gt;INTEGER METHOD&lt;/P&gt;&lt;P&gt;INTEGER(KIND=4) STATUS&lt;/P&gt;&lt;P&gt;INTEGER J &lt;/P&gt;&lt;P&gt;METHOD = VSL_RNG_METHOD_UNIFORM_STD&lt;/P&gt;&lt;P&gt;STATUS = VDRNGUNIFORM( METHOD, STREAM, 100, R, 0.0D0, 1.0D0 )&lt;/P&gt;&lt;P&gt;IF (STATUS /= VSL_ERROR_OK) THEN&lt;/P&gt;&lt;P&gt;PRINT *, 'GENERATING ERROR FOR X: ', STATUS&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;DO J=1,100&lt;/P&gt;&lt;P&gt;PRINT *, R(J)&lt;/P&gt;&lt;P&gt;END DO &lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2012 08:35:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785331#M1795</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2012-03-26T08:35:16Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785332#M1796</link>
      <description>Hi Andrey,&lt;BR /&gt;&lt;BR /&gt;Thank you for your example. It works fine. I guess I need the interface block in my code. If I have main program calls subroutine A, and subroutine A calls subroutine B. I need interface block in subroutine A before calling subroutine B, am I right? &lt;BR /&gt;&lt;BR /&gt;Sherry</description>
      <pubDate>Tue, 03 Apr 2012 21:33:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785332#M1796</guid>
      <dc:creator>xiaomingg</dc:creator>
      <dc:date>2012-04-03T21:33:05Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785333#M1797</link>
      <description>An interface block is one method for providing a required explicit interface to a routine. &lt;BR /&gt;&lt;BR /&gt;Another method is to declare the called or referenced routines in a module and, in the caller(s), USE that module.&lt;BR /&gt;&lt;BR /&gt;The Fortran reference manual should be consulted regarding circumstances in which an explicit interface is obligatory.</description>
      <pubDate>Wed, 04 Apr 2012 10:24:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785333#M1797</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-04-04T10:24:24Z</dc:date>
    </item>
    <item>
      <title>MKL ERROR: Parameter 2 was incorrect on entry to vdRngUniform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785334#M1798</link>
      <description>Hi Sherry,&lt;BR /&gt;&lt;BR /&gt;As Mecej4 mentioned in his post,please chooseone of the approaches for the explicit interface specification that would workin your app:either interface statement (as in the example above), ora module based scheme (please, have a look atmkl_vsl.f90 fileas one possible example).&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Andrey</description>
      <pubDate>Wed, 04 Apr 2012 11:05:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-ERROR-Parameter-2-was-incorrect-on-entry-to-vdRngUniform/m-p/785334#M1798</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2012-04-04T11:05:38Z</dc:date>
    </item>
  </channel>
</rss>

