2: #include <petscsys.h> 4: /*@C 5: PetscGetArchType - Returns a standardized architecture type for the machine 6: that is executing this routine. 8: Not Collective 10: Input Parameter: 11: . slen - length of string buffer 13: Output Parameter: 14: . str - string area to contain architecture name, should be at least 15: 10 characters long. Name is truncated if string is not long enough. 17: Level: developer 19: Concepts: machine type 20: Concepts: architecture 22: Fortran Version: 23: In Fortran this routine has the format 25: $ character*(10) str 26: $ call PetscGetArchType(str,ierr) 28: .seealso: PetscGetUserName(),PetscGetHostName() 29: @*/ 30: PetscErrorCode PetscGetArchType(char str[],size_t slen) 31: { 35: #if defined(PETSC_ARCH) 36: PetscStrncpy(str,PETSC_ARCH,slen-1); 38: str[slen-1] = 0; 39: #else 40: #error "$PETSC_ARCH/include/petscconf.h is missing PETSC_ARCH" 41: #endif 42: return(0); 43: }