SIGN in Sun Studio 11 (x86) running slowly

Hi,
I recently discovered that the sign (dsign) intrinsic function seems to be much slower than expected when using the -fast switch on an x86 platform. I compile with f95 -f77 -fast.
Specifically, the intrinsic sign function is much slower than replacing the sign with a homegrown function which consists of an if-then-else statement (see below: function "fastsign"). However, when using -g or no optional compiler switches at all, the intrinsic sign function is slightly faster than the homegrown function.
I'm experiencing this problem on Solaris 10, Sun Studio 11, Fortran 95 8.2 Patch 121020-02 2006/04/06 with an AMD Opteron CPU at 2.6GHz.
As a check, I ran the code on an UltraSparc II 450MHz with Solaris 9 and the Fortran 77 5.3 2001/05/15 compiler, also with the -fast switch and found that the intrinsic sign and the homegrown function mentioned above take about the same amount of time.
While it's not difficult to replace the uses of the intrinsic sign with the function I created, this problem only occurs when using the -fast switch.
Any help anyone could give me would be appreciated. Alternatively, if someone could suggest an alternative library to use, that would work too.
I realize that this post is sort of similar to a post by another user experiencing slow double intrinsic functions, so I apologize in advance if this should not be a new post.
Thanks in advance,
Jon
c
       program test1
c
       implicit    none
       integer     i     , imax
       real*8      q1    , q2    , q3    , q4    , t1    , t2
       real        etime , dummy(2)
       parameter ( imax = 1000000 )
       real*8      fastsign
c
c-----------------------------------------------------------------------
c
c      Initialise CPU timer
c
       t1 = dble ( etime ( dummy ) )
c
       q1 = 1.0d0
c
       t1 = dble ( etime ( dummy ) )
       q3 = 0.0d0
       do i = 1,imax
         q2 = sign ( 0.5d0, q1 )
         q3 = q3 + ( 0.5d0 + q2 ) * 2.0d0
       enddo
       t1 = dble ( etime ( dummy ) ) - t1
c
       t2 = dble ( etime ( dummy ) )
       q4 = 0.0d0
       do i = 1,imax
         q2 = fastsign ( 0.5d0, q1)
         q4 = q4 + ( 0.5d0 + q2 ) * 2.0d0
       enddo
       t2 = dble ( etime ( dummy ) ) - t2
c
       write(6,2000) q3, q4
       write(6,2010) 'd_sign'           , t1
       write(6,2010) 'fastsign'         , t2
       write(6,2010) 'sign/fastsign'    , t1 / t2
c
c
2000   format(2e16.8)
2010   format(a16,1pe16.8)
c
       stop
       end
c
c-----------------------------------------------------------------------
c
       function fastsign ( a1, a2 )
c
       real*8        fastsign, a1      , a2
c
c-----------------------------------------------------------------------
c
       if (a2 .ge. 0.0d0) then
         fastsign =   a1
       else
         fastsign = - a1
       endif
c
       return
       end
c
c-----------------------------------------------------------------------
c

If you compile with -S, you will see that the implementation of SIGN is inlined from a function called __f95_sign. You can find that function in /opt/SUNWspro/prod/lib/libm.il, or in .../prod/lib/amd64/libm.il for the version used with -xarch=amd64. It's just a text file, so you can change it if you like. (It might be prudent, though, to make a different .il file just for your version of __f95_sign.)
By the way, your implementation of fastsign assumes that a1 is positive. If a1 is negative, it will get incorrect results. It also assumes that a2 is not a NaN, but that probably doesn't matter.
It's also possible that your timing results have been skewed by the compiler inlining fastsign. That inlining happens earlier than the inlining of __f95_sign, so the compiler can apply more optimizations. In some cases it will delete a loop entirely. I haven't looked at what it's doing to your code. It's best to inhibit inlining with -xinline=.

Similar Messages

  • Two compile issues with Sun Studio 12 @ x86(_64 = amd64)

    The following two issues are absent on Solaris 10 SPARC and all previous Sun Studio versions (8 to 11), but present on both amd64 Solaris 10 and Linux 2.6 versions:
    1. mozilla.org's Spidermonkey "JavaScript" (ECMAscript) can't be compiled with it: in file jsinterp.c an endless loop is entered by the optimizer in level -xO1 and higher (!). With no optimization, linking is impossible (unresolved symbols from jsinterp.o), which hints to defunct output.
    2. the optimizer (ube) is crashing in sources with a switch with many many case labels in optimization level -xO3 and higher with a segfault.

    I have trouble to seperate a reasonable (example) source out of our complex sources showing the second issue --- what I can already tell is, that the following special pragma has to do with it (while I'm now in doubt that the each 256 case labels per switch, two switches in an if else clause have to do with it):
    #pragma opt 0 (func_name)
    Own1 Own2 func_name(...)
    The buggy versions I can tell you: they are
    on Solaris 10 amd64:
    /opt/SUNWspro/bin/cc -V
    cc: Sun C 5.9 SunOS_i386 2007/05/03
    /opt/SUNWspro/prod/bin/ube -V
    ube: Sun Compiler Common 12 SunOS_i386 2007/05/03
    on GNU/Linux:
    cc -V
    cc: Sun C 5.9 Linux_i386 2007/05/03
    ube -V
    ube: Sun Compiler Common 12 Linux_i386 2007/05/03
    The only important compiler option in this regard seems to be the optimization level, but the situation is complex too, if others should be also involved. I will investigate further...

  • Sun Studio 12 startup exception

    Hi,
    Below was the exception I got when I started Sun Studio, it was running fine until I installed glib from pkgutil and it was still running fine when I was in the IDE. The error only happened after I quit Sun Studio and go back in. Any idea?
    java.lang.NullPointerException
    at org.netbeans.core.windows.persistence.TCRefParser$PropertyHandler.startElement(TCRefParser.java:250)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1157)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at org.netbeans.core.windows.persistence.TCRefParser$PropertyHandler.readData(TCRefParser.java:220)
    at org.netbeans.core.windows.persistence.TCRefParser.load(TCRefParser.java:79)
    at org.netbeans.core.windows.persistence.ModeParser.readTCRefs(ModeParser.java:293)
    at org.netbeans.core.windows.persistence.ModeParser.load(ModeParser.java:120)
    at org.netbeans.core.windows.persistence.WindowManagerParser.readModes(WindowManagerParser.java:408)
    at org.netbeans.core.windows.persistence.WindowManagerParser.load(WindowManagerParser.java:87)
    at org.netbeans.core.windows.persistence.PersistenceManager.loadWindowSystem(PersistenceManager.java:1015)
    at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:83)
    at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:45)
    [catch] at org.netbeans.core.NonGui$3.run(NonGui.java:224)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Are you saying that "sunstudio" does not run anymore on this system?
    Can you try to start it with empty userdir?
    % rm -rf /tmp/newdir
    % sunstudio --userdir  /tmp/newdir
    BTW, what OS do you use? I guess it is Linux, correct?
    Thanks,
    Nik

  • How to run lint in the Sun Studio 12 IDE

    I'm a newbie to the Sun Studio IDE, and I can't find a way to run lint in the IDE. The C compiler does not give many warnings (unused variables, etc), and lint does, so I want to get the lint diagnostics within the IDE.
    I can run lint from a terminal, but that is very cumbersome when you have many source files.
    Thanks

    I've inherited a large project and need to run Lint on the code. I came across this thread doing an internet search. This is my first time using SunStudio, so I'm pretty clueless with every aspect of getting this code through Lint.
    I have been able to get the code compiled and everything is imported correctly into Sun Studio, though I'm not 100% sure how I did it.
    Can somebody explain the above commands for me to add into the Makefile, so I can run Lint in the IDE? Or, explain a better way to get Lint running on the code in the IDE?
    Thank you for your help, in advance.

  • Can i call signed applet from jsf page in sun studio creator

    Hello javites,
    I want to know whether i can call signed applet from jsf page in sun studio creator. If possible, how do i go about it.
    Thanks.

    This tutorial may help:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/applet.html?feed=DSC

  • Sun Studio code hangs at fork, GCC code runs fine

    I am encountering a strange problem where code complied with GCC runs fine, but the same code compiled with Sun Studio 12 compiler hangs at a fork call after an initial set of fork calls.
    I'd appreciate your help in solving this.
    The code was originally written for GCC, I started using the Sun Studio with a view to using Sun's thread analyzer. I made a couple of changes which I think are inoccuous:
    (a) added #ifdef __SUNPRO_CC char * __FUNCTION__ = "name"; #endif
    (b) one more #ifdef around one call to ctime_r because the g++ include expects 2 parameters while Sun Studio 12 expects 3 parameters.
    The g++ is compiled on a Solaris 9 (1 x sparcv9) using GCC 3.3.3
    while the Sun Studio 12 is on a Solaris 10 ( 4 x sparcv9).
    Both runs were on the same Solaris 10 machine which has the compiler.
    The program is a multi instance socket listener, the main program binds to a socket, then forks off a set of processes which accept connections, those children later fork off other client applications based on the connection data; after those clients exit, the children continue accepting etc. The main program only monitors the child processes, records their status and starts if any of those die.
    This is working as expected when compiled with g++.
    The exact same code (note the two sets of #ifdefs above) when compiled with Sun PRO CC alway hangs at the second set of fork. That is, it goes through the first set of forks fine, then when a connection is established, it reads the data but hangs right at the fork call.
    The application code at this point is:
    char * p = pathfind( getenv("PATH"), progname );
    if ( !p ) {  printError(); return false; }
    pid = fork();
    The truss for the Sun Studio code shows
    23914: access("/usr/bin/progname", X_OK) = Err#2 ENOENT
    23914: access("/usr/you/bin/progname", X_OK) = 0
    23914: lwp_park(0x0000000, 0) (sleeping)
    while the truss for the g++ code shows
    23986: access("/usr/bin/progname", X_OK) = Err#2 ENOENT
    23986: access("/usr/you/bin/progname", X_OK) = 0
    23996: fork1() = 24005
    What am I doing wrong?
    Thanks and best regards

    If I understand correctly, you are compiling with gcc on Solaris 9, and with Sun Studio on Solaris 10. Since the OS is different, you might be running into OS issues and not compiler issues. What happens if you build with the same gcc version on the Solaris 10 system where you see the problem?
    By "OS issues", I mean
    1. The program uses unstable or undocumented OS interfaces, or
    2. A bug that is new in Solaris 10.
    A bug was identified in Solaris 10 that could cause forks to hang. It showed up in the libpkcs11 library as used by the JVM. I don't know whether it showed up elsewhere.
    This bug was fixed in Solaris 10u2. If you are using an earlier version of Solaris 10, you could try upgrading.

  • Is it possible to run sun studio 12 ide with sun studio 8 compiler?

    Hi, i am in the process of evaluating sun studio 12. Our company cannot move to sun studio 12 compiler collection right now as it is a huge code base and it will take us few months even before we start using sun studio 12 compiler in our development environment. Is it possible to use sun studio 12 ide with sun studio 8 compiler collection(CC, dbx etc)? Your feedback is appreciated. thank you.

    There are two parts to the answer.
    1) whether you can
    To choose a compiler set follow Tools->Options->C/C++
    and in the BuildTools tab you'll see how it picks up
    compilers from your PATH.
    This dialog doesn't govern choice of dbx, which will always
    come from the installation. However you can alter which dbx
    is used by presetting the environment variable SPRO_DBX_PATH
    to teh full pathname of a dbx of your choice.
    2) whether you should
    The IDE should work reasonably well with older compilers. They
    are not that tightly bound.
    The IDE will not work well enough with an older dbx, especially as
    old as studio 8. However, while not officially supported or tested
    the SS12 dbx should be reasonably bwd compatible with code
    generated from older compilers.
    So my recommendation is: don't use SPRO_DBX_PATH and
    give the old compilers a try.

  • How to fix aSun Studio 9 bug running on a Solaris 10 ?

    Hi all
    I have Sun Studio 9 installed on a Sun Solaris 10 and when I try to run the debug tools I receive this Issue
    (dbx) cd /users/****/ISMD_V10_integration/MMI/IHM/SCHEMA/bin
    (dbx) debug /users/***/ISMD_V10_integration/MMI/IHM/SCHEMA/bin/dbtool.Solaris
    Reading dbtool.Solaris
    Reading ld.so.1
    dbx: internal error: signal SIGSEGV (no mapping at the fault address)
    dbx's coredump will appear in /tmpSo I tried to install this Patch [1186876|http://sunsolve.sun.com/search/document.do?assetkey=1-21-118676] .
    This is what I received
    # patchadd 118676-02
    Validating patches...
    Loading patches installed on the system...
    Done!
    Loading patches requested to install.
    Cannot open pkginfo file /users/spiteri/118676-02/SUNWxcu4t/pkginfo
    Done!
    Checking patches that you specified for installation.
    Done!
    The following requested patches will not be installed because
    they have been made obsolete by other patches already
    installed on the system or by patches you have specified for installation.
               0 All packages from patch 118676-02 are patched by higher revision patches.
    No patches to install.More over when I checked if the patch exist I have this
    # showrev -p | grep 118676
    Patch: 118676-03 Obsoletes:  Requires:  Incompatibles:  Packages: SUNWsprot, SUNWxcu4tThen I checked the DBX version
    # dbx
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.3' in your .dbxrc
    (dbx) version                                                               
    Machine hardware:   sun4u
    OS version:         5.10
    Processor type:     sparc
    Hardware:           SUNW,Sun-Fire-280R
    The following components are installed on your system:
    Sun Studio 9
            Sun Studio 9 C Compiler
            Sun Studio 9 C++ Compiler
            Sun Studio 9 Tools.h++ 7.1
            Sun Studio 9 C++ Standard 64-bit Class Library
            Sun Studio 9 Garbage Collector
            Sun Studio 9 Fortran 95
            Sun Studio 9 Debugging Tools (including dbx)
            Sun Studio 9 Debugger GUI
            Sun Studio 9 Performance Tools (including collect, ...)
            Sun Studio 9 X-Designer
            Sun Studio 9 VIM editor
            Sun Studio 9 XEmacs editor
            Sun Studio 9 Native Connector Tool
            Sun Studio 9 LockLint
            Sun Studio 9 Building Software (including dmake)
            Sun Studio 9 Documentation Set
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.0 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.3 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Performance Analyzer 7.3 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.5 2004/07/15And to conclude I tried this
    pstack core | c++filt
    core 'core' of 15779:   /opt/SUNWspro/bin/../prod/bin/sparcv9/dbx -g sync,stdio -c dbxenv supp
    ffffffff7e8d3894 _lwp_kill (6, 0, ffffffff7e8b5dd4, ffffffffffffffff, ffffffff7e9ec000, 0) + 8
    ffffffff7e84a5ec abort (1, 1b8, 0, 1a1b20, 0, 0) + 118
    00000001000b4204 ???????? (1005fd, 100400, a, 100400, 10060b000, 100512e30)
    ffffffff7e8d2798 __sighndlr (a, ffffffff7fffb7d0, ffffffff7fffb4f0, 1000b3f30, 0, 9) + c
    ffffffff7e8c6a04 call_user_handler (ffffffff7e700200, ffffffff7e700200, ffffffff7fffb4f0, 8, 0, 0) + 3e0
    ffffffff7db19b30 Pgetauxval (1012eae48, 7e3, ffffffff7f736c60, ffffffff7f61c5bc, 6f723c636861723e, 7e3) + 38
    ffffffff7db0b12c Pbrandname (1012eae48, ffffffff7fffbfc0, 400, 0, ffffffff7f736c60, 821) + 8
    ffffffff7db185a0 ps_pbrandname (1012eae48, ffffffff7fffbfc0, 400, 1001afee0, ffffffff7d806000, 1) + c
    ffffffff7d701bfc _rd_reset32 (7e0, ffffffff7d806000, ffffffff7d806000, 100691860, ffffffff7d806000, 1) + 488
    ffffffff7d700df0 rd_reset (1011f0540, 0, 1052ac, ffffffff7e8c88f4, 1, 0) + a8
    ffffffff7d700eb8 rd_new (1012eae48, ffffffff7cf00160, 1025a6b40, 0, ffffffff7d806000, ffffffff7d806000) + a8
    00000001003146e0 void RtldAgent::open(Pcs*,const ps_prochandle*) (101789570, 10062a180, 1012eae48, 100558, 1, ffffffff7d700e10) + 68
    00000001001acbec ???????? (1012aec40, 0, 100691cf0, 10053dd33, 10053d000, ffffffff7fffc6e0)
    00000001001addd4 Proc*ProcMgr::start(Target*,bool,bool,bool) (100512e30, 0, 100627a50, 0, 1012aec40, 10053e18e) + 92c
    0000000100171bb8 int do_run(Interp*,bool,Level_e) (100400, 10053b000, 100400, 100512e30, 1, 100400) + 19c
    00000001002abf28 ???????? (10056b477, 1025a7890, 10062b638, 0, 100642750, 10068ec70)
    00000001002aac18 int pdksh_execute(Interp*,op*,int) (10062b5f0, 100643740, 0, 10062b5f0, 103084180, 101339a10) + 1c0
    000000010029746c int pdksh_shell(Interp*,Source*) (10062b5f0, 102703bd0, 3, 100569df9, 100569e00, 1000b3c10) + 4c0
    0000000100296eac int pdksh_command(Interp*,const char*) (ffffffffffffffff, 0, 1, 1, 10062b5f0, 10066bb40) + 88
    00000001001523e0 void MyServantDbx::ksh_cmd(int,unsigned,const char*) (1006604e0, 0, 0, 1025a7714, 10052a, 10060c3f0) + 98
    00000001002d82e4 bool Dispatcher::dispatch(ProtoReceiver*,MsgRcv*) (1002c1b4c, 1006604e0, ffffffff7fffd278, 1002c1b4c, 100000, 0) + 100
    00000001002d4968 void Messenger::handle_message_help(AuthStyle,MsgRcv&) (1006604e0, 0, ffffffff7fffd278, 10056f358, 10056f000, 1002c8498) + a4
    00000001002d46dc void Messenger::handle_message(AuthStyle) (1006604e0, 0, 0, ffffffff7fffd278, 10052b0d0, 100000) + dc
    00000001002c87ac void Servant::cb_message(int,unsigned short,void*) (b, 10052b0d0, 1006604e0, 1003e3000, 1003e3, 100000) + 8c
    00000001002c3ed4 void CBInfo::dispatch(int,unsigned short) (100625bc0, 10056f, 1003e1687, b, 100400, 1) + ac
    00000001002c4304 void Notifier::invoke(int,unsigned short,CbData*) (10065f0b0, b, 1, 100625bc0, 1002c8721, 1002c3e28) + 18
    00000001002c4b88 void NotifierDirect::dispatch_help(int,unsigned short,CBInfo*,bool*) (10065f0b0, b, 100400, 100625bc0, ffffffff7fffda2f, 1000000000000) + c4
    00000001002c51ac bool NotifierPoll::dispatch(bool*) (10065f0b0, ffffffff7fffda2f, ffffffff7fffd630, 18, 1003e1d7c, ffffffff7fffd770) + 27c
    00000001002c4d0c void NotifierDirect::loop(bool*) (10065f0b0, ffffffff7fffda2f, 1003e1, 10056eeb8, 100000, 1003e1b89) + 9c
    000000010014fd0c ???????? (10062b5f0, ffffffff7fffdb1c, 100400, 10052a5b3, 100512e30, 10052a)
    000000010029e874 ???????? (10062b5f0, 100400, 10056a69d, 0, 10066bb40, 1)
    000000010029c888 int yylex(Interp*,int) (10062b5f0, 9, 0, 0, 10062b830, ffffffff7fffdc5c) + 220
    000000010029a3fc int yyparse(Interp*) (10062b5f0, 100400, ffffffff7fffddd8, 0, 0, 1) + 18
    000000010029c5c4 op*compile(Interp*,Source*) (10062b5f0, 10066bb40, 64, 100506000, 10062b798, 10066bbc8) + 28
    00000001002972a8 int pdksh_shell(Interp*,Source*) (10062b5f0, 10066bb40, 100400, 100569df9, 100569e00, 1000b3c10) + 2fc
    00000001000b817c void main_cmd_loop(Interp*) (10062b5f0, 100400, 100507c50, 1005e52e8, 100555400, 100507) + a8
    00000001000b91ac main (100400, 100506, 100507c50, 10062b5f0, 100512e30, 1) + b8c
    00000001000b1e3c _start (0, 0, 0, 0, 0, 0) + 17cSo can someone help me please ??

    You are seeing 6477975, which is fixed in dbx patch 117564-07 (which is for sparc) and 117565-07 (for x86).
    However, if you are already on Solaris 10, I'd recommend to upgrade to Sun Studio 12, which is free, has many improvements and works much better with Solaris 10. If you, for any reason, can't upgrade compilers to Studio 12, you can still use Sun Studio 12 IDE plus debugger and compilers from Studio 9. It is easy to install several versions of Sun Studio on a machine, you just need to give different base directories to the installer.

  • Need help building boost_1_37_0 on Solaris 10 U6 with Sun Studio 12

    Hi,
    Ok, please bear with me here. I've tried many different sets of instructions, and haven't had success with any of them (including the ones at http://blogs.sun.com/sga/category/Boost).
    Operating System: Solaris 10 x86 U6
    Compiler: Sun Studio 12 (SUNCC version 5.9)
    Boost version: 1.37.0
    The ONLY part of boost that I need is regex. I've never built external libraries before and building boost on Solaris seems a rather daunting task. So, could someone please explain, as clearly as possible, how do I build the boost::regex library using SUNCC?
    I know this is a very broad topic, but since I haven't had any luck with any existing instructions that google turns up, alas I am here.
    Thanks in advance if someone can help me,
    ~Slow
    Note: I don't need any special options, any special, non-standard install paths, nothing. Just a straight, stock, boost install.
    Edited by: SlowToady on Nov 10, 2008 2:18 PM

    First, be sure you have the current patches for Sun Studio 12. You can get them here:
    http://developers.sun.com/sunstudio/downloads/patches/
    Please install the current C++ compiler patch, the C compiler patch, and the common back-end compiler patch.
    You should then be able to build BOOST 1.37.0. The only problem I know of has been filed as CR 6767881, which results in an incorrect complaint about a constructor not being accessible. But I don't think that one affects regex.
    If you running into some other problem after patching the compiler, please post enough detail that we can investigate it.
    Questions about how to build just a portion of BOOST are probably best addressed to a BOOST forum.

  • Sun Studio is unable to find a supported version of the NetBeans IDE at the

    I'm following the system install instructions in the Grid Compute Utility guide, Appendix A "Building a Local Development Environment" and am getting stuck on step 4, installing sunstudio. I'm running Solaris 5.10 on x86 and can run netbeans IDE without problem. Here is some info, I'm not sure what other system info is relevant:
    bash-3.00# which netbeans
    /opt/netbeans-5.5.1/bin/netbeans
    bash-3.00# which sunstudio
    /usr/bin/sunstudio
    bash-3.00# sunstudio
    Validating NetBeans IDE at: "/opt/SUNWspro/../netbeans-5.5.1"
    Sun Studio is unable to find a supported version of the NetBeans IDE at the specified location.
    Sun Studio requires a NetBeans IDE version 5.5.1 with NetBeans C/C++ Development Pack version 5.5.1
    installed. Sun Studio looks for a valid NetBeans IDE installation in the following order:
    1) Location specified with --netbeanshome command line option
    2) At /opt/netbeans-5.5.1 location, if exists
    3) At /opt/SUNWspro/../netbeans-5.5.1 location, if exists
    4) At /opt/SUNWspro/../../netbeans-5.5.1 location, if exists
    Please run the System Preparation Tool (prepare_system), if available, to set up your environment.
    Any help!?

    Did you install NetBeans separately or let Sun Studio installer do it? The latter usually results in working configuration.
    I think that NetBeans installation simply doesn't have c++ pack; you can install one following usual NetBeans modules installation path and then re-try starting Sun Studio.
    Another option is to uninstall NetBeans and re-install Sun Studio using its installer, which should set up NetBeans properly.

  • How to apply signed patches to Studio 11 under Solaris 10?

    I'm running Solaris 10 6/06 on a Sun W2100z (x86_64) workstation. I have a long history of experience with Solaris, but I'm not terribly familiar with the things that are new or different with 10, including zones and the new patch management tools.
    I want to apply the latest patches to the various components of Studio 11, e.g. 120759-08,
    121018-04, etc. Since all the other patches I've applied (for other OS subsets) have been "signed" patches, I was hoping to stay consisent and apply signed patches to Studio 11 too. I've been foiled at every attempt, though, so I'm looking for some help.
    - if I use /usr/bin/updatemanager to select and attempt to apply the patches, I just get error
    messages saying that the patches could not be applied:
    121016-03 Sun Studio 11_x86: Patch for Sun C_x86 5.8 Compiler            Failed
    Utility used to install the update failed with exit code {0}.
    120762-02 Sun Studio 11_x86: Patch for Performance Analyzer Tools       Failed
    Install of update failed. Utility used to install the update is not able to add packages. Utility used to install the update failed with exit code 5.... and so on.
    - if I try using "smpatch" to add the patch, I get this error:
    $sudo smpatch add -i 120759-08
    add patch 120759-08
    Transition old-style patching.
    Patch 120759-08 failed to install due to a failure produced by pkgadd.
    pkgadd: ERROR: The package <SPROlang> is currently installed on the system in the
    global zone. To install the new instance of this package in the global
    zone only, you must specify the -G option. To install the new instance
    of this package in all zones you must first remove the existing instance
    of this package from the global zone first (via pkgrm) and then install
    the new instance of this package in all zones.
    pkgadd: ERROR: package <SPROlang> cannot be installed on this system/zone- if I try to use "patchadd" directly with the jar file in the current directory, I get this:
    $sudo patchadd 120759-08
    Validating patches...
    Loading patches installed on the system...
    Done!
    Loading patches requested to install.
    Done!
    Checking patches that you specified for installation.
    Done!
    Approved patches will be installed in this order:
    120759-08
    Verifying signed patch <120759-08>...
    Verifying digital signature for signer <es-signature>
    ERROR: Signature verification failed while verifying certificate <subject=Sun Microsystems Inc Root CA, issuer=GTE CyberTrust Root>:<unable to get local issuer certificate>.
    ERROR: Unable to verify signature for signer <es-signature>
    Signature invalid on signed patch <120759-08>.
    Patchadd is terminating.That's three strikes, and I'm out of ideas. Any suggestions for how one goes about applying signed patches for Studio 11? I'll switch to unsigned if I have to, but this seems like it shouldn't be this hard.
    Thanks,
    Tim

    I started a new thread on the updatemanager forum.
    http://forum.sun.com/jive/thread.jspa?threadID=107410
    I found that forum by googling for "updatemanager" and "zones", but
    I couldn't find any recent information on this issue. It seems the
    problem has been known about for a while now.
    --chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Sun Update Manager attempts to patch wrong arch of Sun Studio 12

    Hi,
    I'm having patching problems as mentioned here: http://forum.java.sun.com/thread.jspa?threadID=5198127&tstart=0
    However, I recently (last week) installed an x86_64 version of Sun Studio 12 on my sparc NFS server as documented here: http://docs.sun.com/app/docs/doc/820-0274/6nc1b7u4r?a=view
    (Installing the Sun Studio 12 Software on a Solaris Server for Use by Clients With a Different Architecture)
    The clients are Sun Solaris 10 11/06 x86_64.
    After running "check for updates", Sun Update Manager today returned 9 patches for Sun Studio 12. All of these patches appear to be for sparc architecture:
    126995-01
    124861-02
    124867-01
    124863-01
    127000-01
    127143-01
    126503-01
    127001-01
    124872-01
    My question is, why doesn't Sun Update Manager realize that I installed the x86_64 version of Sun Studio 12 (for NFS exporting) and give me the x86_64 version of these patches?
    Or am I missing something? How does the procedure "Installing the Sun Studio 12 Software on a Solaris Server for Use by Clients With a Different Architecture" result in the package system on the NFS server being aware of the correct arch version of Sun Studio 12?
    This should explain more:
    (/opt/x86_64/SUNWspro is my NFS share)
    # pwd
    /opt/x86_64/SUNWspro
    # ls -l
    total 62
    lrwxrwxrwx 1 root root 15 Aug 12 18:32 LEGAL-SS12 -> prod/LEGAL-SS12
    drwxr-xr-x 2 root sys 25 Aug 12 18:33 READMEs
    lrwxrwxrwx 1 root root 9 Aug 12 18:31 atd1 -> prod/atd1
    drwxr-xr-x 3 root sys 95 Aug 12 18:33 bin
    drwxr-xr-x 5 root sys 5 Aug 12 18:32 contrib
    drwxr-xr-x 2 root sys 3 Aug 12 18:32 docs
    drwxr-xr-x 2 root sys 7 Aug 12 18:33 examples
    drwxr-xr-x 2 root sys 5 Aug 12 18:32 include
    drwxr-xr-x 3 root sys 3 Aug 12 18:30 inventory
    drwxr-xr-x 9 root sys 40 Aug 12 18:33 lib
    drwxr-xr-x 12 root sys 13 Aug 12 18:30 man
    drwxr-xr-x 2 root root 4 Aug 12 19:46 nb-install
    drwxr-xr-x 21 root sys 21 Aug 12 18:32 prod
    drwxr-xr-x 5 root sys 5 Aug 12 18:33 sfw
    # uname -a
    SunOS <hostname> 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V440
    # cd bin
    # ls
    CC cscope er_print gvim smctl visu
    CCadmin ctc er_rm indent ss_attach visuroot
    amd64 ctcr er_src lint sunCC whatdir
    analyzer ctrace etags lock_lint sunas xdcapture
    b2m cxref f77 ootags sunc89 xdconfig
    bcheck dbx f90 prepare_system sunc99 xdesigner
    bil2xd dem f95 ptclean suncc xdhelp
    c++filt dmake fbe rcs-checkin sunf77 xdrecord
    c89 dumpstabs fdumpmod rtc_patch_area sunf90 xdreplay
    c99 dwarfdump fpp rxm sunf95 xdroot
    cb ellcc fpr rxs sunstudio xdtosj
    cc er_archive fsplit sbcleanup tcov xemacs
    cc-5.0 er_cp gil2xd sbenter tha xemacs-mule
    cflow er_export gnuattach sbquery uil2xd
    checkjava er_kernel gnuclient sbtags version
    collect er_mv gnudoit smallxd version-5.0
    # file f95
    f95: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, stripped
    I obviously have the i386 version of f95 sitting on my sparc server. The x86 clients are happy with it - works great, but I want to be able to patch it.
    Can anyone tell me how to apply patches to my Sun Studio 12 installation in this case?
    Thanks,
    Phil

    its probably best to get your other patching issue sorted out first before going any further with this. it may turn out that fixing the problem of smpatch analyze recommending already installed patches will also fix this problem

  • Sun studio not working in linux

    I installed sun studio 12 in suse 10 linux, and i created a simple pgm,
    when compiling it, it shows these below errors,
    Running "/root/Desktop/sunstudio12/bin/dmake -f Makefile CONF=Debug" in /root/SunStudioProjects/Add
    dmake: defaulting to parallel mode.
    See the man page dmake(1) for more information on setting up the .dmakerc file.
    linux-n3wz --> 1 job
    /root/Desktop/sunstudio12/bin/dmake -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
    linux-n3wz --> 1 job
    mkdir -p build/Debug/Sun12-Linux-x86
    cc -c -g -o build/Debug/Sun12-Linux-x86/newmain.o newmain.c
    linux-n3wz --> Job output
    mkdir -p build/Debug/Sun12-Linux-x86
    cc -c -g -o build/Debug/Sun12-Linux-x86/newmain.o newmain.c
    (/root/SunStudioProjects/Add)newmain.c:
    "/root/Desktop/sunstudio12/prod/include/cc/stdio.h", line 5: cannot find include file: <stdio.h>
    "/root/Desktop/sunstudio12/prod/include/cc/stdlib.h", line 6: cannot find include file: <stdlib.h>
    "newmain.c", line 17: warning: implicit function declaration: scanf
    "newmain.c", line 19: warning: implicit function declaration: printf
    "newmain.c", line 20: undefined symbol: EXIT_SUCCESS
    cc: acomp failed for newmain.c
    *** Error code 2
    dmake: Fatal error: Command failed for target `build/Debug/Sun12-Linux-x86/newmain.o'
    Current working directory /root/SunStudioProjects/Add
    *** Error code 1
    dmake: Fatal error: Command failed for target `.build-impl'
    Build failed. Exit value 1.
    CAN any body tell me whats the exact problem?
    this same pgm is currectly running in sunstudio 12 installed in solaris.

    satmatrix wrote:
    ok, shall i install ubuntu in my laptop?No, I'm just saying that I'm not familiar with SuSe enough to tell what package you need to install to have standard includes. But you already have an answer now...
    Solaris 10 is not installable in my laptop, it doesnt support graphics, also i had tried opensolaris, it works without errors and it supports graphics,
    but can i install Sun Studio 12 in that?Of course. You can do it using OpenSolaris package manager; no need to download, unpack, install - package manager will do it for you.

  • How to install sun studio 12 under Centos 5???

    HI, all,
    I am trying to install Sun Studio 12 into Centos 5. The followings are what I did:
    1. Download sun studio 12 package by selecting Linex (x86) for Centos from web site and save this package under /var/tmp.
    2. I used bzcat to unpack this package by:
    bzcat < SunStudio12ml-linux-x86-200709-pkg.tar.bz2 | /bin/tar xvf -
    3. I did prepare_system before installation by:
    ./prepare_system [-d /opt/sun/ ] [-R /var/tmp/ ] [-C | -s netbeans | java | patches | all_patches | jdk_patches | all | print_needed_steps ]
    where [-d /opt/sun/ ] is the directory where all missing softwares will be installed, [-R /var/tmp/ ] is the directory where unpacked programs are saved.
    After running prepare_system, the resposes are:
    bash: -s: command not found
    bash: patches: command not found
    bash: all_patches: command not found
    bash: all: command not found
    bash: print_needed_steps: command not found
    bash: jdk_patches: command not found
    *Usage: gij [OPTION] ... CLASS [ARGS] ...*
    to invoke CLASS.main, or
    *gij -jar [OPTION] ... JARFILE [ARGS] ...*
    to execute a jar file
    *Try `gij --help' for more information.*
    4. I started to use installer with command line to install the sun studio 12 by:
    ./installer -nodisplay
    The result shows me some exceptions and installation is failed as:
    Exception in thread "Thread-1" java.awt.HeadlessException
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at javax.swing.JComponent.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at com.sun.wizards.core.WizardComponent.<init>(WizardComponent.java:159)
    at com.sun.wizards.core.WizardComposite.<init>(WizardComposite.java:83)
    at com.sun.wizards.core.WizardTreeManager.createWizardPanel(WizardTreeManager.java:890)
    at com.sun.wizards.core.WizardTreeManager.<init>(WizardTreeManager.java:325)
    at com.sun.wizards.core.CommandLineConsole.run(CommandLineConsole.java:75)
    at java.lang.Thread.run(libgcj.so.7rh)
    Task Failed: java.lang.NullPointerException
    java.lang.NullPointerException
    at java.lang.Class.isAssignableFrom(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at com.sun.setup.util.wbResource.getString(wbResource.java:212)
    at com.sun.setup.util.wbResource.getString(wbResource.java:132)
    at com.sun.setup.util.setupInitializationTask.perform(setupInitializationTask.java:88)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:343)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(libgcj.so.7rh)
    I followed installation instructions to install sun studio 12 under Centos 5. I can not make it. However, I made it under Solaries system.
    So, is there any special for Centos 5?
    Hunter 3D

    Hi,
    Thank you for your helps.
    According to your suggestions, I downloaded JDK 6 update 10 RC, specifical in Linux platform : self-extracting JDK file named:
    jdk-6u10-bin-b28-linux-i586-21-jul-2008.bin
    I saved downloading under the directory where sun studio is located.
    I used
    yum search jdk
    to find jdk exists in Centos 5.2 shown as the message as:
    [root@localhost sun]# yum search jdk
    Loading "priorities" plugin
    Loading "fastestmirror" plugin
    Loading mirror speeds from cached hostfile
    * rpmforge: ftp-stud.fht-esslingen.de
    * base: mirror.raystedman.net
    * updates: mirror.raystedman.net
    * addons: mirror.voxitas.com
    * extras: mirror.raystedman.net
    0 packages excluded due to repository priority protections
    jakarta-commons-launcher.i386 : The Launcher Component is designed to be a cross platform Java application launcher.
    jakarta-commons-collections.i386 : Jakarta Commons Collections Package
    mockobjects-alt-jdk1.4.i386 : Mockable API for JDK 1.4
    jakarta-commons-beanutils.i386 : Jakarta Commons BeanUtils Package
    gnu-crypto-sasl-jdk1.4.i386 : Gnu Crypto SASL API
    ldapjdk.i386 : The Mozilla LDAP Java SDK
    ldapjdk-javadoc.i386 : Javadoc for ldapjdk
    mockobjects-jdk1.4.i386 : MockObjects for 1.4 JDK
    I used
    ./installer -nodisplay
    to install sun studio 12 and error message show as:
    [root@localhost sun]# ./installer -nodisplay
    Exception in thread "Thread-1" java.awt.HeadlessException
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at javax.swing.JComponent.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at com.sun.wizards.core.WizardComponent.<init>(WizardComponent.java:159)
    at com.sun.wizards.core.WizardComposite.<init>(WizardComposite.java:83)
    at com.sun.wizards.core.WizardTreeManager.createWizardPanel(WizardTreeManager.java:890)
    at com.sun.wizards.core.WizardTreeManager.<init>(WizardTreeManager.java:325)
    at com.sun.wizards.core.CommandLineConsole.run(CommandLineConsole.java:75)
    at java.lang.Thread.run(libgcj.so.7rh)
    Task Failed: java.lang.NullPointerException
    java.lang.NullPointerException
    at java.lang.Class.isAssignableFrom(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at com.sun.setup.util.wbResource.getString(wbResource.java:212)
    at com.sun.setup.util.wbResource.getString(wbResource.java:132)
    at com.sun.setup.util.setupInitializationTask.perform(setupInitializationTask.java:88)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:343)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(libgcj.so.7rh)
    So, please tell me what I will do.
    Thank you.

  • Sun Studio 12 IDE and dbx

    I got fresh installation of the Sun Studio 12 on Solaris 10, and I am trying to debug in the IDE. Project is using Sun Studio's compiler. But in the options I can see only gdb debugger. I looked into installed plugins, and there is no plugin for dbx (there is for gdb). Am I missing something? dbx binary is installed.

    could you, please provide more details.
    What system, how you installed SS12, etc.Solaris 10 11/06 s10x_u3wos_10 X86
    I looked into installed plugins, and there is no plugin for dbx (there is for gdb).Where you are looking it for? Can you see module here:
    Tools | Module Manager | Debugging ?
    "dbx Debugger UI" Module should be there and should be enabled.
    "C/C++ GDB Debugger" should be disabled.Yes, I had been looking there. There is no dbx plugin in that list.
    In the installation log, dbx gui is referenced as installed without any problems:
    Sun Studio 12 dbx GUI plug-in(i386) 12.0,REV=2007.05.10
    Installing Sun Studio 12 dbx GUI plug-in as <SPROdbxui.2>
    /opt/sunstudio12/SUNWspro/inventory/v16n1/SPROdbxui
    /opt/sunstudio12/SUNWspro/prod/config/Modules/com-sun-tools-debugger-dbxgui.xml
    /opt/sunstudio12/SUNWspro/prod/modules/com-sun-tools-debugger-dbxgui.jar
    Installation of <SPROdbxui.2> was successful.
    Installed Package: SPROdbxui.2
    So I run find . -type f | ggrep 'modules.*\(dbx\|gdb\)'
    ./SUNWspro/prod/modules/com-sun-tools-debugger-dbxgui.jar
    ./SUNWspro/prod/modules-xml/off/org-netbeans-modules-cnd-debugger-gdb.xml
    ./SUNWspro/prod/modules-xml/on/org-netbeans-modules-cnd-debugger-gdb.xml
    ./netbeans-5.5.1/cnd1/update_tracking/org-netbeans-modules-cnd-debugger-gdb.xml
    ./netbeans-5.5.1/cnd1/modules/locale/org-netbeans-modules-cnd-debugger-gdb_ja.jar
    ./netbeans-5.5.1/cnd1/modules/locale/org-netbeans-modules-cnd-debugger-gdb_zh_CN.jar
    ./netbeans-5.5.1/cnd1/modules/org-netbeans-modules-cnd-debugger-gdb.jar
    ./netbeans-5.5.1/cnd1/config/Modules/org-netbeans-modules-cnd-debugger-gdb.xml
    That plugin seems to be installed in the different directory. Is it possible to enable it somehow?

Maybe you are looking for

  • Copying text to word

    I have problems copying text from pdf to word. In the pdf document it looks fine, but after copying it to word i get spaces between letters that aren't there in the pdf file. Copy with formatting helps but work to slow, is there any other way to get

  • Oracle RAC with QFS shared storage going down when one disk fails

    Hello, I have an oracle RAC on my testing environment. The configuration follows nodes: V210 Shared Storage: A5200 #clrg status Group Name Node Name Suspended Status rac-framework-rg host1 No Online host2 No Online scal-racdg-rg host1 No Online host2

  • How to find and apply new Support Packages?

    Hi to everyone. The system is SAP R/3 Enterprise (may 4.7 ext2?) The spam version is 6.20/0020 i have to update the support packages, so i went on https://websmp107.sap-ag.de/swdc, but i dont know what SP i have to download. the situation is (so i ha

  • Create a directory on the server based on the username logged in the client

    hello everybody, All my files which are transferred from client to server are stored in a directory called "workspace".Before the user sends the files, he is authenticated.How can I create a directory on the user name who is logged in on the server??

  • Cannot Edit source definition of a report

    Hi All, I am new to Apex... I created a Master/Detail form. it automatically creates a report. I am trying to edit the report to add extra conditions but I go to the report page > Regions Zone > Select my report link > Source. It has an option to "Sh