[GE users] Code review: fix for "Compilation on 64bit Linux PPC"

Ron Chen ron_chen_123 at yahoo.com
Fri Mar 10 07:07:56 GMT 2006


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

On 64-bit PPC Linux, some gcc versions by default generate
32-bit code, while some by default generate 64-bit code (!!), I
need to force gcc to compile SGE as 32-bit.

I tested the fix and it works fine. Can someone review the code?

Index: aimk
===================================================================
RCS file: /cvs/gridengine/source/aimk,v
retrieving revision 1.220
diff -C4 -r1.220 aimk
*** aimk        7 Nov 2005 07:42:41 -0000       1.220
--- aimk        10 Mar 2006 07:03:39 -0000
***************
*** 1376,1383 ****
--- 1376,1387 ----
        endif
        set LIBS = "$LIBS"
     endif

+    if ($BUILDARCH == LINUXPPC) then
+       set CFLAGS = "-m32 $CFLAGS"
+    endif
+
     if ($DEBUGGED == 1) then
        set DEBUG_FLAG = "-g $INSURE_FLAG -DSGE_LOCK_DEBUG"
        set OFLAG = ""
     endif

 -Ron


--- Ron Chen <ron_chen_123 at yahoo.com> wrote:
> So, which of the 2 ways did you use?
> 
> BTW, I didn't know that gcc on 64-bit Linux PPC by default
> generates 64-bit code! I think I will need to check in some
> changes into the project cvs so that other PPC Linux users can
> get it working without patching or headaches!!!
> 
>  -Ron
> 
> 
> --- Brady Catherman <bradyc at uidaho.edu> wrote:
> > If you are ever in the middle of nowhere (Moscow, ID) stop
> by!
> > I will  
> > buy you a beer =)
> > 
> > That seems to have worked great! I will know much better
> when
> > the  
> > rest of the system gets up and running though. All the SGE
> > tools work  
> > great on the head node!
> > 
> > 
> > 
> > On Jan 30, 2006, at 10:32 AM, Ron Chen wrote:
> > 
> > > Yup, this is the problem.
> > >
> > > If you compile SGE on LinuxPPC as 64-bit, then you will
> need
> > to
> > > change aimk:
> > >
> > > case "lx26-ppc":
> > >    set BUILDARCH = LINUXPPC
> > >    set COMPILE_ARCH = LINUXPPC_26
> > >    set TARGET_BITS = TARGET_32BIT
> > >
> > > Set "TARGET_BITS" to TARGET_64BIT
> > >
> > > Or, you can add -m32 to force gcc to generate 32-bit
> > binaries.
> > >
> > >  -Ron
> > >
> > >
> > > --- Brady Catherman <bradyc at uidaho.edu> wrote:
> > >> file sge_qmaster
> > >> sge_qmaster: ELF 64-bit MSB executable, cisco 7500,
> version
> > 1
> > >> (SYSV),
> > >> for GNU/Linux 2.4.19, dynamically linked (uses shared
> > libs),
> > >> for GNU/
> > >> Linux 2.4.19, stripped
> > >>
> > >> uname -a
> > >> Linux io01.bw01.ibest.uidaho.edu 2.6.14-gentoo-r7 #7 SMP
> > Fri
> > >> Jan 20
> > >> 09:07:19 PST 2006 ppc64 PPC970FX, altivec supported
> > RackMac3,1
> > >> GNU/Linux
> > >>
> > >> I can't compile using ./aimk -32 though because it claims
> > that
> > >> -32
> > >> isn't supported with lx26-ppc.
> > >>
> > >> Any thoughts?
> > >>
> > >>
> > >>
> > >>
> > >> On Jan 30, 2006, at 8:50 AM, Rayson Ho wrote:
> > >>
> > >>> Did you compile SGE as 64-bit?? Can you find out whether
> > SGE
> > >> is
> > >>> compiled as 32-bit or 64-bit:
> > >>>
> > >>> % file <path>/sge_qmaster
> > >>>
> > >>> I used to get it working on a 64-bit PPC Linux machine
> > with
> > >> 32-bit SGE
> > >>> binaries...
> > >>>
> > >>> Rayson
> > >>>
> > >>>
> > >>>
> > >>> On 1/30/06, Brady Catherman <bradyc at uidaho.edu> wrote:
> > >>>>
> > >>>> Thats why I am asking about compilation. This is the
> same
> > >> install on
> > >>>> the same box. The scheduler can not talk to the qmaster
> > >> when started
> > >>>> using the install_qmaster script.
> > >>>>
> > >>>> Does anybody have SGE working on a full 64 bit version
> of
> > >> PPC linux?
> > >>>> If so, what where your exact compile options in order
> to
> > >> get it
> > >>>> installed? Was any tweaking necessary? And what version
> > are
> > >> you
> > >>>> running?
> > >>>>
> > >>>> I am about to try 6.0u6 again just to see if I can get
> it
> > >> working..
> > >>>>
> > >>>>
> > >>>> On Jan 30, 2006, at 12:20 AM, Stephan Grell - Sun
> Germany
> > -
> > >> SSG -
> > >>>> Software Engineer wrote:
> > >>>>
> > >>>>> Hi,
> > >>>>>
> > >>>>> the messages mean,that you have mixed different SGE
> > >> versions or
> > >>>>> something
> > >>>>> went wrong during the compilation. the "cull version"
> > >> needs to be
> > >>>>> the same
> > >>>>> amoung all clients.
> > >>>>>
> > >>>>> It looks as if the master is a u7 and the scheduler
> > >> something else.
> > >>>>>
> > >>>>> Cheers,
> > >>>>> Stephan
> > >>>>>
> > >>>>> Brady Catherman wrote On 01/29/06 22:47,:
> > >>>>>
> > >>>>>> After compiling grid engine on a Linux PPC system
> with
> > >> 64bit
> > >>>>>> kernel/
> > >>>>>> libraries I can't seem to get anything to talk to the
> > >> qmaster.. The
> > >>>>>> only errors that are spit out are:
> > >>>>>>
> > >>>>>> 01/29/2006 13:47:21|qmaster|io01|E|wrong cull
> version,
> > >> read
> > >>>>>> 0x00000000, but expected actual version 0x10020000
> > >>>>>> 01/29/2006 13:47:21|qmaster|io01|E|error unpacking
> gdi
> > >> request:
> > >>>>>> wrong
> > >>>>>> cull version
> > >>>>>> 01/29/2006 13:48:25|qmaster|io01|E|wrong cull
> version,
> > >> read
> > >>>>>> 0x00000000, but expected actual version 0x10020000
> > >>>>>> 01/29/2006 13:48:25|qmaster|io01|E|error unpacking
> gdi
> > >> request:
> > >>>>>> wrong
> > >>>>>> cull version
> > >>>>>> 01/29/2006 13:49:29|qmaster|io01|E|wrong cull
> version,
> > >> read
> > >>>>>> 0x00000000, but expected actual version 0x10020000
> > >>>>>> 01/29/2006 13:49:29|qmaster|io01|E|error unpacking
> gdi
> > >> request:
> > >>>>>> wrong
> > >>>>>> cull version
> > >>>>>> 01/29/2006 13:50:33|qmaster|io01|E|wrong cull
> version,
> > >> read
> > >>>>>> 0x00000000, but expected actual version 0x10020000
> > >>>>>> 01/29/2006 13:50:33|qmaster|io01|E|error unpacking
> gdi
> > >> request:
> > >>>>>> wrong
> > >>>>>> cull version
> > >>>>>> 01/29/2006 13:51:39|qmaster|io01|E|wrong cull
> version,
> > >> read
> > >>>>>> 0x00000000, but expected actual version 0x10020000
> > >>>>>> 01/29/2006 13:51:39|qmaster|io01|E|error unpacking
> gdi
> > >> request:
> > >>>>>> wrong
> > >>>>>> cull version
> > >>>>>>
> > >>>>>> Anybody got any clue what could be causing this?
> > >>>>>>
> > >>>>>>
> > >>
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list