Fedora 7 and Sun Studio 12

Not work Analyzer(Running "/opt/sun/sunstudio12/prod/bin/collect -d /usr/local/sunworkspace/Fractal_1/nbproject/private/experiments -o test.3.er -A on -r race,deadlock /usr/local/sunworkspace/Fractal_1/dist/Debug/fractal" in /usr/local/sunworkspace/Fractal_1
WARNING: Target `/usr/local/sunworkspace/Fractal_1/dist/Debug/fractal' is not instrumented for datarace detection;
reported datarace data may be misleading
Unknown Redhat Linux version
Fedora release 7 (Moonshine)
WARNING: Linux-32-bit, 2 CPUs, RH_UNK system localhost is not supported by the Performance tools.
WARNING: Data collection may fail: system is not properly configured or is unsupported.
Creating experiment database /usr/local/sunworkspace/Fractal_1/nbproject/private/experiments/test.3.er ...
Run failed. Exit value 139. )
, not correct termination example program
int counter=0;
void pancake(void arg) {
counter++;
printf("Thread %u is number %d\n",
pthread_self(),counter);
} main() { int i; pthread_t tid;
for (i=0;i<10;i++)
pthread_create(&tid,NULL,pancake,NULL);
Output - 4 pthread!!!
What i do not correct??? I think, that Fedora is like RedHat - and this tools (SunStudio12) - must work
Thank's

&#1057;&#1087;&#1072;&#1089;&#1080;&#1073;&#1086; &#1052;&#1072;&#1082;&#1089;&#1080;&#1084;! - &#1079;&#1085;&#1072;&#1095;&#1080;&#1090;&#1100; &#1085;&#1077; free SunStudio 12, &#1078;&#1072;&#1083;&#1082;&#1086; - &#1093;&#1086;&#1088;&#1086;&#1096;&#1080;&#1081; &#1087;&#1088;&#1086;&#1076;&#1091;&#1082;&#1090; - &#1101;&#1090;&#1086; &#1080; &#1087;&#1086;&#1085;&#1103;&#1090;&#1085;&#1086; - &#1079;&#1072; &#1073;&#1077;&#1089;&#1087;&#1083;&#1072;&#1090;&#1085;&#1086; &#1086;&#1085;&#1080; &#1076;&#1077;&#1083;&#1072;&#1090;&#1100; &#1085;&#1080;&#1095;&#1077;&#1075;&#1086; &#1085;&#1077; &#1073;&#1091;&#1076;&#1091;&#1090; - &#1082;&#1072;&#1087;&#1080;&#1090;&#1072;&#1083;&#1080;&#1089;&#1090;&#1099; &#1078;&#1077;...... - &#1089;&#1087;&#1072;&#1089;&#1080;&#1073;&#1086; &#1095;&#1090;&#1086; &#1074;&#1085;&#1077;&#1089;&#1083;&#1080; &#1103;&#1089;&#1085;&#1086;&#1089;&#1090;&#1100; - &#1086;&#1085;&#1080; &#1074;&#1089;&#1077; &#1088;&#1072;&#1074;&#1085;&#1086; &#1089; &#1087;&#1088;&#1086;&#1080;&#1075;&#1088;&#1072;&#1083;&#1080; &#1089; Linux - &#1085;&#1077;&#1090; &#1072;&#1085;&#1072;&#1083;&#1080;&#1090;&#1080;&#1095;&#1077;&#1089;&#1082;&#1086;&#1075;&#1086; &#1084;&#1099;&#1096;&#1083;&#1077;&#1085;&#1080;&#1103; - &#1073;&#1086;&#1083;&#1100;&#1096;&#1080;&#1085;&#1089;&#1090;&#1074;&#1086; &#1084;&#1072;&#1096;&#1080;&#1085; - &#1101;&#1090;&#1086; x86(&#1091;&#1078;&#1072;&#1089; ! &#1090;&#1072;&#1082; &#1084;&#1077;&#1076;&#1083;&#1077;&#1085;&#1085;&#1086; &#1088;&#1072;&#1073;&#1086;&#1090;&#1072;&#1077;&#1090; &#1085;&#1072; 2 &#1103;&#1076;&#1077;&#1088;&#1085;&#1086;&#1084; &#1087;&#1088;&#1086;&#1094;&#1077;&#1089;&#1089;&#1086;&#1088;&#1077;- &#1085;&#1080;&#1085;&#1082;&#1091;&#1076;&#1072; &#1085;&#1077; &#1075;&#1086;&#1076;&#1080;&#1090;&#1100;&#1089;&#1103;!!!) &#1072; &#1085;&#1080;&#1082;&#1072;&#1082; &#1085;&#1077; SPARC - &#1083;&#1091;&#1095;&#1096;&#1077; &#1087;&#1091;&#1089;&#1090;&#1100; &#1076;&#1077;&#1083;&#1072;&#1102;&#1090; &#1090;&#1086; &#1095;&#1090;&#1086; &#1093;&#1086;&#1088;&#1086;&#1096;&#1086; &#1076;&#1077;&#1083;&#1072;&#1102;&#1090; - &#1080;&#1093; &#1084;&#1072;&#1083;&#1086;, &#1072; &#1089;&#1074;&#1086;&#1073;&#1086;&#1076;&#1085;&#1099;&#1093; &#1087;&#1088;&#1086;&#1075;&#1088;&#1072;&#1084;&#1084;&#1080;&#1089;&#1090;&#1086;&#1074; - &#1084;&#1085;&#1086;&#1075;&#1086;, &#1087;&#1086; &#1083;&#1086;&#1075;&#1080;&#1082;&#1077; - &#1074;&#1089;&#1077; &#1088;&#1072;&#1074;&#1085;&#1086; &#1087;&#1077;&#1088;&#1077;&#1080;&#1075;&#1088;&#1072;&#1102;&#1090;...
&#1057; &#1091;&#1074;&#1072;&#1078;&#1077;&#1085;&#1080;&#1077;&#1084;!

Similar Messages

  • Confused between Netbeans and Sun Studio Enterprise

    Hi all,
    Acually I am very confused between Netbeans and Sun Studio Enterprise/Creator.
    Why sun did not concentrate on one IDE as Microsoft is doing with Visual Studio?
    Now, I do not know what to learn....Netbeans or Sun Studio !!!
    What make me more confused is that both are supported oficially by Sun. And both are free for SDN members!!!!!
    So, what is the difference???!!!
    regards

    I tried it back when it was called Forte, and it seamed pretty
    identical to netbeans. the only difference was that Forte could
    only be used for personal use without a license.

  • BOOST and Sun Studio 10

    C++ 5.7 in Sun Studio 10 now compiles most of BOOST 1.32.0, when the compiler is updated with the current patches from
    http://developers.sun.com/prodtech/cc/downloads/patches/ss10_patches.html
    Two known bugs remain, and should be fixed in a future patch.
    Some of the BOOST compilation failures are due to errors in the BOOST configuration for Sun C++. We have submitted corrections to the BOOST site, and we hope all of them will be included in version 1.33.0.
    In the mean time, you can apply the following corrections to version 1.32.0:
    1. Get this correction from the BOOST bug tracker:
    http://sourceforge.net/tracker/index.php?func=detail&aid=1155439&group_id=7586&atid=107586
    2. Also get this correction from the BOOST bug tracker:
    http://sourceforge.net/tracker/index.php?func=detail&aid=1165980&group_id=7586&atid=107586
    3. Edit build.sh according to these diffs: *** build.sh.orig     Fri Mar 18 06:09:44 2005
    --- build.sh     Fri Mar 18 06:41:07 2005
    *** 150,160 ****
          sunpro)
    !     if test -r /opt/SUNWspro/bin/cc ; then
              BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
          fi
    !     if test -r $BOOST_JAM_TOOLSET_ROOTbin/cc ; then
    !         export PATH=$BOOST_JAM_TOOLSET_ROOTbin:$PATH
          fi
          BOOST_JAM_CC=cc
    --- 150,161 ----
          sunpro)
    !     if test -z "${BOOST_JAM_TOOLSET_ROOT}" -r /opt/SUNWspro/bin/cc ; then
              BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
          fi
    !     if test -r ${BOOST_JAM_TOOLSET_ROOT}bin/cc ; then
    !         PATH=${BOOST_JAM_TOOLSET_ROOT}bin:${PATH}
    !         export PATH
          fi
          BOOST_JAM_CC=cc
          ;;

    Here is a small but complete test program, together with the command line of the compiler. This is the patch level of the compiler we use here:
    CC: Sun C++ 5.7 Patch 117830-02 2005/03/30Test program (graph_test.cpp):
    #include <iostream>                  // for std::cout
    #include <utility>                   // for std::pair
    #include <algorithm>                 // for std::for_each
    #include <boost/graph/graph_traits.hpp>
    #include <boost/graph/adjacency_list.hpp>
    #include <boost/graph/dijkstra_shortest_paths.hpp>
    using namespace boost;
    int main(int,char*[])
      enum { A, B, C, D, E, N };
      const int num_vertices = N;
      const char* name = "ABCDE";
      typedef adjacency_list<vecS, vecS, bidirectionalS> Graph;
      Graph g(num_vertices);
      typedef graph_traits<Graph>::vertex_iterator vertex_iter;
      std::pair<vertex_iter, vertex_iter> vp;
      vp = vertices(g); /** Error **/
      return 0;
    }Command line:
    CC -I./include/boost -v graph_test.cpp
    ###     command line files and options (expanded):
    ### -I/export/rpms/401/tools/inst/include/boost -v graph_test.cpp
    ### CC: Note: NLSPATH = /export/home2/SUNs10/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/export/home2/SUNs10/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    /export/home2/SUNs10/SUNWspro/prod/bin/ccfe -y-o -ygraph_test.o -I/export/rpms/401/tools/inst/include/boost -y-fbe -y/export/home2/SUNs10/SUNWspro/prod/bin/fbe -y-xarch=generic -y-verbose -O0 -ptf /tmp/00299%1.%2 -ptx /export/home2/SUNs10/SUNWspro/prod/bin/CC -ptk "-I/export/rpms/401/tools/inst/include/boost -v  -xs " -D__SunOS_5_8 -D__SUNPRO_CC=0x570 -Dunix -Dsun -Dsparc -D__sparc -D__sparcv8plus -D__unix -D__sun -D__BUILTIN_VA_ARG_INCR -D__SVR4 -D__SUNPRO_CC_COMPAT=5 -D__SUN_PREFETCH -xdbggen=no%dwarf2+stabs -y-s -xdbggen=incl -y-xmemalign=8i -I-xbuiltin -xldscope=global -instlib=/export/home2/SUNs10/SUNWspro/prod/lib/libCstd.a -I/export/home2/SUNs10/SUNWspro/prod/include/CC/Cstd -I/export/home2/SUNs10/SUNWspro/prod/include/CC -I/export/home2/SUNs10/SUNWspro/prod/include/CC/rw7 -I/export/home2/SUNs10/SUNWspro/prod/include/cc -y-comdat graph_test.cpp -s /tmp/ccfe.00299.0.s >&/tmp/ccfe.00299.1.err
    rm /tmp/ccfe.00299.0.s
    /export/home2/SUNs10/SUNWspro/prod/bin/stdlibfilt -stderr </tmp/ccfe.00299.1.err
    "graph_test.cpp", line 22: Error: Could not find a match for boost::vertices<boost::T>(boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::no_property, boost::no_property, boost::listS>) needed in main(int, char**).
    1 Error(s) detected.
    rm /tmp/ccfe.00299.1.err
    rm graph_test.oAny help would be greatly appreciated! If you need any more information, please let me know.
    Thanks in advance,
    Andreas

  • Error building using Coverity Prevent and Sun Studio 11

    We recently started using a static code-checking tool called Coverity Prevent. When we first started using it, we were on a very old verison of the Forte Compiler (Forte 6 update 2). Builds completed fine through Prevent. In the last month, we've upgraded to Sun Studio 11 (can't go to 12 because we're using Solaris 8). Now I can't get a build to run completely through Prevent. Prevent has a preprocessor that's a bit more strict than most compilers. I'm getting the following errors in a lot of places.
    "/vobs1/cots/ForteDeveloper/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 316: error #101:
    "istream" has already been declared in the current scope
    class _RWCLASSTYPE istream;
    ^
    "/vobs1/cots/ForteDeveloper/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 317: error #101:
    "ostream" has already been declared in the current scope
    class _RWCLASSTYPE ostream;
    ^
    "/vobs1/cots/ForteDeveloper/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 318: error #101:
    "ios" has already been declared in the current scope
    class _RWCLASSTYPE ios;
    ^
    "/vobs1/cots/ForteDeveloper/SUNWspro/prod/include/CC/Cstd/iostream.h", line 4: error #101:
    "istream" has already been declared in the current scope
    using std::istream;
    ^
    "/vobs1/cots/ForteDeveloper/SUNWspro/prod/include/CC/Cstd/iostream.h", line 9: error #101:
    "ostream" has already been declared in the current scope
    using std::ostream;
    ^
    I've googled a bit, and most of the solutions involve someone mistakenly putting "using namespace std" in a header file. I can't find any case where we do this in our code. One specific file that is failing includes one local header, and that header only includes <fstream.h> and <rw/cstring.h>. It seems like RW and std are conflicting with each other somewhere, but I can't figure out where. The compiler command looks like:
    /vobs1/cots/ForteDeveloper/SUNWspro/bin/CC -xildoff -instances=static -mt -g -fsimple
    -xlibmil -xO3 -xtarget=ultra -DUSE_VFU_LL_C -DXRT -KPIC -library=rwtools7_std -x
    libmopt -DRW_MULTI_THREAD -I/vobs1/cots/rogue/workspaces/SOLARIS7/SUNPRO50/12d -c c4i_file_stream.cpp
    We're still pointing at an older version of RW for the DBTools libraries (rebuilt using the compiler's internal Tools++), but we're using the compiler's internal Tools++ headers and libraries for everything else.

    It sounds like Prevent is not processing the #include directives, or possibly some other preprocessing directives, the same way as the Sun C++ compiler.
    The C++ Users Guide documents how #include directives are processed, and in particular the order in which directories are searched.
    [http://docs.sun.com/app/docs/doc/819-5267/bkaso?a=view]
    If Prevent provides similar documentation, you can compare the docs. If you see a difference, maybe Prevent has some options to control the behavior to make it work like the Sun compiler.
    Note: The CC driver passes some -I directives to the C++ compiler proper (ccfe) that do not appear on the CC command line that you write. The exact -I options depend on other options on the command line. Possibly Prevent is not using the same set of implicit -I directives.
    If you can't resolve the #include directive issue, you might need to talk to Coventry tech support.
    We at Sun are happy to work with 3rd-party vendors to help them get their products working correctly on Sun.

  • Difference between Sun Studio 12u1 and Sun Studio Express...

    Hi,
    on my open solaris:
    SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc
    I've installed Sun Studio Express to get the C/C++ compilers. What is the difference with the Sun Studio 12 suite (which is about 200 MB larger than the Express one)? Also I saw there are patches for Sun Studio 12 (last one Jul 20 2009) that might have a fix for a problem I just reported. How can I install such patches?
    Patch: http://sunsolve.sun.co.jp/search/document.do?assetkey=1-21-126498-14-1
    Cheers, Fons.

    Studio Express is a pre-release or beta release. Some features may be missing or not functional. It cannot be patched. It can be replaced by a later release.
    Sun Studio 12 update 1 is an actual, supported release, later than the most recent (as of this date) Studio Express. If you install SS12u1 from packages (using the installer GUI for example), you can download and install patches for it as they become available. (Installations from a tar file cannot be patched; they can be replaced.)

  • GCC and Sun Studio 12 compatibility ?

    What is the level of compatibility between g++ for SPARC systems and the Sun Studio C++ compilers for SPARC ?
    If I build a shared library using g++ for SPARC is it safe for objects built with the Sun C++ compilers to use these shared libraries ?

    They are completely incompatible, there is no way you can mix them.

  • Bundled Tomcat File Structure and Sun Studio Enterprise 8

    I am having trouble using form authorization with Enterprise 8,
    the bundled Tomcat and MySql.
    Request clarification on what tomcat-users.xml is used by Ent 8.
    I see the following in my configuration:
    1) apache-tomcat-5.5.15-embed/conf/tomcat-users.xml
    2) apache-tomcat-5.5.15/conf/tomcat-users.xml
    3) C:\Program Files\Sun\jstudio_ent8\ide\enterprise1\jakarta-tomcat-5.5.7\conf\tomcat-users.xml
    4) C:\Document and Settings\motel\.jstudio\Ent8\jakarta-tomcat-5.5.7_base\conf\tomcat-users.xml
    I assume the first two are some type of windows cached.
    Further, #3 I assume is initial or default tomcat-user file.
    So is #4 the file that I want to edit so that my IDE can work with Tomcat?
    Thank you for any help and guidance,
    Craig

    I assume the first two are some type of windows cached.
    Further, #3 I assume is initial or default tomcat-user file.I would agree with you; regarding the first two files, it is not clear how they came about since they don't seem to be in either the ide directory or ide-user directory; and also because the directories seem to point to a different version of tomcat, namely 5.15 instead of the ide-bundled 5.7... It is even possible that the first two are not related to JSE ide at all...
    Regarding 3 and 4, your guess is right; 3 is the initial installation directory. This directory is not used by the ide at all for actually working with the tomcat server; this is because the ide-userdir is customizable via the command-line. You can have several user directories at the same time and switch between them by running './runide.exe -userdir <this-sessions-user-dir>'. Naturally the different sessions cannot use the same tomcat server since that would lead to conflicts. So the ide first copies the server installation to the current user directory and then runs the tomcat from there.

  • INFORMIX 9 and SUN Studio Enterprise Configuration

    Attention all informix to java programmers
    Architecture regulations obliges the use of the J2EE platform. Sun ONE
    Application server 7 is the appserver to use and Informix Dynamic Server
    9.22 the database. This is not the most mainstream combination.
    Especially since Sun ONE doesn't support the Informix database.
    It turned out that you can use this combination, but you need to apply
    some workarounds.
    First you need to know which properties to set for the datasource. This
    is the list:
    IfxIFXHOST=foo.bar.com
    PortNumber=1527
    User=Krusty
    Password=L3k4N1%j
    ServerName=foobarifx_ol
    DatabaseName=testdb
    The values are examples. Be careful of the syntax. The first letter
    should be a capital!
    The second adjustment is a little harder. Because Informix syntax isn't
    fully ANSI92 compliant (it doesn't support right joins),
    the persistence manager of Sun ONE generates illegal SQL when
    fulfilling it's CMP responsabilities.
    To solve this problem you need to add a property file to the
    appserv-cmp.jar.
    This lib is part of the Sun ONE server libraries and you can find it at
    {Sun ONE INSTALLDIR}/lib.
    The file name should be "INFORMIX DYNAMIC SERVER.properties" and it
    should go under the folder
    com/sun/jdo/spi/persistence/support/sqlstore/database.
    This is the content of the file:
    FOR_UPDATE=for update
    LEFT_JOIN=LEFT OUTER JOIN
    RIGHT_JOIN=,
    RIGHT_JOIN_PRE=outer
    IS_NULL=IS NULL
    IS_NOT_NULL=IS NOT NULL
    RTRIM=trim (trailing \" \" from
    RTRIM_POST=)
    QUOTE_CHAR_START=
    QUOTE_CHAR_END=
    Having this information up front would have saved me many hours of frustration. I hope anyone else using Informix 9 and J2EE finds this helpful.

    i follow this steps , but i still have problems now i got this exception
    [19/Jul/2005:20:17:53] INFO ( 3812): CORE3282: stdout: java.sql.SQLException: com.informix.asf.IfxASFException: Attempt to connect to database server (srvr_cannes_tcp) failed.
    i think is the ServerName variable did you know which is the problem; i'm still frustrated

  • Sun Studio 11- Now Available (and FREE)

    Howdy,
    Today, Sun announced the availability of Sun Studio 11, the latest release of our venerable set of optimizing compilers and tools. We are very excited about this release for many reasons, including:
    * Record-setting optimizing C,C++,Fortran compilers
    App performance =� Platform + OS + Compilers/Tools
    Using the latest SPARC/x64/x86-systems and Solaris/OpenSolaris versions is great. But to get maximum performance for your app, you need to upgrade to Sun Studio 11.
    http://www.sun.com/software/products/studio/benchmarks.xml
    * Exploits multicore (CMT) systems for maximum throughput performance
    - Multicore optimizations (UltraSPARC, x64)
    - OpenMP 2.5 support with autoscoping across all compilers
    - Support for OpenMP/Solaris/Posix threads in debugger & performance analyzer
    - Dataspace profiling provides hardware and program views into the performance costs associated with application memory references
    * Providing Platform Choice: Solaris 8,9,10 (SPARC, x64, x86) and RHEL 4/SLES 9
    - Optimizing compilers with Solaris versions only
    - Linux version has debugger, performance analyzer, IDE, etc.
    - Technology preview of Linux compilers:
    http://developer.sun.com/sunstudio/linux
    * FREE, unrestricted license (no gotchas)
    Sun Studio has been a good and growing business for Sun, but our intent is very transparent with this pricing model change- we want to accelerate the adoption of Solaris and Sun Studio.
    Download Sun Studio 11 today:
    http://developers.sun.com/sunstudio/download
    Thanks!
    /kso
    PS. See what these 2 guys think of Sun Studio 11:
    (apologies to those who are unable to view real streams)
    http://webcast-east.sun.com/ramgen/archives/VIP-2199/VIP-2199_01_300.rm

    In reading the click-thru license, I came across the following in section 5(i):
    "Software may contain programs that perform automated collection of system data and/or automated software updating services. System data collected through such programs may be used by Sun, its subcontractors, and its service delivery partners for the purpose of providing you with remote system services and/or improving Sun's software and systems."
    Does this mean that the software will phone home to the 'mother ship' and report on my utilization? It seems to be worded in such a way as to be able to send my hardware configuration and other things that I may not want to share with Sun.

  • Sun studio and VCS integration?

    Hi,
    I can't find any information about what VCS, Sun studio can work with, I know netbeans provide CVS, SVN and Mercurial support, is it the same for Sun studio? Is there a documentation page about that, is there plugins, will netbeans plugins work with sun studio ?
    Thanx

    Yes, you are right, Netbeans provides CVS, SVN and Mercurial support (and probably
    some other VCS, like ClearCase), and Sun Studio IDE provides the same support.
    The Netbeans plugins will work with Sun Studio IDE.
    Thanks,
    Nik

  • Sun Studio cc includes unused static inline functions in object file

    While trying to compile some code originally compiled with GCC I run into a linking problem. My problem seems to be caused by that GCC does not include unused static inline functions in the object files while cc does. The following simple example can be used for illustrating this:
    void foo();
    static inline void bar()
      foo();
    int main()
    }This program compiles and links without any problems using GCC and Sun Studio 12 CC (the C++ compiler) but fails to link using Sun Studio 12 cc:
    khepri%> cc staticinline.c
    Undefined first referenced
    symbol in file
    foo staticinline.o
    ld: fatal: Symbol referencing errors. No output written to a.out
    It is probably fine of cc to include foo() in the object file (although not necessary?). My questions are:
    1. Are there any reasons for why cc includes unused static inline functions in the object file while CC does not?
    2. Are there any ways or options to tell cc to not include unused static inline functions in the object file?
    In the example above this is easy to fix by just removing or #ifdef away the code but the original code where I have this problem is not maintained by me and the static inline functions are in header files that get included in multiple C files and in some of these the functions are used.
    Thanks,
    Olav

    olavsa wrote:
    1. Are there any reasons for why cc includes unused static inline functions in the object file while CC does not?
    2. Are there any ways or options to tell cc to not include unused static inline functions in the object file?Removing dead code is an optimization, so you need at least -xO1 for that.

  • Poor performance of string::append on Solaris 10 with Sun Studio 10

    I found string::append(size_type num, char ch) of libCstd consumes too much cpu time comparing with stlport. Anybody knows if this is a known issue on Solaris 10 and Sun Studio 10? Or if I need to use special build options to build with libCstd?
    For example: a.c
    #include <iostream>
    #include <time.h>
    using namespace std;
    int main()
      string ss;
      for ( i=0; i<60000; i++)
        ss.append(1, 'A');
      cout << clock();
      cout << endl;
      return 0;
    }Build with libCstd:
    CC a.c -o a1
    Build with stlport:
    CC -library=%none -library=stlport4 a.c -o a2
    a1 outputs: 10000
    a2 outputs: 1900000
    You can see how big different they have. I am sure their running environment is same.

    I suspect this is due to a bug in libCstd that manifests itself by reallocating the string for each append. Compile and run the program below:
    #include <string>
    #include <new>
    #include <stdlib.h>
    int in_main;
    void* operator new (size_t nbytes) throw (std::bad_alloc) {
    if (in_main) printf ("operator new (%zu)\n", nbytes);
    return malloc (nbytes);
    void operator delete (void *p) throw () {
    if (in_main) printf ("operator delete (%p)\n", p);
    free (p);
    int main () {
    in_main = 1;
    std::string ss;
    for (int i = 0; i < 256; i++) {
    printf ("append(1, 'A')\n");
    ss.append (1, 'A');
    in_main = 0;
    }

  • 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?

  • Sun Studio 11 do not parse make output and create link to file?

    Hi,
    Running Sun Studio 11 and can only get file links in the output window when I run a make command that uses CC -g (debug option). We have integrated other tools into our make system (flexlint, cppUnit..) and even though we make sure that the syntax is exactly the same as the compiler output and matches regular expression under tools->options->building->make settings->error expression, it doesn't work. Why do you have to debug compile to get sun studio to create a file link in the output window? Doesn't sun studio just parse the text from the make command?
    example of flexlint output for which no link is created:
    "/vobs/project/oss/fm/fm4/fm-fmalib/fmbal/fmaaulib/src/FMA_List.cc", line 440: Error 84: sizeof object is zero or object is undefined'�
    example of make debug output for which we do get a link:
    "/vobs/project/oss/fm/fm4/fm-fmalib/fmbal/SunOS5.10/inc/FMA_alarm_record.hh", line 1310: Warning (Anachronism):Info "static" is not allowed and is being ignored.
    Regards,
    Ola

    I'd second Maxim's suggestion: try NetBeans 5.5 with C/C++ Development Pack. The official release of NetBeans C/C++ Development Pack 5.5 has happened a few days ago. You can download it from
    http://www.netbeans.info/downloads/all.php?b_id=2284
    Some of the changes between the beta3 build and FCS are:
    * Significant performance improvements in the code parser resulting in faster results in the Class View and Code Completion
    * Programs now run in an external terminal (system dependent) by default. This allows better input control
    * Significant performance improvement in the debugging module
    * Significant functionality improvement in the debugging module
    * New project type "C/C++ Project From Existing Code" which simplifies creating a project from existing code
    * Macro support in code completion
    * Hyperlink navigation for macro usages and #include directives
    * Reformat code
    * Code folding
    * Code completion
    All these features will appear in next Sun Studio release, so you can
    consider NetBeans C/C++ Development Pack 5.5 as a preview of new
    Sun Studio IDE.

  • Question about script in sun studio creator2 and netbean6.1

    Hi, I have a quick question
    I have started a project by using sun studio creator2, the main page contains following script, it works perfectly fine.
    <script type="text/javascript">
    function getUser()
    var net = new ActiveXObject("wscript.network");
    document.getElementById('form1:hiddenField1').value = net.UserName;
    </script>
    And then I bind the field to a managed bean's property.
    However, because I need to use netbean6.1 to continue this project. I find previous script doesn't work any more. (I can get net.UserName, but I can't store the value to hiddenfield)
    I checked woodstock documentation, and guess following will do the same job
    <webuijsf:script>
    function getUser() {
    var net = new ActiveXObject("wscript.network");
    var domNode = document.getElementById('_form1:hiddenField1');
    domNode.setProps({value:net.UserName});
    </webuijsf:script>
    Once run the getUser() function, I got an "object doesn't support this property or method".
    It looks like IE security level setting problem. If it is so, because it is company setting. There is nothing I can do here.
    Any one knows workaround to store the retrived userName into hiddenfield?
    Thanks in advance!!!

    any help is appreciated

Maybe you are looking for

  • FileVault 2 guest account is greyed out

    Yesterday I performed a clean install of OS X Lion for my MBP (early 2011) had some kernel panics recently and I was told that it could be a software related problem. Anyway I installed all of the updates, switched on File Vault, Back to my Mac and e

  • Pdf dowloading problems

    When trying to download pdfs of academic journal articles I either get the first page of the document (and nothing else) or a message that says that I need to download additional add-ons, followed by a page of many options with no suggestion as to wh

  • When i close window with multiple tabs angd start new session (open new window) old tabs open again, how can i stop it?

    when i close window with multiple tabs and start new session (open new window) old tabs open again, how can i stop it?

  • Warum fehlen in der Bridge CS6 im Menü: Werkzeuge die Einträge?

    Hallo alle miteinanader, warum fehlen in der Bridge von CS6 im Menüpunkt: Werkzeuge die Einträge für Fireworks, Photoshop und Illustrator? Könnte es sein, dass diese Einträge bei der Installation der Software gesetzt werden? Ich hab mich im November

  • IPhone charging question...

    My iPhone does not charge on my car unit. It plays the iPhone over the car speakers and uses bluetooth for the phone like it should. It will charge an iPod just fine, but not my iPhone. Has anyone else experienced this kind of problem with car units?