Linux and Intel Compilers

From: Don Morton (Don.Morton AT XXXXXX)
Date: Fri Jul 09 2004 - 17:37:00 MDT

  • Next message: p yg: "How to transform from .ncgm file to flash?"

    Howdy, yesterday I sent out a request for help in
    using the new Intel C and Fortran compilers to
    compile NCAR Graphics (ultimately I'm trying to
    get MM5 and WRF to work with these compilers since
    they're much more accessible to students than
    Portland Group).

    Rick Grubin gave me a couple of pointers yesterday
    and I found some success, and he asked me to post
    my solutions. This is going to be kind of long
    because I'm going to talk about three things

    1) Installation of the Intel Fortran and C++ compilers
    2) Installation of the HDF4 libraries (not mandatory for
       NCAR graphics, but I figured I might as well include
       these).
    3) Installation of NCAR Graphics.

    Please keep in mind that I haven't fully tested things,
    and perhaps I'm even doing something wrong. I'm just
    an old fart computer science professor who knows enough
    to get into trouble, and sometimes enough to get stuff
    done :) Also, there might be some things I did that weren't
    absolutely necessary - you know how it is - sometimes we do
    so much trial and error that we start to lose track of what
    was important and what wasn't.

    OK, so my original platform is Linux Redhat 7.3

    1) Intel compilers - note that these are available for free from
       www.intel.com for non-commercial use (and I believe there may
       be some other restrictions, such as personal use only, etc.)

       I got Fortran version 8.0.034 and did a standard installation
       in /usr/local/intel_fc_80/

       The one change I made was in bin/ifort.cfg where I added the
       line

          -Xlinker -rpath -Xlinker /usr/local/intel_fc_80/lib

       because there were indications that dynamic libs weren't always
       being found at run-time.

       I also installed C++ version 8.0.055 and again, installing in
       /usr/local/intel_cc_80/

       Again, I added a line to bin/icc.cfg

            -Xlinker -rpath -Xlinker /usr/local/intel_cc_80/lib

    2) Installation of HDF version 4.2

        ./configure --prefix=/usr/local/HDF

        Set some environment variables (I use bash shell for root)

        export CC=icc
        export FC=ifort (maybe I set F77, so go ahead and set both)
        export LDFLAGS="-static"

        gmake 2> gmake.out Worked great
        gmake check 2> check.out Worked great
        gmake install This put everything in /usr/local/HDF
        directory
        
         
        Later on, when I was trying to install NCAR Graphics, I found that
        some functions were looking for HDF files in an hdf/ directory,
        for example, "hdf/hdf.h" So, to make this all work without
        modifying source code, I made a link in my /usr/include

           ln -s /usr/local/HDF/include /usr/include/hdf

         so essentially /usr/include/hdf points to /usr/local/HDF/include

    3) Finally, installation of NCAR Graphics - this was a lot of trial
    and error, but here's what worked in the final run

       Got version 4.3.1

         mkdir /usr/local/ncarg

         export NCARG=/var/tmp/ncarg-4.3.1

         untar in /var/tmp

         cd $NCARG

    Save config/LINUX as LINUX.ORIG
    Now, modify config/LINUX lines as follows:

    #define CCompiler icc
    #define FCompiler ifort
    #define CtoFLibraries "-L/usr/local/intel_fc_80/lib" -lifcore
    #define CcOptions -ansi -w
    #define FcOptions -cm -w

         ./Configure -v

    During configuration, accepted most defaults with the following
    exceptions

         Chose to use "ifort" as the Fortran compiler

         Added /usr/local/HDF/lib to lib paths, along with the default
         X11R6 path

         Added /usr/local/include to include paths, along with the
         default X11R6 path (remember, from HDF installation, that
         the programs requiring HDF will look in an hdf/ directory,
         and with a symbolic link, I have a directory
         /usr/local/include/hdf).

    So, then I did

         make Everything 2> make-output

    and this produced the binaries I needed (past experience suggests
    that "ictrans" is the binary that's most problematic, so if that
    one is created, you "might" be in good shape). I tested this
    out by using "idt" to view a gmeta file I'd produced with MM5
    and it worked fine. Granted, this is a weak test.

    Hopefully, this might help others, and I'm sure others would
    like to hear of any changes that folks make to the above
    procedures.

    Cheers,

    Don Morton

       

    --
    

    ************************************************************** Don Morton http://www.cs.umt.edu/~morton/ Department of Computer Science The University of Montana Missoula, MT 59812 | Voice (406) 243-4975 | Fax (406) 243-5139

    May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view. May your mountains rise into and above the clouds. -Edward Abbey, naturalist and author (1927-1989)

    _______________________________________________ ncarg-talk mailing list ncarg-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



    This archive was generated by hypermail 2b29 : Tue Jul 13 2004 - 08:23:40 MDT