Re: NCAR Graphics on 64 bit AMD Opteron (x86-64)

From: Mary Haley (haley@XXXXXX)
Date: Sun Feb 08 2004 - 09:19:16 MST

  • Next message: Wang Lizhi: "Where can I find the message "NCAR Graphics""

    >
    >
    > All,
    >
    > Any experience building/running NCAR Graphics 4.3.1 on AMD Opteron
    > systems?
    >
    > The architecture is x86-64, running RedHat Enterprise 3.0 WS for AMD64.
    >
    > After adding the x86-64 type to the config/ymake file, annd changing
    > the -L/usr/X11R6/lib to -L/usr/X11R6/lib64, I was able to build and
    > install NCAR Graphics, and much of it works (idt for example seems to
    > run fine)
    >
    > However, using ncargex to compile/run the example programs, the
    > executables all give a segmentation fault.

    Hi Pete,

    I don't have any experience on building on this kind of system, but
    from experience, I know that when the code core dumps in the "sybte"
    routine, that you need to use a different version of this routine.

    To do this, cd to $NCARG/common/src/libncarg_c. You will see three
    files, "gsbytes.c", "sbytes.f" and "gbytes.f". Currently, your build
    of NCAR Graphics is getting the "sbyte" and "gbyte" routine from the
    file "gsbytes.c". You want to instead get these two routines from
    "sbytes.f" and "gbytes.f".

    To force these two files to get built instead of "gsbytes.c", modify
    the "yMakefile" in that directory. You should see some lines that look
    like this:

    #elif defined(linux) && defined(ia64)
    EXCSRCS = bcopyswap.c logic32.c
    EXFSRCS = gbytes.f sbytes.f
    EXOBJS = sbytes.o gbytes.o bcopyswap.o logic32.o

    You can either duplicate these lines just below this section so you
    can make changes to the "elif" line, or you can change the "elif" line
    directly. Most likely this will involve changing "defined(ia64)" to
    whatever internal macro is defined on your system.

    When you think have it, save the file, and type (in the same directory):

        make me
        make clean all install
       
    (The "make me" forces a new "Makefile" to get generated). Watch the
    *.o files getting built to make sure that "gsbytes.o" doesn't get
    built, and that "sbytes.o" and "gbytes.o" do.

    Of course, you can cheat and edit "Makefile" directly to force the
    correct files to get built. Just be aware that if you move this code
    somewhere else and rerun "make Everything", then your modified
    Makefile will get clobbered by a new one.

    Once you get "sbytes.o" and "gbytes.o" built, you can try your ncargex
    example again. If it still doesn't work, then send me a personal email
    message.

    Cheers,

    --Mary

          
    > Output from gdb shows the fault is occuring in sbytes:
    >
    > (gdb) run
    > Starting program: /decaf1/ncargex/carfill
    >
    > Program received signal SIGSEGV, Segmentation fault.
    > sbyte_ (p=0x65f690, u=0x660560, q=0x7fbfff8200, b=0x6625b0) at gsbytes.c:131
    > 131 *t = ((*t >> qb) << qb) + (G1BYTE(*u, jq, qb));
    > (gdb) where
    > #0 sbyte_ (p=0x65f690, u=0x660560, q=0x7fbfff8200, b=0x6625b0) at gsbytes.c:131
    > #1 0x00000000004751ca in sbytes_ (p=0x65f690, u=0x660560, q=0x7fbfff8200, b=0x6625b0, s=0x476f04,
    > n=0x7fbfff824c) at gsbytes.c:80
    > #2 0x0000000000444069 in gmflod_ (list=0x660560, bits=0x6625b0, count=0x7fbfff8200, gkserr=0x67a788)
    > at gmflod.f:76
    > #3 0x0000000000443eef in ginlod_ (gkserr=0x67a788) at ginlod.f:64
    > #4 0x0000000000438a4a in gputni_ (opcl=0x65f690, opid=0x20, nbytes=0x7fbfff8200,
    > gkserr=0xfffffff90000001c) at gputni.f:70
    > #5 0x000000000043827f in g01wdr_ (wkid=0x67a788, metanm=0x2cff, __g77_length_metanm=256) at g01wdr.f:440
    > #6 0x0000000000435da5 in gztowk_ () at gztowk.f:48
    > #7 0x000000000043763d in gzopwk_ (wkid=0x476ee0, conid=0x476ee4, wtype=0x476ee0) at gzopwk.f:159
    > #8 0x00000000004306d6 in gopwk_ (wkid=0x65f690, conid=0x20, wtype=0x7fbfff8200) at gopwk.f:27
    > #9 0x0000000000403508 in MAIN__ () at carfill.f:57
    > #10 0x0000000000476d76 in main ()
    >
    >
    > I notice in gsbytes.c near the top, the code:
    >
    > #define MASK ( (unsigned) 0xffffffff)
    > #define SWORD 32 /* Word size in bits */
    > #define G1BYTE(p,q,b) ((unsigned) p << q >> (SWORD - b))
    >
    >
    > doesn't look like it's written for 64 bit systems, but aparently
    > that same code is used on sgi, ibm and alpha 64 bit compiles?
    >
    > Anyone have any experience with NCARG on Opteron systems, or any
    > ideas to try?
    >
    > Output from my 'make everything' can be seen at
    >
    > http://sysadm.aos.wisc.edu/~poker/ncarg-make-output.txt
    >
    > gcc version 3.2.3-24 (redhat)
    > glibc version glibc-2.3.2-95.6 (redhat)
    >
    > Thanks,
    >
    > Pete
    >
    >
    > --
    > +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+
    > ^ Pete Pokrandt V 1447 AOSS Bldg 1225 W Dayton St^
    > ^ Systems Programmer V Madison, WI 53706 ^
    > ^ V poker@aos.wisc.edu ^
    > ^ Dept of Atmos & Oceanic Sciences V (608) 262-3086 (Phone/voicemail) ^
    > ^ University of Wisconsin-Madison V 262-0166 (Fax) ^
    > +<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+
    >
    > _______________________________________________
    > ncarg-talk mailing list
    > ncarg-talk@ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
    >

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



    This archive was generated by hypermail 2b29 : Sun Feb 08 2004 - 09:25:26 MST