Sun Studio C++ v5.3 adding complex gives errors

If anyone can privide info on the following issue I would greatly appreciate it.. I have a simple test app that does not compile. This is with Sun Studion C++ v5.3 (I think then called Sun Workshop Pro) on a Solaris 5.8 machine.
#include <complex>
using namespace std;
int main()
  complex<int> a(1, 2);
  complex<int> b(3, 4);
  complex<int> c;
  c = a + b;
  cout << "Answer: " << c << endl;
  return 0;
}When compiling I get the following error:
/opt/SUNWspro/WS6U2/include/CC/Cstd/complex Line 1006: Error The operation "std::complex<int> += const std::complex<int> is illegal
sol_cpx.cc Line 10 Where: While instantiating std::complex<int>+ ( const std::complex<int>, const std::complex<int> )
sol_cpx.cc Line 10 Where: Instantiated from non-template code
Are there any compiler flags to handle this or is there an update I can get to fix this? Any help would be much appreciated since I'm clueless. Thank you!

complex<int> is not supported. The only specializations of type complex are float, double, and long double.
The suggestion to try stlport won't work with C++ 5.3.
We began supplying stlport with C++ 5.4.
C++ 5.3 has been declared End Of Life, and only limited support is available for it. You can download a copy of the current release, Sun Studio 10, and try it free for 60 days.
http://www.sun.com/software/products/studio/index.xml

Similar Messages

  • SSAS Tabular - Adding Column to a table gives error "Object reference not set to instance of object"

    If I make changes to a table in SSAS Tabular Visual Studio, the newly added column gives error as "Object
    reference not set to instance of object"

    Hi VikasJain13,
    According to your description, you get the "Object reference not set to instance of object" error when adding columns in Tabular. Right?
    Generally, it throws this error when the internal code is accessing the property of an empty object. As you mentioned it happens when you make changes on a table, mostly it means that table is already a empty object. Please re-process your tabular to see
    if this table is still existing. 
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • 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

  • Pros and Cons of the Sun studio IDE

    Hi all,
    I have played a bit with the Sun studio now and I want to give you some feedback.
    First of all, my background. I am working in a team with about 20 developers, developing a C++ application on Solaris.
    Last time I stumbled across an installed Sun Studio 9 and gave it a try.
    Initially I was verry impressed by the great debugger- and analyzer frontends, they look nice and work well.
    After using the debugger from time to time and really enjoyed it, I thought about testing the studio for all-day work.
    So, here are my impressions and the things that keep me away from using it.
    1. The default editor isn't very usefull. For example, I missed regular expression search (and replace) and the feature to mark columns. Furthermore I really missed syntax highlightning for some other file types like sql- and config files, or even the feature to create my own. By the way, the predefined highlightning for C-files is also a bit too simple.
    2. I think the external editor plugin is a bit buggy too, because sometimes I have trash in files that I have edited before. But this can also be my fault, because I use gvim and some editor macros to do sccs-actions. I think the problems occur mainly if I use this macros. In every case the external editor is not really an alternative way for me.
    2. In our team we are using teamware as version-control tool and it does a really good job. So for Workshop 7 we have some editor macros and the teamware-tools from version 6. In the studio I have found the feature to create my own version control profiles, but this is a hard way with many tries and errors. For example I have never accomplished it to set further status information in the explorer window, it's 'Local' all the time.
    3. The studio needs very much memory, I think about 250 MB or so. This is impressive, especially if all the 20 people in our team would start sunstudio. I have found a hint somewhere in the docu that the studio can work in a client-server mode over a VNC, but I haven't tried it because I don't know what the admins would say if I start running my own VNC.
    4. After I have also tried eclipse with the cdt plugin, I really began to like the source-browser and missed it in the studio.
    5. All in all I hoped that the newest Sunstudio got a netbeans update, because some of the plugins that exists only for newer netbeans-versions would also be useful for me and my team. But, at least the latest linux-preview is also based on netbeans 3.5. Maybee do you have plans to update netbeans within the studio?
    Ok, that's all for now ;-)
    Please don't understand me wrong, I really like some features of the studio, and it's a great improvement compared with the workshop version 6 that I used before. But, at all for me the studio is still not useable in all-day work.
    P.S.
    At work I have only access to Sun studio version 9, at home I have also tried version 11, that is the reason why I mixed the version-numbers sometimes ;-)
    With kind regards,
    Maaz76

    1. The default editor isn't very usefull. For example, I missed
    regular expression search (and replace) and the feature to
    mark columns. Furthermore I really missed syntax highlightning
    for some other file types like sql- and config files, or even the
    feature to create my own. By the way, the predefined highlightning
    for C-files is also a bit too simple.The current IDE we're working on is based on a current NetBeans
    and has regular expression search (and replace). I'm pretty sure
    NetBeans 5.0 (and presumably later versions) has syntax highlighting
    for sql (its got an "SQL Editor" module which I'm guessing has the
    highlighing you're asking for).
    We're also working on many new editor features not in current
    Sun Studio IDEs. These are mostly parser based stuff like code
    completion, code folding, and a class viewer.
    2. I think the external editor plugin is a bit buggy too, because
    sometimes I have trash in files that I have edited before. But this
    can also be my fault, because I use gvim and some editor macros
    to do sccs-actions. I think the problems occur mainly if I use this
    macros. In every case the external editor is not really an alternative
    way for me.Its very difficult keeping sources in synch between netbeans and
    an external editor. If you can give us a repeatable scenario for
    failure we can take a look.
    2. In our team we are using teamware as version-control tool and
    it does a really good job. So for Workshop 7 we have some editor
    macros and the teamware-tools from version 6. In the studio I have
    found the feature to create my own version control profiles, but this
    is a hard way with many tries and errors. For example I have never
    accomplished it to set further status information in the explorer
    window, it's 'Local' all the time.We'll definately have sccs support in the next release. TeamWare
    support depends on the status of TeamWare. Sun end-of-lifed it
    4 years ago. As long as its EOL'ed, we won't support it. But if it
    were officially brought back, we'd (most likely) support it.
    3. The studio needs very much memory, I think about 250 MB
    or so. This is impressive, especially if all the 20 people in our team
    would start sunstudio. I have found a hint somewhere in the docu
    that the studio can work in a client-server mode over a VNC, but I
    haven't tried it because I don't know what the admins would say if
    I start running my own VNC.The VNC model shouldn't help on memory. How do you use the IDE
    now? Do each of your 20 developers have Solars desktops? I'm
    guessing they don't since you're talking about 20 users on one
    system. The VNC approach runs all 20 IDEs (assuming all 20
    developers are concurrently running the IDE) on the server machine.
    So VNC won't help in that case.
    On the other hand, if the 20 developers have Windows PCs on their
    desktop then the next IDE should help substantially. We're working
    on having the IDE run locally on your desktop, and do remote building
    and debugging on your Solaris server. This puts most of the IDE
    overhead on your desktop rather than the server. This should be
    a much better model for multi-user development where Solaris
    developers don't have Solaris desktops.
    4. After I have also tried eclipse with the cdt plugin, I really began
    to like the source-browser and missed it in the studio.We're planning on some browser capabilities. Some are in the
    planning stages and others aren't even that far along. But we are
    getting repeated inquiries about a source browser.
    5. All in all I hoped that the newest Sunstudio got a netbeans
    update, because some of the plugins that exists only for newer
    netbeans-versions would also be useful for me and my team. But,
    at least the latest linux-preview is also based on netbeans 3.5.
    Maybee do you have plans to update netbeans within the studio?Well, each major netbeans release has had so many internal
    changes its been difficult keeping up. Our next release is planning
    to be much more in synch with NetBeans releases. We're doing
    current development on the NetBeans trunk (currently thats targeting
    the NetBeans 6.0 release).
    Gordon

  • Sun Studio (12,1) is unable to find a supported version of the Netbeans IDE

    Hi all,
    We're working on upgrading both the hardware and software on our application currently, and part of this involves upgrading our compiler to Sun Studio 12.1. I downloaded
    SunStudio12u1-SunOS-SPARC-pkgs-ML.tar.bz2
    from the Sun website and we installed it into the following location on our server:
    /opt/compiler/sunstudio12.1
    I successfully compiled all my code using the compiler, however, when I try to launch the debugger by typing ./sunstudio in the 'bin' directory, I get the following error:
    {opt/compiler/sunstudio12.1/bin}./sunstudio
    Sun Studio is unable to find a supported version of the NetBeans IDE.
    Sun Studio requires a NetBeans IDE version 6.5.1 with NetBeans C/C++ module (cnd
    2) enabled.
    Sun Studio looks for a valid NetBeans IDE installation in the following order:
    1) Location specified with --netbeanshome command line option
    2) At /opt/compiler/sunstudio12.1/netbeans
    I have seen references to executing 'prepare_system' on forums while I was trying to investigate this, but when our sys admin folks try to execute the command, it does not work (command not found). They've mentioned that they expected a prepare_system script in the directory where we untarred the downloaded sun studio tarfile, but it is not there:
    drwxrwxr-x 4 59001 staff 1024 Aug 20 2009 .
    drwxr-xr-x 3 yu12 lifecad 1024 Jul 2 09:48 ..
    drwxrwxr-x 4 59001 staff 1024 Aug 17 2009 LEGAL
    -rw-rw-r-- 1 59001 staff 3985 Aug 19 2009 SS12u1_README-pkgs.txt
    -rw-r--r-- 1 59001 staff 5598 Aug 20 2009 SS12u1_README-pkgs_ja.html
    -rw-r--r-- 1 59001 staff 4155 Aug 20 2009 SS12u1_README-pkgs_zh.html
    -rwxrwxr-x 1 59001 staff 517979136 Aug 6 2009 SunStudio12u1-SunOS-SPARC-pkgs.sh
    -rwxrwxr-x 1 59001 staff 11814 Aug 6 2009 install_patches.sh
    drwxrwxr-x 5 59001 staff 96 Aug 17 2009 patches
    I can see a netbeans directory was created as part of the install, but I'm not sure why sun studio thinks netbeans is not available (afraid my knowledge about netbeans is practically non existent):
    {opt/compiler/sunstudio12.1/netbeans}ls -l
    total 6062
    drwxr-x--- 2 root root 512 Apr 5 11:14 bin
    drwxr-x--- 7 root root 512 Apr 5 11:14 cnd2
    -rw-rw-r-- 1 root root 5254 Mar 5 2009 CREDITS_ja.html
    -rw-rw-r-- 1 root root 5175 Mar 5 2009 CREDITS_pt_BR.html
    -rw-rw-r-- 1 root root 4908 Mar 5 2009 CREDITS_zh_CN.html
    -rw-rw-r-- 1 root root 5434 Mar 5 2009 CREDITS.html
    -rw-rw-r-- 1 root root 1717 Mar 5 2009 DISTRIBUTION.txt
    -rw-rw-r-- 1 root root 0 Aug 6 2009 dummy
    drwxr-x--- 2 root root 512 Apr 5 11:14 etc
    drwxr-x--- 7 root root 512 Apr 5 11:14 gsf1
    drwxr-x--- 6 root root 512 Apr 5 11:14 ide10
    -rw-rw-r-- 1 root root 1845 Mar 5 2009 LEGALNOTICE.txt
    -rw-rw-r-- 1 root root 64275 Mar 5 2009 LICENSE.txt
    -rw-rw-r-- 1 root root 37141 Mar 5 2009 moduleCluster.properties
    drwxr-x--- 7 root root 512 Apr 5 11:14 nb6.5
    -rw-rw-r-- 1 root root 15822 Mar 5 2009 netbeans.css
    drwxr-x--- 8 root root 512 Apr 5 11:14 platform9
    -rw-rw-r-- 1 root root 6141 Mar 5 2009 README_ja.html
    -rw-rw-r-- 1 root root 5692 Mar 5 2009 README_pt_BR.html
    -rw-rw-r-- 1 root root 5122 Mar 5 2009 README_zh_CN.html
    -rw-rw-r-- 1 root root 5155 Mar 5 2009 README.html
    -rw-rw-r-- 1 root root 2913280 Mar 5 2009 THIRDPARTYLICENSE.txt
    drwxr-x--- 5 root root 512 Apr 5 11:14 websvccommon1
    Our server details are:
    {opt/compiler}uname -a
    SunOS a03714 5.10 Generic_142900-03 sun4v sparc SUNW,T5440
    Any advice appreciated on how to get the debugger working. Ideally, I'd prefer not to uninstall / reinstall if at all possible as we're about to start system testing our executables, and I think a reinstall would require more unit teting and delays to our project (yikes!). But any input would be appreciated here.
    Thanks,
    Brendan.

    Hi David,
    First off - thanks for the response. I do have some follow up questions if you don't mind though:
    1. When you say the install is corrupted, do you suspect
    - the file I downloaded from the website either was corrupted, or was not the correct file for my platform
    - the procedure used to install the software was incorrect
    - something else
    2. Is there a logfile that the sun studio install creates which would indicate an error during the installation procedure? I'm sure our admins who performed the install would have shouted if an error was logged... but on the offchance that the installation does not 'shout loudly' for some errors, I'd like to see a log of the error. At a minimum, I'd expect it to say why the install failed, and what we need to modify to ensure a successful install next time 'round.
    3. I successfully compiled my code using the C compiler from the install. My unit tests also look good... does this suggest that the install was at least a partial success, and would you suspect that my recompiled executables are reliable, despite the fact that I cannot launch the IDE?
    4. Today, one of our admins telnetted to our unix server - not via exceed by the way, but he did try the following test:
    - set his display env variable (he knew he would not get a display however)
    - executed the sunstudio script
    He did not get the netbeans error, and the process appeared to be running (as I mentioned, without a display) until he killed it. I've asked if they can repeat the test using an exceed session. I thought there may be something on his $PATH that I did not have - unfortunately this was not the case (although, he may have access as 'root' to something that I require to launch the IDE). My question is, would you expect this behaviour if the install was corrupted?
    Let me know what you think.
    Thanks,
    Brendan.

  • Installed Sun studio 12.2. ran 'discover' command on C++ code.Gives warning

    Hi,
    I installed Sun studio 12.2. I compiled C++ code with C++ 5.11 compiler, and ran discover command as shown below:
    > #CC -g -O2 test.cpp
    > #discover -w - a.out
    > discover (warning): a.out will be analyzed in lite mode because it has no annotations. See discover documentation for compiler flag/OS recommendations
    I get the discover warning. After runnig discover command, I executed ./a.out. On cosole, only memory leaks will be displayed and no other error.
    Any reason why discover gives warning??????????????????
    Edited by: Archit on Apr 5, 2011 11:09 PM
    Edited by: Archit on Apr 5, 2011 11:10 PM
    Edited by: Archit on Apr 5, 2011 11:10 PM
    Edited by: Archit on Apr 5, 2011 11:13 PM

    Hi,
    What a woderful fix you have provided !!!!!!!!!!
    It really works.
    I tried running on Solaris 10 update 8. discover tool runs properly. Where as , the tool runs in lite mode on Solaris update 4.
    If possible , can you pint me to some links where I can this kind of info.?
    Thank you very much.

  • Using boost::thread with Sun Studio C++ gives error

    Hi,
    I'm trying to compile a code which uses the boost thread library, but I get the following error:
    CC -library=stlport4 -features=tmplife -features=tmplrefstatic -mt -c -o t t.cpp
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/detail/thread.hpp", line 344: Error: boost::thread::thread(boost::thread&) is not accessible from boost::move(boost::detail::thread_move_t<boost::thread>).
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    5 Error(s) detected.
    make: *** [t] Error 5the sample source code in question here just a single include:
    #include <boost/thread.hpp>This is with boost 1.40.0. I wonder what I'm doing wrong..
    Akos

    OK, I tried latest version of CC from Sun Studio 12 update 1 and can say that
    - the error about constructor not being accessible is Sun C++ compiler "feature" (only called feature because it existed for so long) that allows binding of rvalues to non-const references; this "feature" will probably be turned off in the next release. It can't be changed in a patch because client's code might rely on it.
    - the other errors are also not Boost-specific: the result of incompatibility of Linux headers and Sun C++ compiler; more thorough investigation is due, but in the past we had several problems like this. This particular can be solved by adding
    -D_GNU_SOURCE to compile line.

  • Adding ADF faces in Sun studio Creator

    Pls Help me by giving step by step procedure for adding ADF Faces in sun Studio Creator. The version of ADF Faces is EA 17.

    Hi Pablo and Eric,
    Just to calrify things a bit about ADF Faces. ADF Faces are standard JSF components and are fully compatible with any JSF implementation. What you guys are asking for is tools support. Currently Sun Studio Creator is experience difficulties importing any large custom component sets to their IDE. This is due to bugs in their prodcut and the fact that ADF Faces does not come with the Sun specific configuration required to import components to their IDE. We are working with them on a new proposal for design time metadata and a solution to get ADF Faces into to the Sun SC IDE.
    But, this is ultimately a Sun issue, not a JDeveloper nor ADF Faces issue.
    - Jonas
    Jdev team

  • General and specific questions on the applicability of Sun Studio 11

    Hi. In an e-mail letter from Sun Microsystems I read about Sun Studio 11 to "utilize its record-setting parallelizing compilers." From this message I was attracted by the possibility of adding something like parallel processing, not by changing the processor (hardware), but by adding Sun-Studio-11 software to a Linux operating system. Now I already have a Fortran compiler, the Intel Fortran Compiler for Linux, which is free and can handle Cray-style pointers, a feature hard to find in a free Fortran compiler.
    1a. So for the most basic of questions, without having parallel-processing hardware, just an ordinary processor [a 1-GigaHertz (GHz) Advanced MicroDevices Duron central processing unit, in my case], is it possible to have parallel processing and thereby increase one's computing speed by installing Sun Studio 11 in a Linux operating system?
    1b. If so, by what factor could one expect the speed of computation to increase over not having Sun Studio 11 installed? (If the gain in speed is dependent on the type of computations being performed, I imagine possibly using a Fortran code to perform numerical calculations using and perhaps searching for minima or maxima in a two-or-more-dimensional surface. So please give me an idea of the sort of gain in speed one could expect for these two types of activites, calculations using formulas and searches for minima and maxima among already-computed quantities.)
    1c. Again if so, how could one just by adding software have parallel processing without two or more hardware processors? In other words, what is the basic working principle of the software to make the simultaneous performance of multiple tasks (multitasking or parallel processing) possible?
    2a. Does Sun Studio 11 include a Fortan compiler?
    2b. If so, must one use it to have parallel processing with Sun Studio 11?
    2c. Or will the Intel Fortran Compiler for Linux work with Sun Studio 11 to have a parallel processing capability?
    Concerning hardware requirements I read that Sun Studio 11 requires a minimum of 512 MegaBytes (MB) of memory, presumably Random Access Memory (RAM). My Hewlett-Packard, ZE1110, Pavilion, notebook computer has 256 MB of RAM, but is expandable to a maximum of 512 MB of RAM. So in this respect it is in principle at least technically possible for me to meet the minimum system requirement for Sun Studio 11 with my computer, if I choose to increase its RAM. Somehow accommodating the cost of such a RAM addition, including whether one may have to buy two, matching, 256-MB RAM modules or just presumably one additional 256-RAM module, is another requirement. But before spending money for such an upgrade, one should first thoroughly investigate other matters to determine if other things are going to work and to determine what gain, if any, one could expect in computing speed with Sun Studio 11 and an additional 256 MB of RAM; then decide, based on such data, whether the purchase is personally worth the money or not. That's one motivation behind this posting; another motivation is for me to learn some things.
    Lastly I would like to here thank whoever was thoughtful enough to provide the Sun Download Manager (SDM) 2.0, which allows the pausing and resumption of the 207-MB download studio11-lin-x86.tar.bz2 for the Linux version of the Sun Studio 11! Using a slow, dialup, Internet connection like mine having a maximum speed of 28.8 kilobits/second, this makes it possible to download that file over a number of Internet sessions instead of having to have an uninterrupted, 19-or-more-hour Internet session. Besides the invconvenience of tying up one's telephone line for that long a time, it might be even be difficult to have such an uninterrupted Internet session for that long a time. I have at least started such a download using the SDM 2.0 potentially over multiple Internet sessions. Whether or not I carry it out to completion could depend on whether everything looks good with Sun Studio 11 for my particular situation. Thanks in advance for your help.

    Thanks for both of your postings here. I'm mostly trying to learn something here.
    From Maxim Kartashev: "For example, if one thread (or process, or lwp) frequently performs an I/O operation, then the other thread (process, lwp) can utilize processor resources to perform, say, some computations while first one waits for operation to complete."
    I think I might understand what you meant above. I guess lwp in the above context stands for light-weight process. And I think you may be talking about a potential gain in speed with just one, ordinary processor. I guess you meant that one program, or perhaps group of programs, could perform input/output processes at the same time it is performing calculations because different parts of the processor are being used in these two groups of processes. Then on "while first one waits for operation to complete" I guess you meant that if the input/output operations finish before the computations finish, then thread 1 that was performing the input/output operations will have to wait until the current computations ordered by thread 2 are complete before thread 1 can utilize the computational resources for its own computations; i.e., two threads can't use the same computational resources of an ordinary processor at the same time. How is my thinking so far, Maxim, right, partly right, or all wrong?
    Now if the above thinking of mine is right, then it appears that one could have some gain in speed doing things like you suggest with just one, ordinary processor. And if so, I imagine that the gain could be a maximum of a factor of two for a program that requires spending as much time in input and output as it does in computation; i.e., keeping both the computational and input/output resources working all of the time without the input/output resources waiting on the computational resources or vice versa. How is my thinking here?
    If the above thinking is correct, just for purposes of discussion with just one, ordinary processor, not a dual processor, and a program which does nothing but computations there would be no gain in speed using Sun Studio 11 and a Fortran compiler over not using Sun Studio 11. In other words, to increase the speed of computation one would have to buy a faster computer, buy parallel processing hardware for an existing computer and use parallel-processing software, or somehow figure out how to harness two or more computers to work for you at the same time with instructions from one piece or perhaps set of pieces of code set up for parallel processing using two or more different computers. The latter case would be a computer analogue or "two 'heads' are better than one," not human heads, but computers. How is my thinking here?
    Here I am still assuming that it is possible for one processor to be used to do two different kinds things at once. However, I don't see how one Fortran program could instruct two things to be done at once. This is because I have not seriously studied parallel processing, I suppose. That is I am used to a sequential set of instructions that proceed from top to botton down the lines of code; i.e., one instruction or line of code can't be executed until the line of code before it has been completely executed. That is the computing "world" with which I am familiar. So how about someone here teaching me with an example of parallel-processing Fortran code how parallel processing works, explaining what instruction or group of instructions tells the computer to execute input and computational instructions at the same time?
    Based on the encouraging information from one or more other people I have been able to use the Intel Fortran for Linux 8.1.024, if I remember correctly, in a computer with a 1-GigaHertz (GHz), Advanced MicroDevices (A.M.D.), Duron Processor. So this is at least one case where it is not essential to have an Intel processor to use the Intel Fortran Compiler for Linux 8.1.024.
    Is the Sun Fortran compiler free for personal use? And can it handle Cray-style pointers?

  • Help needed with evaluating Sun Studio Creator

    I am evaluating Sun Studio Creator as a platform for developing JSF applications. I really like its WYSIWYG editor, but strugging with how I would fit it in my environment. I currently use a Maven generated EJB layer running on JBoss.
    1) Ideally I would like to package my EJBs and WAR into one EAR and deploy it on JBoss. Is this possible through the IDE? I would still like to keep my Maven scripts for building the EJB layer (basically I like Maven lot more than Ant and I am not willing to give up its functionality). How would I go about doing EJB development using Maven in parallel with front-end development using JSC?
    2) Does Sun Studio Creator somehow lock me into its framework? I see that the code it generates uses custom tags such as the Web UI tags. I have not seen any good documentation justifying why I should be using these custom tag libraries and framework - giving up my freedom to experiment with other approaches. For that matter, I was not able to find a "user guide" on the tag libraries at all - only the javadocs, which are more like reference material. Can someone point me in the right direction?
    3) If I wanted to use just the standard components specified in the JSF specification, which tool bars should I limit myself to? The "Standard" toolbar? Also does it mean that I will need to manually rip out the auto-generated elements such as Web UI tags, framework specific backing beans etc. Would a "seasoned" JSC user even think of using the tool in this way?
    I would really appreciate any guidance you can give me on this topic.
    Thanks.

    Before I forget, I want to pass on the following feedback from my evaluation. Hopefully some of these items can be addressed in the upcoming release. Please note that I am not a JSC power user, so some of the impressions were made during a very limited evaluation period.
    1) It seems that JSC was designed to allow only the use of its framework/components such as the Web UI components etc. It seems pretty hard NOT to use the JSC framework/components and introduce other frameworks such as Tiles. I would prefer if JSC took a more flexible approach of also supporting other ways in which people may want to develop JSF applications.
    2) Support for a robust page templating mechanism. I really don't know how to create large complex web sites without introducing something like Tiles.
    3) Native support for Maven. I am sure people know the goodness of Maven and I should not have to list its advantages. It would be really nice if I can just point to a Maven pom.xml file and build my project, instead of messing around with Ant scripts. This would also mean supporting nested Maven projects.
    4) Full support for packaging and deploying ear files. This means the ability to support EJB projects living side-by-side with Web projects.
    5) It was not clear from the tutorials whether the databound controls work only with databases or can I bind them to in-memory objects. It would be good to allow binding to data transfer objects received from the middle-tier rather that going directly at the database.

  • Performance Tools Sun Studio 12 under Ubuntu

    I want to use the hardware counter under a x86-64 Ubuntu (Feisty). But the system isn't supported by the performance analyzer and the hardware counter aren't available. Exist any opportunity to use it or should i install red hat enterprise or suse enterprise. Gives there any free OS where the HW counters working?

    You can try Sun Studio 12 on any machine you want. The 'unsupported' means: it's your choice, you are at your own risk, you are on your own. However, we still would be willing to hear from you, we would also help if we can. Your input and feedback are welcome!
    You can even file RFE on bugs.sun.com if you feel the performance on Ubuntu is better, worth recommended, worth to be added to the 'supported platform' list, etc. Voice of Customer is always welcome too!
    Rose

  • Sun Studio Debugging problem

    Hello
    I need help configuring the Sun studio debugger to work in fedora 8. The project is loaded from a make file, compiles fine, and runs fine. However, I can not place break points, and when I start the visual debugger, it gives a message box titled progress, and hangs on saying: starting debugger: /lib/libc.so.6
    Running from the command line gives me:
    $dbx <my program>
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
    Reading <my program>
    Reading ld-linux.so.2
    Reading libm.so.6
    Reading libmpich.so.1.1
    Reading libpthread.so.0
    Reading librt.so.1
    Reading libc.so.6
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: warning: unknown location expression code (0xe0)
    dbx: panic: "ThreadAgent::setup_helper"(): Assertion (ta_td_agent) failed - "thread.cc":2674
    I have another problem in debugging an mpi problem in another installation of Sun Studio on Solaris 10 on a Sun machine. The visual debugger is working fine there, however, I need to debug with mpirun
    to decide the number of processors, because by default it loads the application on one processor. Iwill need to do this as well later on the linux machine I am using now, which doesn't even start the debugger on a sequential code so far.
    I appreciate your help a lot.
    Thank you very much in advance.
    Manal

    mhelal wrote:
    Hi
    Thank you for your reply. you said 2 problems,Yes, basically I meant these two:
    1. dbx: warning: unknown location expression code (0xe0)
    2. dbx: panic: "ThreadAgent::setup_helper"(): Assertion (ta_td_agent) failed - "thread.cc":2674
    First one should be fixed in dbx itself, but the second looks like an incompatibility between Fedora's libc and dbx; unless distros in "supported" list upgrade to the same version of libc, dbx can't be changed to match it.
    In other words, I'm sorry to say that you will probably not succeed in using dbx on Fedora 8 for the time being.

  • Exception not always caught in Sun Studio 12

    Hi,
    We're using Sun Studio 12 (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25) on a Solaris 10 SPARC machine. In our applications an exception thrown is sometimes not caught in the try/catch statement and the program continues at an outer catch statement (which usually leads to the program exiting). So far I've not been able to reduce the code down to a simple example and I don't yet know what conditions causes this behaviour.
    In general the code has a big try/catch statement in main. Somewhere deep in the code there is a second try/catch statement which protects against a piece of code which we know may throw an exception. This is usually a smart pointer being dereferenced. The act of dereferencing the smart pointer in turn causes an exception to be thrown which is caught internally in a third try/catch inside the dereference code. The exception is successfully caught and some clean up is done. Then the exception is re-thrown by either using a throw; statement or a new throw xmsg("...");. All our exceptions are always of type xmsg which simply takes a string argument.
    When the problem manifests itself the second try/catch is ignored and the re-thrown exception is instead caught in the outer catch statement in main which causes the program to log an error and exit.
    We have lots of code which is structured the same way and the same style of code works in many cases only to fail in some specific case. It's an elusive problem because the problem moves around and it also depends on how the program is compiled. It only seems to happen when compiled in debug mode. If I compile with -xO4 the problem seems to go away.
    The problem also goes away or moves to a different place if the code has changed somewhere between compiles, i.e. some other developer has modified some code, not necessarily in the same are where the problem originally happened.
    One thing we have is a function we call DoThrow (used to suppress a warning on an older compiler) defined like this:
    void DoThrow(const std::string& msg)
      throw xmsg(msg);
    }As an experiment I replaced the call to DoThrow with a straight throw xmsg(...) at a place where the first exception was thrown and the problem went away. I'm not sure if removing the call to DoThrow fixed the problem or if the minor restructuring of the code was enough to move the problem elsewhere.
    For production releases we still use WorkShop 6, update 2 which does not have any problems like this. We really would like to upgrade to Sun Studio 12 because it's a much better compiler over all. We can't upgrade until we feel confident we have a workaround.
    Does anyone have any thoughts on what might be wrong or any ideas on what I can do to narrow down the problem?
    Thanks,
    Krister

    Many thanks. You've given me a few areas to focus on and I'll bring my house in order.
    The only external C++ library we depend on is STLport 5.0.2 which we compile ourselves. It's currently compiled with 5.3 on Solaris 8 and I will recompile it with 5.9 on Solaris 10. All other external libraries are C libraries. Our own code is put in static libraries and linked statically. I've read that exceptions thrown in shared libraries can be problematic.
    Your comment about complex conditional expressions (a ? f() : g()) is interesting. We've been bitten before by compiler bugs affecting those types of expressions. Destructors called twice or destructors called for temporaries never created. We may still have some conditional expressions like that.
    The exception is of type xmsg, defined this way:
    class xmsg
      public:
        xmsg(const char* s) : _msg(s) {}
        xmsg(const std::string& s) : _msg(s) {}
        const std::string& why() const { return _msg; }
      private:
        const std::string _msg;
    };There are three catch blocks involved and all the try/catch statement look like this:
    try
    catch(const xmsg& msg)
    }Here is a stack trace from dbx at the point where the exception is thrown the first time.
      [1] __exdbg_notify_of_throw(0xffbf4ae8, 0xffbf4ad0, 0x959b292c, 0xffff0000, 0x0, 0xfc00), at 0xfb6549b4
      [2] _ex_debug_handshake1(0x0, 0x101cb84, 0x1, 0x14ffc, 0xfb66a67c, 0xfb66ad38), at 0xfb655728
      [3] _ex_throw_body(0xfb66af80, 0x80b2ac, 0xfb66a67c, 0x14d9c, 0x0, 0xfb66af80), at 0xfb655934
      [4] __Crun::ex_throw(0xfb66afd0, 0x1460bf8, 0x7ead20, 0x0, 0x16538, 0x1), at 0xfb6558bc
    =>[5] TransportSource<User>::Activate(this = 0x1624810, r = CLASS, _ARG3 = CLASS), line 39 in "TransportSource.H"
      [6] Source<User>::DoActivate(this = 0x162486c, r = CLASS, e = CLASS), line 272 in "Factory.H"
      [7] BaseFactory::Load(this = 0x16020a8, e = CLASS), line 2799 in "BaseFactory.C"
      [8] GPAuthorizationSource::Load(this = 0x15d2440), line 110 in "GPAuthorization.C"
      [9] ExchangeServer::ExchangeServer(this = 0xffbfa95c, argc = 8, argv = 0xffbfbaec), line 380 in "exchangeServer.C"
      [10] main(argc = 8, argv = 0xffbfbaec), line 1525 in "exchangeServer.C"Here is the code for the Activate function in stack frame 5. The exception thrown is the second one.
        virtual T& Activate(const Reference& r, Exemplar<T>&)
          _transport->In().Write(r);
          DemarshallStream out;
          _transport->Method(Process::Activate, out);
          if(!out.Data())
         throw xmsg("Failed to call Activate on server " + _transport->Name());
          if(!out.GetBool())
         throw xmsg("Server returned error: " + out.GetString());
          const ClassHandle& h = out.GetClassHandle(&_connection);
          // don't need to pass refresh flag here because a call to Activate
          // means the object is being loaded for the first time.
          BaseExemplar* x = _handle.GetFactory().Demarshall(h, out, false,
         &_connection, this);
          BaseTransportSource::DoActivate(out);
          if(!x)
         throw xmsg("Failed to activate ref: " + r.ExternalValue());
          return static_cast<T&>(*x->GetInstance());
        }The exception is caught (frame 7 in the stack trace above) and re-thrown in the below code, at the last throw statement.
    void BaseFactory::Load(BaseExemplar& e)
      SourceMap::iterator p = _sources.find(&e._key->Type());
      if(p == _sources.end())
        throw xmsg("Factory<" + _handle.Name() + ">::Load - no source for: "
          + e._key->ExternalValue());
      AutoPointer<BaseGuard> g(Guard());
      std::list<BaseSource*>::iterator i = p->second.begin();
      while(true)
        try
          (*i)->_currentExemplar = &e;
          BO& x = (*i)->DoActivate(*e._key, e);
          (*i)->_currentExemplar = 0;
          if(!e._instance)
         e._instance = &x;
         Activate(e, ActivatedOld, 0);
          return;
        catch(const xmsg& msg)
          (*i)->_currentExemplar = 0;
          ++i;
          if(i == p->second.end())
         throw;
    }There is a second try/catch one level up (stack frame 8, the call to GPAuthorizationSource::Load). Here's a snippet of that piece of code.
        try
          const Exemplar<User>& user = UserFactory::Instance().CreateExemplar(
         *new UserReference(authorizationTable._login.Value()));
          *user;
        catch(const xmsg& msg)
          Logger::Instance() << LogHeader << MsgClass(MsgClass::Error)
         << "Error PMAutorizationSource: " << msg.why() << EndMsg;
        // ...I put a break-point in the catch block in the above code but I never hit the break point and the exception is caught in an outer try/catch, an error is printed and the program exits.
      try
      catch(const xmsg& msg)
        std::cerr << "ERROR: " << msg.why() << std::endl;
      }I'm sorry I have not yet been able to produce a smaller example that can be compiled and tested in isolation. I know that's important in order to track down the problem. It seems like the smallest change in seemingly unrelated parts of the code makes the problem come or go.

  • Can't see 'Local Variables' while debugging in Sun Studio 11

    I am debugging a C/C++ application built with Sun Studio 11 running on Solaris 10. I load the application as always, set a breakpoint and run. The debugger stops at the assigned breakpoint as expected.
    The issue is that at this point there are no local variables displayed in the local variables pane.
    I have tried restarting SS11, rebuilding, etc...
    This is the first time I have seen this happen.
    Does anyone else have an idea what is wrong?

    Does adding a particular variable to Watch view help? (it can be done by typing "display <variable>" in dbx command line).
    You can also try erasing (or better moving to a temporary location) all Sun Studio settings like this:
    mv -f ~/.sunstudio /tmpand start debugging session again.

  • Basic vs Standard componets in Sun Studio Creator

    Hello,
    I am fairly new to JSF and trying to build a JSF webapplication. I am using Sun Studio Creator
    I would like to know what is the difference between the Basic and Standard components...is there a specific one I should be using, or any would be fine ?
    Thank you very much for the help.

    Yes you can create Portlets for JBoss Portal using JSC as I have been doing a project with it! However, it isn't quite straightforward as exporting a war file. You need to delete a couple of JSC exported files, create at least 2 JBoss specific files to make it work in JBoss Portal. Then to use the user restrictions part of JBoss Portal i.e. assigned specific portlets to specific users, you will need to create another file. I'll post on this in due course (once I've found my crib sheet!).
    There are a couple of issues though especially with the table components.:
    The BASIC table in JSC gives you a sort by column and this sends out a stream of error messages in JBP when it is used. Fortunately, the workaround is to just untick the table "sortable" box. That removes the sorting ability and the table works fine as does the paging ability. You can also set the number of rows returned. The major issue you will discover about the BASIC table component is that the empty message i.e. no results returned/found will also give you an endless stream of error data. I worked around it by running a separate SQL query to get a result and then allow the page with the table to be shown otherwise redirect it. Not exactly elegant but it works. The STANDARD table component does not give this error. You don't see these any of errors when deployed in the Pluto portal that comes with JSC.
    I also found that the choice of database is also an issue. JBoss recommends Postgresql but although it did work to a point in JSC, it did throw up an error with dropdown databinding (no idea!). So I changed to Mysql 5 which works fine in JSC but JBP requires a small workaround but prefers Mysql 4. If you're asking why not stick with v4? Well my project required the use of Views which aren't available in v4 let alone foreign keys. Think "compromise" and you will be fine!

Maybe you are looking for