New features added in Sunsort 4.08 ================================== Sort code profiling ------------------- This is for advanced users only, and is not enabled by default. To enable profiling, the user who installed sunsort must go to the sunsort directory and type: ./sort-install -P sunsort_lib sort-subs After that, any user may instrument a sort code for profiling by typing: makesort sort_code [any options] profile Note that profile may only be used instead of debug and check. After instrumentation, the sort code may be loaded and run as normal. In order to see the results, the sort code must be terminated gracefully, that is, it musn't crash or be killed by the KILL!! button in Sunsort. To terminate the sort code gracefully, go to the sunsort command line prompt and type: status Sunsort will respond with a status message which will include the line: sort process name = ./sunsort_proc: pid = , fds = , , where the values in angle brackets may change. At the sunsort command prompt type: kill -TERM where you replace with the value from the status line. This will terminate the sort code gracefully. To read the report, type the following at the sunsort command line, or in any terminal window which is in the same directory as the sort code: gprof sunsort_proc | less You may prefer to use `more' instead of `less', and if you've changed the sort proc filename you should change sunsort_proc in the example line to whatever name you have used. Interpreting the gprof output takes a little practice. Read the gprof manual page for more information. Note that profiling forces you into single process mode. Keyboard accelerators --------------------- The following keyboard accelerators have been added to the main Sunsort GUI to speed up commonly used operations: Mount Alt M Unmount Alt U Open Alt O Close Alt C Execute Alt E Read Alt R Popup Variables window Alt V Popup Tool window Alt T Popup Spectra window Alt S Popup Write window Alt W Makesort Alt A (Alt M had been taken) Loadsort Alt L Set sort media to Exabyte Shift Alt E Set sort media to Remote Shift Alt R Set sort media to Disk Shift Alt D Set sort media to Demon Shift Alt M (Shift Alt D and E had been taken) Set sort media to Pipe Shift Alt P Toggle tape rewind option Shift Alt W (Shift Alt R and E had been taken) Toggle tape hold option Shift Alt H Set stop to 0,1..9 records Alt 0..9 Increment stop Alt + Decrement stop Alt - Load windows Shift Alt L Stop sorting Esc Multi-process sorting --------------------- To speed things up on multi-processor machines, you can tell sunsort to run several copies of your sort code and to share the data blocks out between them. By default this is disabled. Be warned with multi-processing that your init and finish code will get run several times and out of order, that is processes may be sorting when your init and finish codes run, consequently, if you have non-trivial initialisation code (like you zero or recalculate a spectrum) then you should not use this code. Since each process runs in its own memory space you can initialise variables and arrays without worrying about interference between processes. Be warned however, that although each finish routine sees the spectrum data for all processes, data stored in local memory can only be accessed by the local process. Filtering data with multi-process code is OK, however events may emerge out of order in the output stream. To enable multi-process sorting, use the processes command at the sunsort command line. Type processes to see the current status, and processes followed by a number to set the number of processes to use. Typing processes 1 disables multi-process sorting typing processes 0 sets the number of processes equal to the number of processors on the machine. Note that if you run sunsort on a single processor machine, it will ignore this setting and always use the single processor version of the code. To get the multi-process code working I've had to use a number of sophistcated techniques. Fingers crossed if things go wrong it should fall back to single process code. Manual completely written in HTML --------------------------------- The Sunsort manual has now been completely rewritten in HTML. This will be the only copy kept up to date. The manual has all the information from the old manuals and has been significantly expanded. However, I didn't have time to finish all the sections. Volunteers are requested to complete the job. Cross references between sections are also not complete. The manual is distributed with Sunsort in the man/manual directory. Start with the file index.html. It's also available on the web at http://npg.dl.ac.uk/Charissa/documents/CODES/sunsort/man/