Actual source code: arch.c

  1: /*$Id: arch.c,v 1.44 2001/03/23 23:20:45 balay Exp $*/
 2:  #include petsc.h
 3:  #include petscsys.h

  5: /*@C
  6:      PetscGetArchType - Returns a standardized architecture type for the machine
  7:      that is executing this routine. 

  9:      Not Collective

 11:      Input Parameter:
 12: .    slen - length of string buffer

 14:      Output Parameter:
 15: .    str - string area to contain architecture name, should be at least 
 16:            10 characters long. Name is truncated if string is not long enough.

 18:      Level: developer

 20:      Concepts: machine type
 21:      Concepts: architecture

 23: @*/
 24: int PetscGetArchType(char str[],int slen)
 25: {

 29: #if defined(PETSC_ARCH_NAME)
 30:   PetscStrncpy(str,PETSC_ARCH_NAME,slen);
 31: #else
 32: #error "bmake/$PETSC_ARCH/petscconf.h is missing PETSC_ARCH_NAME"
 33: #endif
 34:   return(0);
 35: }