ARSC HPC Users' Newsletter 226, August 17, 2001
Chilkoot Programming Environment Upgrade to PE 22.214.171.124
On August 29, we will switch the default programming environment on chilkoot to PE126.96.36.199.
This environment is available now as PrgEnv.new, and we encourage chilkoot users to test their codes with it prior to the upgrade. Please let us know if you see any changes in performance, or detect any problems.
To compile with PE188.8.131.52, execute this command:
module switch PrgEnv PrgEnv.new
Note that the PE3.5 compilers make the best use of the SV1e processors when you set your "TARGET" environment variable to "cray-sv1". To do so, execute the following:
# csh users: setenv TARGET cray-sv1 # ksh users: export TARGET=cray-sv1
(You might put the appropriate command in your .cshrc or .profile file.)
The current default programming environment, PE 3.4, will remain available after this upgrade.
Meet ARSC Oceanographic Specialist, Kate Hedstrom, PhD
[ We're happy to welcome Kate Hedstrom to ARSC User Services. She's been in Fairbanks for about a month now, and will help ARSC provide a new level of support and collaboration to our users running ocean models.
Thanks to Kate for the following bio... ]
I have been working with Dale Haidvogel since 1988, first while working at the Institute for Naval Oceanography in Mississippi and later while at Rutgers. In that time, I worked with various ocean and sea ice models, wrote the SPEM and SCRUM user manuals, and became the local expert on grid generation, both for the finite difference and finite element ocean models. I first used the ARSC computers to run a coupled ice-ocean model of the Arctic on the Y-MP (denali) when it was new.
In the early days, we ran the model on everything from Cray COS to VMS. Since then, we have narrowed our focus to Unix. Although we had a CM-Fortran version of the model, the current version (ROMS) has been finely tuned to run well on an SGI Origin and other shared memory systems.
There are two current efforts to port ROMS to MPI, one of which is based on the NOAA Scalable Modeling System, or SMS, library. (See Newsletter #219, /arsc/support/news/hpcnews/hpcnews219/index.xml for more on SMS.) The SMS effort is being done by the FSL NOAA lab in support of Al Hermann's work. I have recently obtained that version of ROMS to run on the ARSC computers.
My current project is called SALMON I and is an ocean circulation model of Prince William Sound and some of the surrounding ocean. The work is being done in collaboration with Dave Musgrave and others over in the Institute of Marine Science at UAF. We hope to have an initial configuration running fairly soon, with plans to add higher-resolution nested grids, biology, real-time atmospheric forcing, and data assimilation in the future. SALMON II will cover Cook Inlet where things can freeze up in the winter, requiring yet another sea ice model.
Perfview Back on SV1
Profiling tools are critical for determining the most heavily used routines or loops in your code, and thus focusing your optimization efforts.
For a while now, profview has been the only tool available on the SV1, but in a new release of craytools, our old favorites are back...
To use perfview on chilkoot you need to compile with the PE 184.108.40.206 compilers, and use perftrace from craytools.220.127.116.11. Assuming you're using the default PrgEnv, here are the steps:
Load PE 18.104.22.168
module switch PrgEnv PrgEnv.new
Compile your program for perftracing
Fortran: f90 -ef -lperf -o prog prog.f C: cc -F -lperf -o prog prog.f
Run the executable (which will produce a perf.data file)
module unload craytools_archive module switch craytools.22.214.171.124 craytools.126.96.36.199
Following the programming environment upgrade noted earlier, you will be able to skip step 1.
If you haven't used it, perfview is a nice tool. Among the things it will do for you:
For every subroutine, present the same statistics that "hpm" presents when run against your entire program.
Thus, for instance, you can compare the MFLOPS and Cache Hit rates for different subroutines (or use the data to test different versions of a subroutine).
Show the percentage of total CPU time consumed by each subroutine, so you can identify hot-spots and bottlenecks.
Tell you how many times each subroutine was called, the average time per call, and provide advice concerning inlining.
Let you instrument your code to obtain statistics for any code segment... for instance, for a particular loop within a subroutine.
Quick-Tip Q & A
A:[[ I am rather upset, so please be nice. [[ [[ My Fortran program has variable called "sec", and I need to find [[ wherever I subtract it. The coding is not always consistent, so [[ these statements can take various forms, like: [[ [[ dtime=tstart-sec [[ dtime = tstart - sec [[ [[ I figured I'd be clever, so I tried egrep, but it didn't work. So [[ I tried grep, and got the same weird output! It's a total miss: [[ [[ morty$ egrep "-sec - sec - sec" littleprog.F tail [[ count(4) = 1 [[ write(*,*) 'parameters for ncvgtg call' [[ write(*,*) 'ncid ',ncid [[ write(*,*) 'sec: ',sec [[ write(*,*) 'Calling ncvgtg' [[ call ncvgt(ncid,dataid,start,count,data,error) [[ write(*,*) 'Finished calling ncvgtg' [[ call ncclos(ncid,error) [[ close(1) [[ close(7) [[ morty$ grep "-sec" littleprog.F tail [[ count(4) = 1 [[ write(*,*) 'parameters for ncvgtg call' [[ write(*,*) 'ncid ',ncid [[ write(*,*) 'sec: ',sec [[ write(*,*) 'Calling ncvgtg' [[ call ncvgt(ncid,dataid,start,count,data,error) [[ write(*,*) 'Finished calling ncvgtg' [[ call ncclos(ncid,error) [[ close(1) [[ close(7) [[ [[ So my question is: WHAT HAVE YOU CHANGED ON YOUR SYSTEM! (or... [[ ahem, am I doing something wrong?) Guess I stumped everyone with this one: Though quoted, "-sec", appears to grep and egrep as a command line option, as if you had typed: morty$ grep -sec littleprog.F tail And, by coincidence, "-sec" forms a legal set of options, so grep doesn't report an error. From "man grep": -s Suppress the error messages ordinarily written for non-existent or unreadable files. Other error messages will not be suppressed. -e pattern_list Specify one or more patterns to be used during the search for input. [...cut...] The command is searching for the pattern "c" in littleprog.F. Examining the above grep output, you'll indeed find a "c" on every line. Here's the real question: ------------------------- When the argument to a Unix command begins with a hyphen, how can you pass it to the command? One answer is that most Unix commands have the undocumented option, "--", which signifies the end of all the options. Thus, here's one solution: morty$ egrep -- "-sec - sec - sec" littleprog.F morty$ grep -- "-sec" littleprog.F A second solution is to escape the hyphen: morty$ egrep "\-sec - sec - sec" littleprog.F morty$ grep "\-sec" littleprog.F This was similar to our very first Quick-Tip, "How do you remove a file named -i"? See: /arsc/support/news/t3dnews/t3dnews102/index.xml Q: My favorite web site uses html frames. Can I capture the URL of a frame, so I can send it to someone? Or do I have to recite every link I follow?
[[ Answers, Questions, and Tips Graciously Accepted ]]
Ed Kornkven ARSC HPC Specialist ph: 907-450-8669 Kate Hedstrom ARSC Oceanographic Specialist ph: 907-450-8678 Arctic Region Supercomputing Center University of Alaska Fairbanks PO Box 756020 Fairbanks AK 99775-6020
Subscribe to (or unsubscribe from) the e-mail edition of the
ARSC HPC Users' Newsletter.
Back issues of the ASCII e-mail edition of the ARSC T3D/T3E/HPC Users' Newsletter are available by request. Please contact the editors.