At the time of writing (April, 2001) there are three sets of Sun Workshop compilers available from and supported by ISD: those from Workshop 4.2, Workshop 5.0 and Workshop 6.0. These are all installed on Cosmos, though the latter has not yet been fully tested.
Forte Developer is Sun's new name for what would be Workshop 6. Forte includes C and C++ compilers, Fortran 77, 90 and 95 compilers, and the dbx debugger, as for previous versions of Workshop --- Forte also includes an Integrated Development Environment (IDE) and a GUI-development tool.
The simplest way to use Forte (for most people) is to execute the command
setup_forte6 |
Should you have trouble with the setup_forte6 command, or not wish to use it, then pre-pending
/software/workshop6/utils/SUNWspro/bin |
/software/workshop6/utils/SUNWspro/lib |
export PATH=/software/workshop6/utils/SUNWspro/bin:$PATH export LD_LIBRARY_PATH=/software/ ... /SUNWspro/lib:$LD_LIBRARY_PATH |
Since Forte has not yet been fully tested, we would welcome any feedback regarding successes as well as any problems.
To run the Fortran 77 and Fortran 90 Sun compilers on Cosmos simply type
f77 <source_file> |
f90 <source_file> |
Suppose we want to compile, link and run the following simple programme
PROGRAM hello IMPLICIT NONE PRINT *, "Hello world!" ENDwhich resides in hello.f90. Type
f90 hello.90 |
f90 -v hello.90 |
f90 -v hello.f90 ### f90: Note: LM_LICENSE_FILE = (null) ### f90: Note: NLSPATH = /software/SUNWspro/bin/ ... /software/SUNWspro/bin/../SC5.0/bin/f90comp -y-o -ytemp_f90.o ... ### f90: Note: LD_LIBRARY_PATH = /home/mpciish2/lib/kde_1.9/... ### f90: Note: LD_RUN_PATH = (null) ### f90: Note: LD_OPTIONS = (null) /usr/ccs/bin/ld -t -R/software/SUNWspro/lib:/opt/SUNWspro/lib -o a.out ... /SUNWspro/SC5.0/lib/crti.o /software/SUNWspro/SC5.0/lib/crt1.o ... rm temp_f90.oAn excutable binary called a.out will be produced (it is assigned the executable file attribute automatically). To run this simply type the file name:
a.out Hello world!The programme prints the string "Hello world!" to the screen. You may want to change the name of the executable produced by the compiler --- use the -o option:
f90 -o hellow hello.90 |
We have found significant problems with the 5.0 compilers: first, according to the Numerical Algorithms Group (NAg), their numerical library source code will not compile with this version of Sun Workshop (apparently due to compiler bugs) and so NAg have not released libraries suitable for linking to the 5.0 compilers; secondly there appear to be problems using the Fortran 5.0 compilers with dbx (the supplied debugger). For these reasons we still maintain the 4.2 compilers.
It is very easy to get confused over compiler versions. The simplest way to check which compiler you are using is the use the -V (upper-case) flag, for example:
f90 -V graph.f90 f90: Sun WorkShop 6 update 1 Fortran 95 6.1 2000/09/11 . . |
The man pages for the Workshop 4.2, 5.0 and 6.0 compilers are installed in
/software/SUNWspro_4.2/man /software/SUNWspro/man /software/workshop6/utils/SUNWspro/man |
The full documentation for the Sun Fortran compilers is available on-line at docs.sun.com:
The full paths for the Workshop 4.2 compilers are /software/SUNWspro_4.2/bin/f77 and /software/SUNWspro_4.2/bin/f90 so that, for example, one can type
/software/SUNWspro_4.2/bin/f90 <source_file> |
If you have problems with the 5.0 compilers we recommend tryingthe 4.2 compilers before contacting ISD.
As a rule, don't! All source code to be linked (whether statically or dynamically) should be compiled with the same compiler --- this is "more" true of Fortran 90 than Fortran 77 since data-structures can be more complex with the former.
...previous | up (conts) | next... |