- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Perl on OpenVMS multithread
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 06:04 AM
тАО10-06-2008 06:04 AM
Perl on OpenVMS multithread
I'm a new poeple in the perl world
Here is the code I try to execute and after the result. Is there a way to solve this ?
Thanks for Help
Seghers Bruno
Belgium
#!/usr/bin/perl
#leaks memory- Threads::Queue is for the old Threads <5.7
use strict;
use threads;
use Thread::Queue;
my @threads;
my $thread;
my $q = Thread::Queue->new();
$q->enqueue(1..10000);
print "Items in the queue: ",$q->pending,"\n";
for (1..5) {
push @threads, threads->new(\&ttest);
print "spawned thread:";
}
foreach $thread (@threads){
$thread->join;
}
sub ttest {
while (my $cnt = $q->pending) {
my $item = $q->dequeue;
print "$cnt\n";
last if $cnt == 0 ;
}
}
Results of execution :
USRDISK0:[USERS.MEESSEN.WORK]>perl test_thr.pl
test_thr.pl line 4:
This Perl hasn't been configured and built properly for the threads
module to work. (The 'useithreads' configuration option hasn't been used.)
Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module. (In other words, threaded and non-threaded Perls
are binary incompatible.)
If you want to the use the threads module, please contact the people
who built your Perl.
Cannot continue, aborting.
BEGIN failed--compilation aborted at /perl_root/lib/VMS_AXP/5_8_6/threads.pm line 28.
Compilation failed in require at test_thr.pl line 4.
BEGIN failed--compilation aborted at test_thr.pl line 4.
%SYSTEM-F-ABORT, abort
USRDISK0:[USERS.MEESSEN.WORK]>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 06:07 AM
тАО10-06-2008 06:07 AM
Re: Perl on OpenVMS multithread
BKS005/SEGH/BKS> perl -v
This is perl, v5.8.6 built for VMS_AXP
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 06:53 AM
тАО10-06-2008 06:53 AM
Re: Perl on OpenVMS multithread
http://www.cpan.org/src/perl-5.10.0.tar.gz
You'll need gunzip, a tar utility, the HP C compiler, and MMK (MMS should work but doesn't). Once you've got the kit unpacked, have a look at README.vms. The short version of what you'll need to do is:
$ @configure -"Duseithreads"
$ mmk
$ mmk test
$ mmk install
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 07:04 AM
тАО10-06-2008 07:04 AM
Re: Perl on OpenVMS multithread
Well,
The message means it.
You'll have to build your own perl with Threads enabled, or find a (systems) person to do so for you.
Personally I have no experience with that so can not help you. Craig Berry, a perl/vms wizard, does stop by here, and can possibly provide a more complete answer.
In the mean time I suggest you look (google) around for a perl 5.10 kit and check the build instructions.
You may also want to cross-post in the perl.vmsperl newgroup. Other OpenVMS Perl resources (like John Malmberg) focus more on those than the itrc forum:
http://groups.google.com/group/perl.vmsperl/search?hl=en&group=perl.vmsperl&q=threads
btw 1... not relevant for this question, but if when posting source code in this forum, it is best to check 'Retain Format', otherwise it will eat your spaces, harming readability.
btw 2... The versions of perl on the more or less public access system Eisner and hp-testdrive have not been build with threads either.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 07:33 AM
тАО10-06-2008 07:33 AM
Re: Perl on OpenVMS multithread
He did stop by, and he did provide a complete answer between the time that I saw the question and before I hit my 'submit' button.
:-)
Oh well, That'll teach me to jump in. (not!)
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2008 11:29 PM
тАО10-06-2008 11:29 PM
Re: Perl on OpenVMS multithread
Seghers Bruno