Creating Plot Files Using SAC GraphicsThe source code for all the SAC graphics subroutines are in a compressed tar file in the sub-directory for Chapter 85.5 on Handbook CD #2. A Problem with Graphics Using SACSymptom: In the Sun Solaris 2 operating system, plot-output disk files would not get created. The program (focplt, in the focmec package) would continue to run as though everything was fine. If plotting to the screen was called for, that would work okay. Just no output plot disk file when the program exited. This would not always happen, and never happened if the user were superuser. The same result happened if one used SAC calls (such as wsac0) to create sac-format time-series files. These symptoms never occurred in sunos 4.x (Sun's older operating system), and the authors of SAC at LLNL had never heard of this problem before. Explanation: With the help of Mike Firpo at LLNL, an explanation was found. The subroutine in the SAC library used to open files is zopenc.c. It used the function "open" to open the file, but, according to Kernighan and Ritchie (p 173, second edition) the correct function when opening a new file or overwriting an existing one is "creat." Apparently, sunos is more forgiving than solaris 2 and/or different compilers or optimzation schemes were used. Solution: Libraries were corrected as of version 57a for SAC2000. This includes the old fortran-based library which I use for my programs (libsac.a.solaris) and the SAC2000 library (sac.a.57a.solaris, where the 57a is replaced for more recent versions). Arthur Snoke Department of Geological Sciences (0420) Virginia Polytechnic Institute and State University 4044 Derring Hall Blacksburg, VA 24061, USA Phone: 5402316028 Fax: 5402313386 email: snoke@vt.edu Webpage: http://www.geol.vt.edu /profs/jas.html This Page: http://www.vt.edu/outreach/vtso/focmec/sacfix.html Originally posted: 31 July 1998. Most recent update: 25 July 2002. |