[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] condor convention, i686 vs x86_64 architecture



On Wed, Feb 22, 2006 at 09:15:03AM -0600, Steven Timm wrote:
> On Wed, 22 Feb 2006, Alain EMPAIN wrote:
> 
> I just did the test now.  Turns out that on 64-bit SciLinux 3.0.5
> that the condor_status also shows up architecture X86_64 for a
> x86_64 architecture node.  so it goes with OS bit level, not scilinux 
> versiion.
> 

No, it goes by Condor version and uname output. 

When Condor starts up, it tries to figure out what arch it is running on.
It uses uname(2) and looks at the utsname.machine field. Since different
architectures give different answers for the "same" processor (ie i86pc, i386,
i686, etc) we translate it into a "condor" architecture definition, ie 
ia32 processors become INTEL, AMD x64_64 or Intel EM64T become X64_64, and
so on.

If we get an answer back from uname that we don't know what to do with, we
just report it. That's why older versions of Condor will say
'x64_64', and newer versions will say 'X64_64'

Here's the UNIX code, from 6.7 (AIX and HPUX take a different codepath so 
they're not below. Win32 calls GetSystemInfo and looks at the 
wProcessorArchitecture, basically the same way)


        // Get ARCH
        //mikeu: I modified this to also accept values from Globus' LDAP server
    if( !strcmp(machine, "alpha") ) {
        sprintf( tmp, "ALPHA" );
    }
    else if( !strcmp(machine, "i86pc") ) {
        sprintf( tmp, "INTEL" );
    }
    else if( !strcmp(machine, "i686") ) {
        sprintf( tmp, "INTEL" );
    }
    else if( !strcmp(machine, "i586") ) {
        sprintf( tmp, "INTEL" );
    }
    else if( !strcmp(machine, "i486") ) {
        sprintf( tmp, "INTEL" );
    }
    else if( !strcmp(machine, "i386") ) { //LDAP entry
        sprintf( tmp, "INTEL" );
    }
    else if( !strcmp(machine, "ia64") ) {
        sprintf( tmp, "IA64" );
    }
    else if( !strncmp( sysname, "IRIX", 4 ) ) {
        sprintf( tmp, "SGI" );
    }
    else if( !strcmp(machine, "mips") ) { //LDAP entry
        sprintf( tmp, "SGI" );
    }
    else if( !strcmp(machine, "sun4u") ) {
        sprintf( tmp, "SUN4u" );
    }
    else if( !strcmp(machine, "sun4m") ) {
        sprintf( tmp, "SUN4x" );
    }
    else if( !strcmp(machine, "sun4c") ) {
        sprintf( tmp, "SUN4x" );
    else if( !strcmp(machine, "sparc") ) { //LDAP entry
        sprintf( tmp, "SUN4x" );
    }
    else if( !strcmp(machine, "Power Macintosh") ) { //LDAP entry
        sprintf( tmp, "PPC" );
    }
    else {
            // Unknown, just use what uname gave:
        sprintf( tmp, machine );
    }

-Erik