Probe Overview

From ATLAS 3.7.12 on, ATLAS's config routine was rewritten for greater modularity, with each config probe having its own driver and so on. For this discussion, we will refer to the machine doing the cross-compiliation as the frontend (abbreviated as FE), and the machine which ATLAS is being tuned for the backend (abbreviated as BE). Note that if you are not doing cross-compilation (the majority of the time) the front-end and back-end are the same machine.

Every type of probe has a frontend driver (occasionally, config may directly call the backend driver, if there is only one) which will itself call multiple backend drivers. For instance, the probe to compute the architecure runs on the frontend, and calls different backend drivers depending on the assembly dialect and operating system of the backend. The files for the frontend drivers are located in ATLAS/CONFIG/src, and the backend files are in ATLAS/CONFIG/src/backend, with all include files in ATLAS/CONFIG/include. All frontend probes use the file atlconf_misc.c (prototyped in atlconf_misc.h), which handles things like file I/O, issuing shell commands, etc. The current probes used by config are:

  1. OS Probe
    Purpose:
    Discover the Operating System being used
    Inputs:
    None
    Outputs:
    Enumerated type of OS
    FE files:
    probe_OS.c
    BE files:
    None (uname on BE)
  2. Assembly dialect probe
    Purpose:
    Discover what ATLAS assembly dialect works
    Inputs:
    OS enum (gives subdialect of assembler)
    Outputs:
    Enum of assembly dialect
    FE files:
    probe_asm.c,
    BE files:
    probe_this_asm.c - [probe_gas_parisc.S, probe_gas_ppc.S, probe_gas_sparc.S, probe_gas_x8632.S, probe_gas_x8664.S]
  3. Vector ISA extension probe - assembly
    Purpose:
    Discover which of supported vector ISA extensions work
    Inputs:
    enums for OS and assembly dialect
    Outputs:
    iflag = ( (1<<ISA0) | (1<<ISA1) | ... | (1<<ISAn) )
    FE files:
    probe_vec.c
    BE files:
    probe_svec.c - [probe_AltiVec.S, probe_SSE.S], probe_dvec.c - [probe_SSE2.S], probe_dSSE3.c -[probe_SSE3.S]
  4. Vector ISA extension probe - C: Write this later, using C-inline statements for platforms where we don't speak the assembly, but can still use peter's vector include file
  5. Architecture probe
    Purpose:
    Discover target architecure/machine
    Inputs:
    OS and assembly enums [force 64/32 bit usage]
    Outputs:
    enum of arch
    FE files:
    archinfo.c
    BE files:
    archinfo_x86.c, archinfo_linux.c, archinfo_freebsd.c, archinfo_aix.c, archinfo_irix.c, archinfo_sunos.c
    Notes:
    See Section 10.2 for more details.
  6. 64-bit probe
    Purpose:
    Discover if arch supports 64-bit pointers
    Inputs:
    OS, arch [user choice]
    Outputs:
    32 / 64
    files:
    Config directly calls archinfo
    Notes:
    : New policy: config assumes whatever compiler gives you w/o -m32 -m64, and user must throw special flag to append these to the line.
  7. Compiler probe
    Purpose:
    Find good compilers
    Inputs:
    OS, arch [,suggested compilers]
    Outputs:
    The following:
    1. F2CNAME, F2CINT, F2CSTRING enums
    2. Compilers and flags
    FE files
    : probe_comp.c probe_f2c.c probe_ccomp.c
    BE files
    : f2cname[F,C].[f,c], f2cint[F,C].[f,c], f2cstr[F,C].[f,c], ccomp interaction not yet done
    Note:
    This is complex, see Section 10.4 for details.
  8. Arch defaults probe
    Purpose:
    Discover arch defaults
    Inputs:
    OS, arch, compilers
    Outputs:
    Whether to use arch defs (INSTFLAGS in Make.inc
    files:
    ARCHS/Makefile
    invoke:
    Arch default setup is instigated by atlas_install.c.
    notes:
    May want to have it autobenchmark kernel, test against table of expected perf, to see if arch def are OK wt this compiler version.

Clint Whaley 2012-07-10