- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
A piece of my subroutinelooks like this:
subroutine selecont (ngroup, gtake, kitem, itype)
integer iwork(6), icont(6)
integer iwork(6), icont(6)
do i=1, ngroup
iwork(i)=i
enddo
do i=1, ngroup
rnd = rand()
==> irnd = int(rnd*(ngroup - i + 1) + 1)
icont(i) = iwork(irnd)
iwork(irnd) = iwork(ngroup - i + 1)
enddo
iwork(i)=i
enddo
do i=1, ngroup
rnd = rand()
==> irnd = int(rnd*(ngroup - i + 1) + 1)
icont(i) = iwork(irnd)
iwork(irnd) = iwork(ngroup - i + 1)
enddo
I found that when the main program calls the subroutine the second time,
the line with ==> mark will cause a server error (157), access violation.
I ran the same program unmodified with g77 (under Windows), no problem
appeared.
Does any know how to fix the problem?
Thanks in advance!
S. Doong
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's not enough code here to determine the problem's cause. You can, if you wish, submit a reproducible example to Intel Premier Support and we'll take a look.
Message Edited by sblionel on 04-25-2005 11:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using the 'use ifport' statement solves the problem.
Thanks.
tungsh

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page