Sun Studio Feeds

Sun Studio now runs on Oracle Enterprise Linux. This extends the Linux platforms supported to include RHEL 5, SuSE 10, CentOS 5, and now OEL. Sun Studio continues to be available FREE on Linux as well as Solaris and OpenSolaris platforms.
You can download it from the Sun Download center (here).

In June 2009, Sun Studio announced a blogging contest that ran until September.
The winners of that contest are now being showcased on the Sun Studio landing page.
The first winner to be showcased here, on Sun Studio page, and here, at SDN Program News, is Sandeep Koranne, whose entry describes how Sun Studio 12 compilers are used to engineer a complex, innovative discrete geometry algorithmic application. Sandeep is happy that he gets a 20% boost from Sun Studio compilers over GCC. But more than just performance, using Sun Studio 12 Compilers allowed him to "experiment with data-structures, perform automated performance tuning and overall presented a better environment for complex algorithmic coding, where the scientific researcher uses the programming environment to not only develop the code, but also to document and collaborate about the algorithm and methods used in the application" . The code is written in Standard C++, uses STL and written with portability in mind. Sandeep uses an IDE feature for Automated Task List generation innovatively to collect a list of "TODO" items. Neat!
Good work, Sandeep. And congratulations!
And congratulations to the other winners as well.

It was heartening to see a lot of Sun Hardware at Oracle OW.  For years, I've tried to persuade Sun TechDays and other folks to showcase Sun hardware at these developer shows, but its never really materialized in any meaningful way. Sure, theres the odd server for virtualization, etc at the shows, but that was mostly it.
By comparison, there was plenty of Sun HW here. I'm going to try and list out some of the big, hunking boxes I saw in the Sun booth and elsewhere. I'm sure my list isnt complete; I expect I will update this blog to make it more so. For now, here goes, what I saw.
  1. Top of the list, of course, is the Sun Oracle Exadata Version 2(tagline: Hardware from Sun, Software from Oracle). Basically an OLTP database machine billed as twice as fast as its predecessor. This was the treat of the show, showcased just outside the Keynote location. Impressive piece of iron and it drew a lot of crowds (both onlookers as well as buyers, from what I hear).
  2. StorageTek Modular Library system with 200 to 3000 cartridge slots (machine on display had 700). With a robotic arm that was continuously in motion, this machine made an impressive demo. And it was placed right next to our SunStudio booth, which drew curious onlookers.
  3. Sun Storage 7000 Unified Storage, aka Amber Road. This is an amazing amount of data (those on display were 12TB systems) in a small form-factor and with some amazing ease of administration to go with it.
  4. Sun Storage Flash Array system. This is the secret sauce that makes the Exadata database machine tick! Flash speeds are the talk of the town since they have the potential to increase IOPS by an order of magnitude and save $$$ by making disk/Flash tradeoffs for throughput, storage and price.
  5. Rackmount Servers: Mostly featured at the Demo stations were rackmounts systems based on UltraSPARC T2 (Enterprise T5240 servers), or Nehalem (Sun Fire X4450 servers) or AMD servers (Sun Fire 4240 servers)
Besides this, there were banners about the Sun branded database machine built out of UltraSPARC T2 5440s that recently claimed #1 status in all 7 key benchmarks (follow this link). The message was clear, from what I could tell: Sun is going to bring performance to the game and Oracle will optimize all Software to work efficiently on Solaris and Sun systems. In view of recent press announcements touting World Record TPC-C performance and a promise to keep Sun customers happy by investing even more in Sun technology than previously, this showcasing of Sun hardware bodes well for Sun customers as well as for Oracle's enterprise partners and customers. Best of all, there seems to be a palpable excitement in both companies about the synergies around this acquisition that was hard to miss both from the Sun booth as well as the Oracle booths.

Yesterday was my first day at OOW. Even though there were some scintillating events over the weekend, in particular these keynotes from Sun's Scott McNealy & James Gosling(view here) and Oracle's Larry Ellison (view here), I wasnt at that portion of OOW.
My first impressions, even before I entered Moscone, was Wow! The place was entirely taken over by Oracle. Buses ran billboards advertising Oracle and the event, there was even a huge tent between Moscone North and South, reserved as dining area and essentially closing Howard Street (picture here). There was even the scale model BMW Oracle Racing High-tech Catamaran on display at the Fourth and Howard Streets intersection. Exhibitions were in Moscone South AND Moscone West. Essentially, that 6 block area was nothing but Oracle OpenWorld.
My second impression was suits. Lots and lots of them. Essentially different from IDF, which billed itself as the next, next, next big thing, and JavaOne, which is clearly a hacker's conference (and where James reminded Sun CEO Jonathan Schwartz that he was out of place in his suit at the keynote and got huge applause from the audience), this one is a carefully and well-scripted conference. I could not listen to the entire keynote from Phillips and Catz (view here), but what I could hear was very carefully laid out and executed. One astounding fact I gathered (and later could relate to): Oracle has over 3000 products and the portfolio is growing ever faster!
So, I had booth duty on the exhibition floor. Moscone South. Essentially a technology, but even more importantly, a services showcase. All the major partners were there: HP, IBM, Dell, AMD, Intel and of course Sun. And also, networking and wireless partners like Cisco, Brocade, AT&T, Blackberry and Verizon.  But also, Infosys, CSC, NetApp, Deloitte, Wipro, EDS, Accenture, KPMG, PriceWaterhouseCooper, Tata Consulting (TCS). I'm singling out that last list because I havent seen them at any of the developer conferences I usually go to (Sun TechDays, JavaOne, IDF, LinuxWorld, etc). Oracle itself was fairly hidden (or backgrounded), giving their partners essentially all the glory and topspots on the floor.  [Moscone West has a HUGE, HUGE Salesforce.com presence which I intend to check out today].
There was a Cloud booth (for those of you who think Oracle is anti-Cloud) and I engaged in some interesting and long discussions with vendors in that booth (except Amazon, I'll corner them today, because they are more of a known quantity as far as I'm concerned, so unlikely that I'll learn anything new). On-Demand computing seems to have a big presence in what Oracle calls "DemoGrounds" (see this picture, eg).
The Sun booths were very strategic and visible. Right next to the main entrance. We had some foot traffic, but for the Sun Studio booth, mostly non-existent. I probably talked to about a dozen to 15 non-Sun folks and some of them were even Oracle folks, who I knew by email before. Given that the crowd was a suited, mostly business IT type crowd, I am not surprised. A few that came by were disappointed that we didnt run on Windows, but were suitably impressed by the offering and demo when I showed them what we had.
An interesting day. Tiring, since the shift turned out to be a 5+ hour shift without a lot of interesting traffic, but I think I learned a bit from others there. Which makes it entirely worthwhile.
More details tomorrow, I hope.


Oracle OpenWorld (OOW) is coming up Oct 11-15 at Moscone Center, San Francisco and Sun is a major sponsor this  year. Sun will be showcasing Solaris, Java and Glassfish (follow the links here for a list of session in each of these areas. Follow this  link for the complete set of sessions, along with speakers, that Sun will be showcasing there).
Sun Studio will have a session on Porting applications to Solaris and Maximizing Performance (the first part is about the SourceJuicer project in OpenSolaris and the second part is about Sun Studio Compilers and Tools). There is also a  demo station. This should be an interesting experience, trying to understand what OOW attendees are looking for .
For our part, we will be emphasizing Sun Studio's strengths and focus areas:
  • Optimized C, C++ & Fortran compilers and highly tuned libraries (SPARC & x86)
  • Advanced Development tools particularly for Parallel programming (Thread and Performance Analysis)
  • Solaris DTrace-based visualization tools
We have three Demos ready to go; all are based on IDE, Dlight (follow this link for a screencast), Debugging and Analyzer features. I will continue to blog about what I see there  and my impressions/takeaways.


In the past week, Sun has announced availability of new releases and updates to three of the most interesting Developer tools:
  • Sun Studio 12 Update 1 is the latest production release of Sun Studio Compilers and Tools. Among the shiny new features are:
    • C, C++, Fortran compiler optimizations for the latest UltraSPARC and SPARC64-based architectures and support for latest Intel and AMD chips, including SSE3, SSE4a, SSE4.1 and SSE4.2 instructions
    • Compiler, debugger, and profiling support for OpenMP 3.0
    • Profiling of distributed MPI-based applications 
    • DLight - New tool for unified application and system profiling using Dynamic Tracing (DTrace) technology on Solaris platforms 
    • dbxTool - New stand-alone graphical debugger 
    • Highly tuned and parallelized scientific libraries, including ScaLAPACK 
    • Updated IDE based on NetBeans 6.5.1 software
    Look here for more information: http://developers.sun.com  as well as the Studio website:  http://developers.sun.com/sunstudio
  • Sun HPC ClusterTools 8.2 offers an integrated toolkit with a  comprehensive set of capabilities for parallel computing that allows developers to create and tune MPI applications that run on high-performance clusters. You get MPI libraries based on Open MPI 1.3.3 standard and ORTE parallel job launcher. It also includes support for Infiniband, shared memory, 10 GbE and Myrinet MX support along with plug-in for Sun Grid Engine, support for third party parallel debuggers (TotalView and Allinea DDT) and is integrated with Sun Studio Analyzer. You can find more information on this release (including Download, Documentation) for Solaris 10, OpenSolaris (both SPARC and x86), and Linuxes (RHEL5, SLES10 and CentOS 5) here: http://www.sun.com/software/products/clustertools 
  • NetBeans 6.7 has shipped.  The primary focus of this release was connectivity: helping developers connect to the latest technologies and to each other. NetBeans 6.7 now offers:
    • Integration with Project Kenai 
    • Native support for Maven 
    • Support for GlassFish (v3) 
    • Issue tracker and Hudson integrations 
    • Support for JavaScript 1.7 
    • Ruby remote debugging 
    • Integration of the Java ME SDK 3.0
    You can find more information about NetBeans 6.7 here.

There is a set of runtime libraries that are maintained by the compiler team, and delivered to Solaris so they can be made available in /usr/lib on all Solaris systems. The ones most likely to affect people are the OpenMP support library (libmtsk) and the C++ runtime libraries (libCstd, libCrun). What makes these libraries special is that they share interfaces with the compilers. The compilers implement language features by automatically inserting function calls to these libraries. This means that new features in the compilers can require new versions of these libraries to be installed in /usr/lib.

Updating the libraries

The long-standing process for this is that users are expected to install the latest runtime library patches when they want to use a new release of the compilers, or when they want to run executables that were built with the latest release of the compiler.

This procedure has some problems.

1) The lead time, from last bug fix, to getting a Solaris patch available on sunsolve.com can be several months. The compiler team never knows when the last bug will be fixed in a compiler release, and they don't know if that bug will require a library fix or not.

2) Hunting down the right runtime library patches, and installing them on all the machines that need them requires significant time and system administration skills.

Note: On Linux, we always have to include our own copies of the runtime libraries. That's an added complication, but I'm discussing the problems related to skew between the compilers and the Solaris installation, and on Linux there is never any skew.

SPROtweak

We lived with these difficulties when our releases were 12-18 months apart, but we've been doing more frequent Express releases for several years now, and so we've been relying more and more on a workaround. Internally, we call that workaround SPROtweak after the name of the package that implements it. The SPROtweak package contains copies of all runtime libraries that the compiler team delivers to Solaris. We install this package inside the compiler install directory when we want that compiler to override the system library versions. Our current policy is to install SPROtweak for Express releases, but not for FCS releases. This workaround also has several problems:

1) Programs built with Express compilers depend on the compiler installation directory. If you run the executable on a different computer, it will try to fall back to the system libraries, but it may not work correctly.

2) Official Solaris patches to support Express releases may or may not be available in a timely fashion, so executables are only moderately portable to different Solaris hosts.

3) We use this workaround as a crutch inside Sun. We commonly install the SPROtweak package even in FCS versions of the compilers inside Sun, because we don't want our users to have to install patches. Since the compilers inside Sun are often used from an NFS mounted directory, we can usually avoid version skew. But we're essentially saying that we don't want to deal with patches, but we're willing to make end users deal with patches.

Sometimes we make a distinction between casual users and production users. The internal installations of the compilers are for casual users, so we don't want to make them deal with patches. Production users will normally be expected to have their own installation of the tools, and have closer control over the patch levels of their build machines. Production users will have a sys-admin to maintain their build machines. This side-steps the issue of the many casual users that don't work for Sun.

Are there any better solutions?

A) Always include the latest runtime libraries inside the compiler directory, and give users a simple command line option to use the system libraries or the local copies when creating an executable. This is fairly straightforward, but it doesn't go very far towards creating a seamless solution.

B) Fix the Solaris patch process so it takes less time to get these fixes available in Solaris. This would make the situation on OpenSolaris pretty good, because availability is 99% of the problem. Updating the runtime libraries is much simpler (although you still have root permissions). But the situation on Solaris 10 is only half addressed, because it's still a PITA to install the patches.

GCC?

I'd be interested in hearing the different ways that "version skew" is dealt with on Linux.

Future

In the long run, the way we will address this skew may be different on OpenSolaris and on Solaris 10 because the distribution mechanism is different.



A new paper by Diane Meirowitz, Sr Development Compiler engineer in Sun Studio division, talks about mapping GCC options to Sun Studio options.
I know there are users/Sun customers who were looking for such tips, so I thought I'd pass it on here.

There is now a browsable index to all the Sun Studio technical articles on SDN at:
http://developers.sun.com/sunstudio/documentation/techart/index.jsp

Kudos to the team on getting it there; it will now be easier to find Sun Studio tech articles!


Come by and listen to my podcast with our Marketing Manager(Ikroop Dhillon) at this site:
Sun Studio Express 11/08 Podcast.
I start off a bit clunkily but it gets better as the engine's warmed up!
Thanx, Ikroop, that was a lot of fun!

Sun Studio Express 11/08  is now available for  Solaris 10, OpenSolaris and Linux (RHEL and SuSE). We are looking for you to preview the new features and give us feedback. Listening to this feedback is a prime motivation for exposing these features, so please be sure to sign in and use the Sun Studio Forums to give us your comments, suggestions, (gripes?), etc

The new release is loaded with features. Some of the big bullets are:
  • C, C++ compiler, assembler features:
    • Support for Nehalem (Intel Xeon) and Shanghai (AMD) processors: in particular, SSE4.1 and SSE4.2 features
    • World Record numbers on Intel Xeon Penryn as well as new SPARC64-VII based systems that I have already outlined previously here(Intel) and here(SPARC).
    • Optimization enhancements for SPARC64 VI, VII, UltraSPARC IV+ and Niagara-2 chips (aka UltraSPARC T2), bringing several World Record Benchmarks on these new machines
  • OpenMP3.0 API (finishing off the remaining features) support in C, C++, Fortran compilers
  • Enhanced performance analysis/profiling of MPI applications
  • Support for  Sun HPC ClusterTools 8, which supports OpenMPI 1.3 and allows creation (and tuning) of MPI applications that run on high performance clusters
  • A NEW standalone debugger: dbxtool 
  • Sun Performance Library: ZGEMM improvements for SPARC64-VI and SPARC64-VII
  • Remote Development in IDE and dbxtool
  • Packaging: supports tar, zip, SVR4, RPM, Debian packages; other packaging systems may be added using pluggable architecture
  • NetBeans 6.5 based IDE
    • Improved project import: new provider based on build log analysis
    • Static Call Graph
    • Dramatically improved Code Assistance accuracy (97%+ on average project)
    • Syntax Error Highlighting
    • Unused variables highligting
    • Unresolved identifiers highlighting (experimental, turned off by default)
  • Project D-light is a plugin for the Sun Studio 12 IDE that offers a variety of instrumentation that takes advantage of the Dynamic Tracing (DTrace) debugging and performance analysis functionality in the Solaris OS.
  • DTrace GUI Plugin is a graphical user interface (GUI) for running DTrace scripts
  • Platforms:
    • Officially supported now on OpenSolaris 2008.05 and OpenSolaris 2008.11
    • Available on newer Linuxes: RHEL5, SuSE10?, Ubuntu 8.10 and Solaris 10 update 5 (or newer)
You can find the Express Readme here.
For more detail on these features, see the Express Details wiki pages. I will deepdive into details of the features here in subsequent blogs.

NetBeans just closed 10th anniversary celebrations!
Its hard to believe the journey: from a student project at Prague to a prize winning OpenSource project into one of the most popular IDEs and Platforms today! Its a great showcase of a successful OpenSource story that is now changing development, not just for Java, but also for C/C++ (NetBeans is the basis for the Sun Studio IDE), PHP, Ruby and emerging Web platforms.
Congratulations, NetBeans! Heres toasting to the next decade!

There is now a new project in OpenSolaris to navigate the latest OpenSolaris sources as NetBeans C/C++ (or Sun Studio) IDE projects. All classic browsing actions like hyperlink navigation, class browser, call graphs, etc are available. The projects also enables users to seamlessly integrate third-party software like drivers with the ON sources.
What is not available yet is building and debugging these sources automatically in the IDE. This is a key missing feature; most people learn by trying things out.
OpenSolaris builds 100 and 101 are available; you have to download both the projects created and the sources that correspond to those. Future builds will be tracked in sync. There are over 1000 NetBeans projects created with each build of OpenSolaris . There is an example user scenario of how a driver writer can use this kind of navigation to identify and verify appropriate dependencies on OpenSolaris projects.
From my own personal experience, this is a very interesting scenario to demo; I have done it myself at various customer sites and at Sun TechDays and the reception has uniformly been wonderful. When I bring up the IDE with this, there is an immediate Wow! from the audience.
The IDE is working on making similar projects possible for other communities as well. In the meantime, please take a look at this Navigator Project link , try it out, give the team feedback and help us improve this even further!

Two new items have been added to the Sun Studio Developers landing page.
"Why Use Sun Studio 12 Compilers and Tools?" is a general introductory paper by Steve Meloan for new or introductory Sun Studio and/or Solaris users and talks in generality about how these compilers and tools help with program development in a multicore world.
The second is a podcast by Ikroop Dhillon and Ruud Van Der Pas' about Sun Studio Express 07/08 that talks about OpenMP 3.0 support and work done to enable MPI profiling and clustertools support.


We're making the internal transition to building Sun Studio on Solaris 10 (instead of Solaris 9). This is a big deal because the product bits immediately become useless on any Solaris 9 system. There's a new libm.so.2 library that became available on Solaris 10, and if you depend on it, you can't run on Solaris 9. It's a challenge making sure our vast ocean of loosely maintained lab machines is ready for the change. The good news is we get to use newer, faster hardware. :-)

I'll make this post short because I'm using ScribeFire for the first time in forever, and I don't trust it. I can't believe blogging is still this hard. :-(


This is an addendum to the previous post on running Sun Studio Express 7/08 on top of barebones OpenSolaris 2008.05.
As others have noticed, OpenSolaris 2008.05 LiveCD doesnt come with headers, etc that we need to compile apps.
So, heres a short cookbook of what to execute before tarring the Sun Studio Express 7/08 tarball.

Step 1, "prepare your system" with essential updates:

$ pfexec pkg install SUNWipkg@0.5.11-0.86
$ pfexec pkg install entire@0.5.11-0.86

Next,  make sure the following OS dependencies are installed:

$ pfexec pkg install SUNWhea@0.5.11-0.86
$ pfexec pkg install SUNWarc@0.5.11-0.86
$ pfexec pkg install SUNWj6dev@0.5.11-0.86

That should get most of the stuff needed (unless you need other headers like X11 to get applications compiled.. its unfortunate that there isnt a developer cluster I can recommend. Or maybe, I just dont know)
For more information, refer to this Wiki for up to date details on these issues.

The NetBeans IDE 6.5 Beta release provides several new features and enhancements, such as a new IDE-wide QuickSearch shortcut, more user-friendly interface, and automatic Compile on Save. NetBeans is an Open Source IDE and is an ideal platform for developing Java, C/C++, JavaScript, Ruby, Groovy, and PHP applications.
NetBeans supports multiple platforms, including Windows, Mac, Linux, and Solaris and is the basis for the SunStudio IDE (which has additional features such as dbx-based debugger, Performance Analyzer, D-light, etc).

NetBeans 6.5 C/C++ new features include:
  • Improved code completion, error highlighting, and semantic highlighting
  • Call graph, Memory window
  • Remote development
  • Packaging of application as tar files, zip files, or SVR4 packages
Additionally, the latest DTrace GUI Plugin with Chime Visualization is also available with NB 6.5

Check it out and download a copy here.

I'm giving a Chalk Talk at Intel Developer Forum Fall '08 (San Francisco, Moscone Center, August 19-21), titled:
Multi-threaded Development on OpenSolaris* and Linux* using Sun  Studio*

The talk will focus on Sun Studio tools, including compilers that help with MT applications, especially targetted towards multi-core chips. It will focus on four aspects that are basic to Sun Studio's value proposition:
  • Performance
  • Productivity
  • Parallelism (particularly, MT)
  • Platforms (OpenSolaris and Linux)
Chalk talks are a fun way to introduce technology, show a demo and deepdive into many interesting areas of upcoming development. I'll talk about Data Race Detection (and the Thread Analyzer tool which helps in this quest), MT debugging, DTrace and profiling tools, and emerging technologies like Transactional Memory .

My session is on Tuesday, August 19th at 9:45AM. Hope you can join me there!


After discussing Whats New in IDE, D-light and DTrace GUI and Documentation  for Sun Studio Express 7/08,  I'd like to cover compilers.
  • Performance, Performance, Performance: This is of course, the #1 focus for any Sun Studio release. In this release, we have rolled in changes that were made in Sun Studio 12 patches on SPARC. Sun's BMSeer blog has already noted the benchmark numbers on the recently released Sun SPARC Enterprise M8000 and M9000 machines, in which Sun Studio has played a critical role. Among these:
  • Improved Performance on x86. Previously, Sun Studio had trailed Intel Compilers (ICC) on the newer Penryn platform, while being very competitive (or better) on Woodcrest. One notable gap was the auto-parallelization in the SPEC program, libquantum. We've improved this immensely and are seeing very impressive scaling on this benchmark. Other improvements include instruction selection, improved auto-parallelization overall and improved micro-vectorization, among many others.
  • Support for new architectures, including AMD's Barcelona, Intel's Penryn and Nehalem and new quad-core SPARC64-based SPARC Enterprise servers.
    • Support for SSSE3, SSE4a, SSE4.1, SSE4.2 instruction sets both in assembler/disassembler (and dbx) as well as compiler intrinsics
    • -xarch, -xtarget, -xchip, -xcache support
    • Sun Performance library support for new architectures
  • x86 assembler has been extended to understand GNU assembler syntax,
    • Context sensitive mnemonics without suffix. For example, mov $10, mem the Sun Studio Assembler defaults to movl $10, mem
    • GNU Assembler compatible instruction synonyms have been added:
      cbw==cwtd, cwd==cwtd, cwde==cwtl, cdq==cltd, cdqe==cltq, cqo==cqto,
      movzb==movzbl, sysret==sysretl
    • GNU Assembler compatible assembler directives have been added: .p2align,.extern,.global,.
  • x86 assembler can assemble 32bit memory addresses in -m64 mode
  • OpenMP 3.0 APIs implemented. This wiki describes the features and implementation in greater detail.
  • Interval arithmetic support for C++ on x86 (-xia option)
  • C++ now inlines code with -g and any optimization option
  • The pragma #pragma must_have_frame(list-of-function-names) is now supported.
  • Additional support for GCC source compatibility, including
    • __FUNCTION__ is a predefined identifier that contains the name of the lexically-enclosing function
    • A case label in a switch statement can have a case range now
    • The second operand in a conditional expression can be omitted.eg
      • x ? : y is now equivalent to  x? x: y except that x is not reevaluated
    • Additional _attribute_ values are supported, eg:
      • _attribute_((const))
      • _attribute_((constructor))
      • _attribute_((destructor))
  • Fortran 2003 IMPORT statement is now implemented.
Additionally, these options have been EOLed and removed from this release: -xsb, -xsbfast. There is a newer, improved and easier way to browse data in the IDE than by this classic (and legacy) method.

Disclosure Statement:
SPEC, SPECfp, SPEComp reg tm of Standard Performance Evaluation Corporation. Results from www.spec.org as of 07/14/08. Sun results submitted to SPEC.
Sun SPARC Enterprise M9000 (256 cores, 64 chips, 192/256 OMP threads, 2.52GHz) 1456653 SPECompM2001, 1250890 SPECompMbase2001.
Linpack HPC, results from http://www.netlib.org/benchmark/index.html as of 07/01/08. Sun SPARC Enterprise M9000 (SPARC64 VII @2.52, 64 chips,256 cores), 2.023 TFLOPS.
Sun SPARC Enterprise M8000 Server(SPARC64 VII 2.5GHz) 28.8 SPECfp2006, 25.8 SPECfp_base2006.




Sun Studio Documentation is now accessible in a new location: the Sun Microsystems Documentation Center. Click on Sun Studio which takes you to the Sun Studio Documentation Center: this is the center for having technical papers, reference material, documentation, screenshots, tutorials, demo videos, etc.
Here you will find three tabs:
  • Topics: Information here is organized by topics familiar to the typical application development tasks. Topic areas include: compiling, debugging, performance tuning, high performance computing, performance profiling, multicore/MT/parallel programming, numerics, etc
  • Technical Articles: This is a collection of in-depth technical articles
  • References: Links to the complete documentation set for the current release of Sun Studio compilers and tools, as well as previous releases. It also includes user guides, reference manuals, man pages, and readmes, installation and getting started guides, and a Whats New doc

The documentation folks are also starting a new experiment by including details about a release for all the components (compilers, debugger, IDE, analyzer, etc..) on a new, but more comprehensive and upto-date Sun Studio Express Wiki site.

Besides these two new locations, the standard places of reference continue to be the docs.sun.com information center site featuring Sun Studio Collectionand the Sun Developer Network site for Sun Studio.



The ink had barely dried on my previous posting which included a reference to DTrace GUI features that are new in Sun Studio Express 7/08 , when Nasser Nouri, who created the DTrace GUI plugin in NetBeans, brought to my attention this newly published article on it at the NetBeans site.
The article describes how the DTrace GUI works, how to use D Scripts packaged in the DTrace Toolkit, how to download, install and run the Plugin.
A new feature added to the Plugin that gives it additional appeal is the inclusion of Chime, a graphical tool for visualizing DTrace aggregations. Users like it for its ability to display data as it is streaming in, but an interesting feature is the way it can be extended for new displays(yes, the article has a section on Adding New Chime Displays as well!).
There are also some nice screenshots there. You can download the DTrace GUI from the NetBeans Update Center.
Good work, Nasser!


This blog entry focusses on some new functionality in the latest Sun Studio Express 7/08. There is more to follow; here, I'd like to focus on three aspects of this Express.

IDE
The IDE in this Sun Studio Express release is based on NetBeans IDE 6.1, and includes the following new features:
  • The Include-Hierarchy window lets you inspect the hierarchy of source and header files
  • The Type-Hierarchy window lets you inspect all supertypes and subtypes of a class
  • A new toolbar button lets you toggle between corresponding source and header files
  • Code completion now works for #include directives
  • A new Go to Type menu item lets you find a type (class, struct, enum, or typedef) by its name or prefix
  • A new Go to Include menu item lets you go directly to a file that is included in a source or header file
  • A new Go to Function or Variable menu item lets you find a function or variable by its name or prefix
  • Project dependencies can be created for projects from existing code
  • A choice of formatting styles for your source code
  • A new Threads window shows you all the threads in the current debugging session
  • A new Disassembler window displays the assembly instructions for the current source file
  • A new Usages window shows you everywhere a class (structure), function, variable, macro, or file is used in your project's source code
sunstudio Command Options changes:
The following changes have been made to the options of the sunstudio command:
  • The --enablejava and --disablejava options have been removed. You can now use the Plugin Manager (Tools > Plugins) to enable and disable the Java plugins.
  • The format of the --ui-classpath path option, which appends the specified path to the IDE's classpath, has changed to --cp:apath.

D-Light Tool
The objective of the D-Light tool is to make sophisticated application and system profiling, more accessible for casual users. There are many tools that profile applications and there are other tool that profile the system stack, but there are few tools that can join these views into an easy to use interface. For the first time, you can optimize your application and system environment by visualizing performance bottlenecks and resource contention up and down the application system stack.
Using an intuitive drag and drop interface, the D-Light tool provides an extensible library of instruments that represent the latest advances of profiling technology, including Solaris Dynamic Tracing (DTrace). With instruments like CPU accountant and Sampler, developers can use the interactive GUI to quickly profile and peer into the runtime behavior of their applications.
For more information on using the D-Light tool, refer to the Project D-Light Tutorial .
The D-Light Tool now premieres on Linux platforms with two instruments, including a Clock Profiler. Its just the start of a more meaningful offering on Linux (and a nod to building instruments other than those based on DTrace.

DTrace GUI Plug-in
The NetBeans DTrace GUI plug-in is a Graphical User Interface (GUI) for running DTrace scripts, even those that are embedded in shell scripts. In fact, the DTrace GUI plug-in runs all of the scripts that are packaged in the DTraceToolkit. The DTraceToolkit is a collection of useful documented scripts developed by the OpenSolaris DTrace community.
In its own manner, DTrace GUI Plug-in has proved to be a popular tool in the NetBeans inventory, with many thousands (indeed 10's of thousands) of downloads.
For documentation for the 0.2 version of the plugin that is included in this Express release, see http://www.netbeans.org/kb/60/ide/NetBeans_DTrace_GUI_Plugin.html
The 0.4 version of the plugin, which includes the Chime graphical tool for visualizing DTrace aggregations, is now available for download from the NetBeans Plugin Portal. To download and install this version, choose Tools->Plugins in the Sun Studio IDE, and select DTrace from the Available Plugins list.


A note to add if you are using OpenSolaris and want to use Sun Studio Express 7/08 with it:
OpenSolaris 2008.05 has a mechanism that lets you point it to the latest repository. The facility is usually:
# pkg set-authority opensolaris.org
 If you use it to update packages to the latest builds, there is a chance that you might run into a mismatch between various packages that might cause dbx to not work. The problem manifests itself while debugging 32bit MT applications with  messages like:
dbx: warning: could not initialize thread debugging library -- debugger service failed
dbx: warning: thread related commands will not be available
Or a message such as:
ld.so.1: ld: fatal: libld.so.4: version `SUNWprivate_4.2' not found
This is usually due to a mismatch between ld and liblddbg.so in packages such as SUNWtoo and SUNWcsr
If you run into this problem, or better still to avoid this problem, the advice is to stay on the OpenSolaris 2008.05 version and not upgrade to the latest builds.
Alternately, at least at this stage, updating the entire system also works (since everything stays in sync), but there is no guarantee that this will continue to always be the case, so its best to avoid doing this upgrade.


Sun Studio Express 7/08  is now available for  Solaris 10, OpenSolaris and Linux (RHEL and SuSE). We are looking for you to preview the new features and give us feedback. Listening to this feedback is a prime motivation for exposing these features, so please be sure to sign in and use the Sun Studio Forums to give us your comments, suggestions, (gripes?), etc

The new release is loaded with features. Some of the big bullets are:
  • C, C++ compiler, assembler features:
    • Support for SSE4.1 and SSE4.2 features
    • Instruction selection and performance enhancements for AMD's Barcelona and Intel's Penryn and upcoming Nehalem chips
    • Optimization enhancements for SPARC64 VI, VII, UltraSPARC IV+ and Niagara-2 chips (aka UltraSPARC T2), bringing several World Record Benchmarks on these new machines
  • OpenMP3.0 API support in C, C++, Fortran compilers
  • MPI Profiler
  • Performance analyzer enhancements
  • D-light is a plugin for the Sun Studio 12 IDE that offers a variety of instrumentation that takes advantage of the Dynamic Tracing (DTrace) debugging and performance analysis functionality in the Solaris OS.
  • DTrace GUI Plugin is a graphical user interface (GUI) for running DTrace scripts
  • NB6.1 based Sun Studio IDE
  • RTC on Linux for memory access, leaks and usage
  • Sun Performance Library improvements, geared towards new (micro-)architectures
You can find the Express Readme here.
For more detail on these features, see the Express Details wiki pages. I will also highlight features in each of these topics in subsequent blogs.

Additional note:
Several others have blogged about it as well. Heres a few that you might want to visit to get other aspects of this release:
On the Record: http://blogs.sun.com/ontherecord/entry/sun_studio_express_07_08
Richard Friedman :http://blogs.sun.com/rchrd
OpenMP: http://openmp.org/
HPC at Sun:  http://hpc.sun.com/
Yuan Lin here: http://blogs.sun.com/yuanlin
Josh Simons: http://blogs.sun.com/simons/category/HPC
Kuldip Oberoi here:  http://koberoi.com/


Many of our users apparently do not download the latest Sun Studio patches because they do not know about a SunSolve policy change over the past years. Please note that Sun Studio patches continue to be free; the only change is that users need to get a sunsolve online account (which is free) in order to download it.
To drive this point home, our support team has added the following text to all of our patch downloading pages :

Sunsolve is a proprietary online database of software patches, patch information, tools, technical articles and troubleshooting documents. Access to SunSolve requires you to have a Sun Online Account and accept the updated License Agreement. Getting new account at sunsolve is free and does not require a service contract at https://reg.sun.com/register?program=ssu&goto=http://sunsolve.sun.com. If you have an existing SunSolve Sun Online Account, and you have not already accepted the new Software License Agreement, the next time you login and access SunSolve Online, you will be prompted to accept the new Software License Agreement. This is stored on a cookie on your system. If you clear the cookie you will be asked to re-accept this license agreement.

All the pages are now live with this updated wording clarifying the policy:

http://developers.sun.com/sunstudio/downloads/patches/ss12_patches.jsp
http://developers.sun.com/sunstudio/downloads/patches/ss11_patches.html
http://developers.sun.com/sunstudio/downloads/patches/ss10_patches.html
http://developers.sun.com/sunstudio/downloads/patches/ss9_patches.html
http://developers.sun.com/sunstudio/downloads/patches/ss8_patches.html
http://developers.sun.com/sunstudio/downloads/patches/s1s8cc_patches.html
http://developers.sun.com/sunstudio/downloads/patches/s1s7ee_patches.html
http://developers.sun.com/sunstudio/downloads/patches/s1s7cc_patches.html
http://developers.sun.com/sunstudio/downloads/patches/fd6u2_patches.html
http://developers.sun.com/sunstudio/downloads/patches/fd6u1_patches.html
http://developers.sun.com/sunstudio/downloads/patches/fd6_patches.html
http://developers.sun.com/sunstudio/downloads/patches/sw5_patches.html

Sun Studio's dmake utility can accelerate complex application builds by building components in parallel. Learn how to configure a distributed build environment and get guidelines on makefile customization. This new article on the Sun Studio Developer Portal explains this in easy steps.
As a point of reference, when we turned this loose on Solaris (in the Solaris 9 timeframe), on a 4-CPU machine, it accelerated build times by roughly 3.6x (reducing ON builds from approximately 12 hours to a little over 3 hours). Those numbers: 12 hours down to 3-ish hours, tell the real story of a direct benefit to developers and integrators, not just to buildmasters or release engineers.
Dmake is also the default for builds in the project system that the Sun Studio IDE uses, so you get this benefit without having to think about it.
In my previous post, I showed how you can run the NB-bundled sample PHP application, AirAlliance. When you are developing PHP applications in Solaris/OpenSolaris, you can use DTrace to debug your applications.

I have written a short write-up explaining how you can trace the AirAlliance sample application using DTrace in OpenSolaris 2008.05. But the information is applicable to any PHP application you run on Solaris/OpenSolaris.

Read on.


Q: What are the concerns/license restrictions around Sun Studio Runtime libraries, modules, etc. I remember that in previous releases, we were allowed to use libraries in 3rd party code; now that its free, are we still allowed to do that?
Answer: Yes, this hasnt changed. The list of objects/modules/libraries that users generally require or request to have such permission for, has been modified (mostly added to), over the years, but the license is essentially the same.For more information and details and a list of which objects are included in this, here this RunTime Libraries Licensing Agreeement.
Hint: we try to make this as convenient as possible for others to use our software. Our SW at this stage is not fully  and freely redistributable, but >99% of it is. In particular, the IPS packages that are part of OpenSolaris 2008.05 release (go to package manager and type in sunstudioexpress in search) is now fully redistributable.

The final specifications for the new version of OpenMP (version 3.0) have now been published and uploaded to the official OpenMP site (here)
The draft was open to review from October through January; the completed version is now official.

What is OpenMP?
The OpenMP Application Program Interface (API) supports multi-platform shared-memory parallel programming in C/C++ and Fortran. OpenMP is a portable, scalable model with a simple and flexible interface for developing parallel applications on platforms from the desktop to the supercomputer. The core elements of OpenMP are the constructs for thread creation, work load distribution (work sharing), data environment management, thread synchronization, user level runtime routines and environment variables. These are expressed as directives in Fortran and as #pragmas in C and C++
This is a multivendor, multiple platform vendor-driven industry standard. Members include Sun, AMD, Intel, Cray, Fujitsu, HP, IBM, NEC, PGI and SGI as vendors (permanent members) and auxilliary members such as ASC/LLNL,  cOMPunity,  EPCC,  NASA, RWTH Aachen University.
You can get more info on OpenMP at this official site (here). You can also read a more detailed description at this Wikipedia site.
The first standard came out in October 1997; an update (v2.0) in 2000 (for Fortran) and 2002(for C, C++)  and a combined languages revision (v2.5) in 2005.
There is also a SPEC standard benchmark, called SPEC OMP, that represents typical industry application/usage of OpenMP. Sun has dominated SPEC submissions on the lower end of the scale (less 8,16 nodes).

Whats New in OpenMP3.0?
There are several new features in OMP 3.0. A short enumeration of these:
  • the concept of tasks has been added to the execution model
  • the memory model now covers the notion of atomicity of memory accesses.
  • the definition of an active parallel region has changed
  • changes in internal control variable (ICV)
  • new routines added to the OMP runtime library, including:  omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,  omp_get_active_level
Uses of OpenMP3.0
The OpenMP model (shared memory programming) is often debated vs the MPI (message passing interface) model (a distributed, cluster programming model), which is also a vendor-driven industry standard. Both are aspects of  the parallel programming model, which aim at extracting parallelism from an existing application. OpenMP is an incremental model that works at the high-level language level, whereas MPI is a low-level and difficult to use. This section in the Wikipedia has an interesting set of Pros and Cons contrasted between OMP and MPI. The MPI model grew in popularity in the past decade because clusters became easier to buy and assemble and the increasing power of the x86 single-node servers ensured that such clusters could be built cheaply and still deliver good performance. However, now with the multi-core revolution upon us, there is fresh interest in making each of these "nodes" parallelizable as well and so there is fresh interest in OpenMP.
Of course, time will tell, which paradigm, or any derivative of these will ultimately see large-scale adoption. In the meantime vendors are busy working to ensure that they have good, high performing OpenMP implementations that can be used to exploit the increasing number of cores in a single node.
Sun, of course, has been in this game from Day 1. We've had compilers that have supported every OMP standard, immediately after it came out (and no later than any other vendor).
The same will be true with OMP3.0; we are working on getting an implementation of this out very soon now.




Intel has now posted/hosted Sun/Intel Threading Building Blocks videos. Here they are:
  • Scott Smith of Intel speaks with Sun’s Deepankar Bairagi and Intel’s John McHugh about the announcement:
    •  http://www.youtube.com/watch?v=iA6yLLFlN_U
  • John McHugh sits down with Deepankar Bairagi to talk about the advantages of adding TBB to Sun Studio:
    •  http://www.youtube.com/watch?v=t4pNNljPvLs
  • Deepankar discusses the benefits of using TBB and shows how to access it from within Sun Studio.
    • http://www.youtube.com/watch?v=QWhHRlp2p2M
Looking good, Deep!