Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: perl version single/multithreaed

by ghosh123 (Monk)
on Aug 07, 2013 at 10:14 UTC ( #1048321=note: print w/replies, xml ) Need Help??


in reply to Re: perl version single/multithreaed
in thread perl version single/multithreaed

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.

Replies are listed 'Best First'.
Re^3: perl version single/multithreaed
by BrowserUk (Patriarch) on Aug 07, 2013 at 10:19 UTC

    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 .

        For your 5.10 version this: archname=i686-linux-thread-multi and these: useithreads=define, usemultiplicity=define & this  USE_ITHREADS are all telling you it is compiled for multi-threading.

        Conversely, your 5.8.8 has this: archname=i686-linux and these:usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef telling you it is not.


        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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2022-05-20 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?