This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Craig Motell <address@hidden> >Organization: University of Hawaii >Keywords: 199903100258.TAA26142 McIDAS-X Craig, >I'm trying to say hello world, so naturally I use the program: > >sapo% more hello.f > subroutine main0 > call sdest('hello world',0) > call mccodeset(0) > return > end > >In order for me to compile this program I must use the flag "vendor" as >follows: > >sapo% mccomp -c -vendor -I/export/sapo2/mcidas/inc hello.f >f77 -c -O hello.f >hello.f: > main0: > >I found this flag in the mccomp scrip. If I don't use this flag I get >message: > >sapo% mccomp -c -I/export/sapo2/mcidas/inc hello.f >fc -c -O hello.f >/usr/bin/fc[8]: fc: bad option(s) Right. What is going on is: we are adding support to the build structure for use of gcc/f2c while keeping support for vendor supplied compilers (cc/f77). In order to do this, we put in a COMPILERS macro in 'makefile' the default of which is ' ' (blank). SSEC wants to move to support of gcc/f2c for all platforms so that is why the default will be non-vendor. If one uses the vendor-supplied compilers, then s/he has to set the COMPILERS macro in 'makefile' to be -vendor. Additionally, to run 'mccomp' by hand, one has to include the -vendor flag on the command line. >Your mccomp script is complicated for me. Me too! >I don't know if the problem is that is looking for the compiler in: > /opt/SUNWspro/bin/f77 > >or some other problem. Actually, it was looking for a routine (inappropriately) named 'fc' which is a shell script that will run a gcc/f2c combination and make it look like a Fortran compiler. By specifying the -vendor flag to mccomp, you are telling it to not use 'fc' as the "Fortran" compiler. Aside: the name 'fc' was really unfortunate (I got this from SSEC) since there is a shell routine named 'fc' already (at least on Solaris). In the 7.5 distribution, we include the 'fc' script in McIDAS as mcfc. This gets away from the unfortunate name clash. >Questions: >1) Do I need to see up something special for Solaris 2.6, like > point to where my fortran compiler is? You need to specify the -vendor flag to mccomp. Of course, your session needs to be able to find the vendor-supplied C and Fortran comilers, but that would be done through your PATH. >2) Is it ok to use vendor compiler or should I use gnu's compiler, etc? Vendor-supplied compilers are AOK. The movement toward support of gcc/f2c was to standardize on a compilation environment across platforms. This makes testing easier (for SSEC mainly) and eliminates the need to purchase compilers from vendors. >Thankyou, Later... Tom