Why does the program stop when random numbers from a Poisson distribution are generated? 
Author Message
 Why does the program stop when random numbers from a Poisson distribution are generated?

When I used Compaq Visual fortran Professional Edition 6.6 to generate
pseudorandom numbers from a Poisson distribution, it cannot execute
the following program and always stops at I = 21 and J = 2396. Can
anybody tell me what's wrong with my program? Thanks a lot.

PROGRAM TEST
USE MSIMSL
IMPLICIT NONE
INTEGER   I, J
INTEGER   NR
PARAMETER (NR=7)
INTEGER   IR(NR), ISEED
REAL      THETA, MEAN

THETA = 10.0
ISEED = 123457
CALL RNSET (ISEED)

DO I = 1, 100
   CALL RNPOI (NR, THETA, IR)
   MEAN = SUM(REAL(IR))/REAL(NR)
   DO J = 1, 10000
      WRITE(*,*) I, J
      CALL RNPOI (NR, MEAN, IR)
   END DO
END DO

END PROGRAM



Tue, 06 Sep 2011 01:39:09 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
> pseudorandom numbers from a Poisson distribution, it cannot execute
> the following program and always stops at I = 21 and J = 2396. Can
> anybody tell me what's wrong with my program? Thanks a lot.

> PROGRAM TEST
> USE MSIMSL

My documentation says to USE numerical_libraries -- I'm not sure what
MSIMSL is for, but I'd recommend switching to the documented module
unless there's a specific reason for the other.

I didn't see anything real obvious otherwise--what error does IMSL
library return or other indications are there?

Is theta always >0?

--



Tue, 06 Sep 2011 01:59:54 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:
> My documentation says to USE numerical_libraries -- I'm not sure what
> MSIMSL is for, but I'd recommend switching to the documented module
> unless there's a specific reason for the other.

> I didn't see anything real obvious otherwise--what error does IMSL
> library return or other indications are there?

> Is theta always >0?

> --

First of all, thanks for your reply.

I replaced "USE MSIMSL" with "USE numerical_libraries", but it still
stopped at I = 21 and J = 2396. No error message showed on the Fortran
screen.

Yes, theta > 0 always. When I = 21, MEAN = 10.14286 (>0).



Tue, 06 Sep 2011 02:26:44 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:


>> My documentation says to USE numerical_libraries -- I'm not sure what
>> MSIMSL is for, but I'd recommend switching to the documented module
>> unless there's a specific reason for the other.

>> I didn't see anything real obvious otherwise--what error does IMSL
>> library return or other indications are there?

>> Is theta always >0?

>> --

> First of all, thanks for your reply.

> I replaced "USE MSIMSL" with "USE numerical_libraries", but it still
> stopped at I = 21 and J = 2396. No error message showed on the Fortran
> screen.

> Yes, theta > 0 always. When I = 21, MEAN = 10.14286 (>0).

What are the error settings in IMSL?  Have you got all debugging options
set in CVF?  I've not time at the moment to try your program here; later
on tonight, maybe if somebody else hasn't got around to it before then.

Seems like there has to be something detectable--you mean you get what
appears to be a normal stop?

--



Tue, 06 Sep 2011 02:40:33 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
> pseudorandom numbers from a Poisson distribution, it cannot execute
> the following program and always stops at I = 21 and J = 2396. Can
> anybody tell me what's wrong with my program? Thanks a lot.

I don't have those versions handy right now, but I tried this with Intel
Visual Fortran 11.0 and IMSL 6.0 and it ran to completion.
--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
   http://software.intel.com/en-us/forums/
Intel Fortran Support
   http://support.intel.com/support/performancetools/fortran
My Fortran blog
   http://www.intel.com/software/drfortran



Tue, 06 Sep 2011 03:07:22 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?
On Thu, 19 Mar 2009 15:07:22 -0400, Steve Lionel

Quote:


>> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
>> pseudorandom numbers from a Poisson distribution, it cannot execute
>> the following program and always stops at I = 21 and J = 2396. Can
>> anybody tell me what's wrong with my program? Thanks a lot.

>I don't have those versions handy right now, but I tried this with Intel
>Visual Fortran 11.0 and IMSL 6.0 and it ran to completion.

I can just add that on MS FPS4 it ran to completion as well (using
MSIMSL).
On CVF66c it ran into the same problems as the OP described (using
MSIMSL and numerical_libraries), ending with 21 and ....

best regards
Luka



Tue, 06 Sep 2011 03:25:24 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> I replaced "USE MSIMSL" with "USE numerical_libraries", but it still
> stopped at I = 21 and J = 2396. No error message showed on the Fortran
> screen.

I was just wondering about the use of modules one closed
source libraries.  USE and the .mod should only depend
on the entry/exit code.  (I suppose the INTERFACE in
Fortran terminology.)  It should, then, be possible to
write dummy modules that don't contain any useful code,
but that will generate the appropriate .mod file (or whatever
the specific system needs).   I wonder if any of
the closed source libraries do that.

-- glen



Tue, 06 Sep 2011 03:43:51 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> I was just wondering about the use of modules one closed
> source libraries.  USE and the .mod should only depend
> on the entry/exit code.  (I suppose the INTERFACE in
> Fortran terminology.)  It should, then, be possible to
> write dummy modules that don't contain any useful code,
> but that will generate the appropriate .mod file (or whatever
> the specific system needs).   I wonder if any of
> the closed source libraries do that.

In the versions of IMSL used by MSFPS and CVF, modules with interface
blocks were provided.  The source of those modules were also provided.
This is similar to the Win32 declaration modules provided by MSFPS, CVF
and IVF.  Dummy routines are not needed - just INTERFACE blocks.

The newer IMSL versions added a new "Fortran 90" interface for routines
- some new routines are provided only in that form.  For those you need
to use different modules, some of which are generic interfaces and some
are the result of compiling the source (which is not provided.)

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
   http://software.intel.com/en-us/forums/
Intel Fortran Support
   http://support.intel.com/support/performancetools/fortran
My Fortran blog
   http://www.intel.com/software/drfortran



Tue, 06 Sep 2011 04:08:11 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> > I replaced "USE MSIMSL" with "USE numerical_libraries", but it still
> > stopped at I = 21 and J = 2396. No error message showed on the Fortran
> > screen.

> I was just wondering about the use of modules one closed
> source libraries. ?USE and the .mod should only depend
> on the entry/exit code. ?(I suppose the INTERFACE in
> Fortran terminology.) ?It should, then, be possible to
> write dummy modules that don't contain any useful code,
> but that will generate the appropriate .mod file (or whatever
> the specific system needs). ? I wonder if any of
> the closed source libraries do that.

> -- glen

Sorry, I don't understand what you meant because I am a new user. I
tried to change THETA from 10.0 to 5.0, and then it can ran to
completion. However, I must know why it doesn't work when THETA = 10.0
or other values because I will run more programs for different THETA.


Tue, 06 Sep 2011 04:08:30 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:

> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
> pseudorandom numbers from a Poisson distribution, it cannot execute
> the following program and always stops at I = 21 and J = 2396. Can
> anybody tell me what's wrong with my program? Thanks a lot.
> PROGRAM TEST
> USE MSIMSL
> IMPLICIT NONE
> INTEGER   I, J
> INTEGER   NR
> PARAMETER (NR=7)
> INTEGER   IR(NR), ISEED
> REAL      THETA, MEAN
> THETA = 10.0
> ISEED = 123457
> CALL RNSET (ISEED)
> DO I = 1, 100
>    CALL RNPOI (NR, THETA, IR)
>    MEAN = SUM(REAL(IR))/REAL(NR)
>    DO J = 1, 10000
>       WRITE(*,*) I, J
>       CALL RNPOI (NR, MEAN, IR)
>    END DO
> END DO
> END PROGRAM

The problem is that you are attempting to call RNPOI with the Fortran 77
interface, but the Fortran 90 interface is different.  In fact, when I
compiled this, I first deleted

        USE MSIMSL

since there is no such module in my environment, and I added the two lines

        USE RNSET_INT
        USE RNPOI_INT

in order to use the specific modules where those functions are defined.  
I then got the compiler message that

        No specific match can be found for the generic subprogram call
        "RNPOI".

The F90 interface to RNPOI, according to the IMSL documentation, has two
required arguments and one optional argument.  The first argument in the F77
call becomes optional and therefore is moved to the last position in the F90
call, if it is present.  The default value for NR is SIZE(IR,1).

Hence, you should change

        CALL RNPOI (NR, THETA, IR)

to

        CALL RNPOI (THETA, IR)

and likewise with the second reference to RNPOI.

With these changes, I was able to compile and run your program and no error
messages were issued.

--
Dave Seaman
Third Circuit ignores precedent in Mumia Abu-Jamal ruling.
<http://www.indybay.org/newsitems/2008/03/29/18489281.php>



Tue, 06 Sep 2011 05:34:56 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:
> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
> pseudorandom numbers from a Poisson distribution, it cannot execute
> the following program and always stops at I = 21 and J = 2396. Can
> anybody tell me what's wrong with my program? Thanks a lot.

You've not showed the whole program.


Tue, 06 Sep 2011 22:22:34 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:



>> When I used Compaq Visual Fortran Professional Edition 6.6 to
>> generate pseudorandom numbers from a Poisson distribution, it
>> cannot execute the following program and always stops at I = 21
>> and J = 2396. Can anybody tell me what's wrong with my program?
>> Thanks a lot.

> You've not showed the whole program.

He showed as much as he can -- the missing code is in the proprietary IMSL library. Moreover, the problem that he stated does not occur with other combinations of compiler and IMSL library.

-- mecej4



Tue, 06 Sep 2011 22:31:01 GMT  
 Why does the program stop when random numbers from a Poisson distribution are generated?

Quote:



>> When I used Compaq Visual Fortran Professional Edition 6.6 to generate
>> pseudorandom numbers from a Poisson distribution, it cannot execute
>> the following program and always stops at I = 21 and J = 2396. Can
>> anybody tell me what's wrong with my program? Thanks a lot.

>You've not showed the whole program.

Yes he did.


Wed, 07 Sep 2011 02:25:26 GMT  
 
 [ 22 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Synthesizable Poisson Random Number Generator

2. Random Number Generator to produce SAME random number from 12:00am-11:59pm

3. Poisson Random Var

4. DVF: PEEKCHARQQ, Why can not stop this program?

5. Random Number Generator for Sample OO Program

6. Random number not random?

7. Pentium III processor number and random number generator

8. STOP distribution check

9. Stop doing Regina development!!

10. STOP what you’re doing - It doesn’t work! 25RA

11. What am I doing wrong!

12. What am I doing wrong?

 

 
Powered by phpBB® Forum Software