Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl version single/multithreaed

by Corion (Patriarch)
on Aug 07, 2013 at 08:39 UTC ( [id://1048294]=note: print w/replies, xml ) Need Help??


in reply to perl version single/multithreaed

perl -V:usethreads

will tell you that.

Also see Config.pm, which has the same information:

use Config '%Config'; print $Config{ usethreads };

A conceptual problem with your question may be that you think that only certain version numbers of Perl come threaded or unthreaded. This is a misconception. Perl can be built with or without threads in any version number starting since 5.6 (or even earlier). Whether you have threads available depends on the person who built your Perl binary and whether they enabled that option or not.

Replies are listed 'Best First'.
Re^2: perl version single/multithreaed
by ghosh123 (Monk) on Aug 07, 2013 at 10:14 UTC

    Hi
    Well, I am usnig perl 5.8.8 which I think is single threaded. But I want to move to a multi-threaded perl version. Can you please confirm if perl 5.10 is multithreaded or not ? Or multi-threading is supported in 5.8.8 as well ?
    Consider that threads are enabled in the perl binary.

      5.8.8 can be multi-threaded; it depends on how it was compiled.

      5.10.x can be single-threaded; it depends on how it was compiled.

      Run this command on your machine and post the output: perl -V


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        perl -V output for 5.10.1

        Summary of my perl5 (revision 5 version 10 subversion 1) configuration +: Platform: osname=linux, osvers=2.6.9-89.0.3.elsmp, archname=i686-linux-threa +d-multi uname='linux kiew013 2.6.9-89.0.3.elsmp #1 smp sat jun 13 07:05:54 + edt 2009 i686 i686 i386 gnulinux ' config_args='-Dprefix=/opt/perl_5.10.1 -Dmydomain=.dal.xxx.com -Dcf_email=perl@dal.xxx.com -Uinstallusrbinperl -Dperlpath=/opt/perl_5.10.1/bin/perl -Dinstallman1dir=/opt/perl_5. +10.1/man/man1 -Dman1dir=/opt/perl_5.10.1/man/man1 -Dinstallman3dir=/opt/perl_5.1 +0.1/man/man3 -Dman3dir=/opt/perl_5.10.1/man/man3 -Dperladmin=perl@dal.xxx.com - +Dprivlib=/opt/perl_5.10.1/lib -Darchlib=/opt/perl_5.10.1/lib -Dsiteli +b=/opt/perl_5.10.1/lib -Dsitearch=/opt/perl_5.10.1/lib -Dscriptdir=/o +pt/perl_5.10.1/bin -Dsitescript=/opt/perl_5.10.1/bin -Ubincompat5005 +-Dlibperl=libperlifx.so -Dcc=gcc -m32 -Dld=gcc -m32 -Dldflags=-Wl,-rp +ath,/opt/perl_5.10.1/ext/lib -Dbin=/opt/perl_5.10.1/bin -Dbinexp=/opt +/perl_5.10.1/bin -Dsitebin=/opt/perl_5.10.1/bin -Dlocincpth=/opt/perl +_5.10.1/ext/include -Dloclibpth=/opt/perl_5.10.1/ext/lib -Dglibpth=/u +sr/lib /lib -Duseshrplib -Dusethreads -Dpager=/usr/bin/less -Dsed=/bi +n/sed -Doptimize=-O2 -march=pentium4 -Dlddlflags=-shared -Wl,-rpath,/ +opt/perl_5.10.1/ext/lib -Dyacc=bison -y -Dccflags=-DPERL_USE_SAFE_PUT +ENV -de' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc -m32', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAF +E_PUTENV -fno-strict-aliasing -pipe -I/opt/perl_5.10.1/ext/include -D +_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -march=pentium4', cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-s +trict-aliasing -pipe -I/opt/perl_5.10.1/ext/include' ccversion='', gccversion='4.3.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc -m32', ldflags ='-Wl,-rpath,/opt/perl_5.10.1/ext/lib -L/op +t/perl_5.10.1/ext/lib' libpth=/opt/perl_5.10.1/ext/lib /usr/lib /lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperlif +x.so gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E - +Wl,-rpath,/opt/perl_5.10.1/lib/CORE' cccdlflags='-fPIC', lddlflags='-shared -Wl,-rpath,/opt/perl_5.10.1 +/ext/lib -L/opt/perl_5.10.1/ext/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_ITHREADS USE_LARGE_FI +LES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Apr 26 2010 10:52:39 %ENV: PERL5LIB="/opt/lsf_7.0.6/share/exec/lib" @INC: /opt/lsf_7.0.6/share/exec/lib /opt/perl_5.10.1/lib .


        Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.9-89.0.29.elsmp, archname=i686-linux uname='linux bern002 2.6.9-89.0.29.elsmp #1 smp tue aug 31 18:02:2 +1 edt 2010 x86_64 x86_64 x86_64 gnulinux ' config_args='-Dprefix=/opt/perl_5.8.8 -Dmydomain=.dal.xxx.com -Dcf_email=perl@dal.xxx.com -Uinstallusrbinperl -Dperlpath=/opt/perl_5.8.8/bin/perl -Dinstallman1dir=/opt/perl_5.8 +.8/man/man1 -Dman1dir=/opt/perl_5.8.8/man/man1 -Dinstallman3dir=/opt/perl_5.8. +8/man/man3 -Dman3dir=/opt/perl_5.8.8/man/man3 -Dperladmin=perl@dal.xxx.com -D +privlib=/opt/perl_5.8.8/lib -Darchlib=/opt/perl_5.8.8/lib -Dsitelib=/ +opt/perl_5.8.8/lib -Dsitearch=/opt/perl_5.8.8/lib -Dscriptdir=/opt/pe +rl_5.8.8/bin -Dsitescript=/opt/perl_5.8.8/bin -Ubincompat5005 -Dlibpe +rl=libperlifx.so -Dcc=gcc -m32 -Dld=gcc -m32 -Dcccdlflags=-m32 -Dldfl +ags=-Wl,-rpath,/opt/perl_5.8.8/ext/lib -Dbin=/opt/perl_5.8.8/bin -Dbi +nexp=/opt/perl_5.8.8/bin -Dsitebin=/opt/perl_5.8.8/bin -Dlocincpth=/o +pt/perl_5.8.8/ext/include -Dloclibpth=/opt/perl_5.8.8/ext/lib -Dglibp +th=/usr/lib /lib -Duseshrplib -Uusethreads -Dpager=/usr/bin/less -Dse +d=/bin/sed -Doptimize=-O2 -march=pentium4 -Dlddlflags=-shared -Wl,-rp +ath,/opt/perl_5.8.8/ext/lib -Dyacc=bison -y -Darchname=i686-linux -Dc +cflags=-DPERL_USE_SAFE_PUTENV -UHAS_GETSPNAM -UHAS_GETSPNAM_R -de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc -m32', ccflags ='-DPERL_USE_SAFE_PUTENV -UHAS_GETSPNAM -UH +AS_GETSPNAM_R -fno-strict-aliasing -pipe -Wdeclaration-after-statemen +t -I/opt/perl_5.8.8/ext/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -I/usr/include/gdbm', optimize='-O2 -march=pentium4', cppflags='-DPERL_USE_SAFE_PUTENV -UHAS_GETSPNAM -UHAS_GETSPNAM_R - +fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/perl_5 +.8.8/ext/include -I/usr/include/gdbm' ccversion='', gccversion='4.1.2', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc -m32', ldflags ='-Wl,-rpath,/opt/perl_5.8.8/ext/lib -L/opt +/perl_5.8.8/ext/lib' libpth=/opt/perl_5.8.8/ext/lib /usr/lib /lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperlif +x.so gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E - +Wl,-rpath,/opt/perl_5.8.8/lib/CORE' cccdlflags='-m32', lddlflags='-shared -Wl,-rpath,/opt/perl_5.8.8/e +xt/lib -L/opt/perl_5.8.8/ext/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Jan 13 2011 14:45:43 %ENV: PERL5LIB="/opt/lsf_7.0.6/share/exec/lib" @INC: /opt/lsf_7.0.6/share/exec/lib /opt/perl_5.8.8/lib .

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1048294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-28 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found