Actual source code: arch.c
2: #include <petscsys.h> /*I "petscsys.h" I*/
6: /*@C
7: PetscGetArchType - Returns a standardized architecture type for the machine
8: that is executing this routine.
10: Not Collective
12: Input Parameter:
13: . slen - length of string buffer
15: Output Parameter:
16: . str - string area to contain architecture name, should be at least
17: 10 characters long. Name is truncated if string is not long enough.
19: Level: developer
21: Concepts: machine type
22: Concepts: architecture
24: @*/
25: PetscErrorCode PetscGetArchType(char str[],size_t slen)
26: {
30: #if defined(PETSC_ARCH)
31: PetscStrncpy(str,PETSC_ARCH,slen-1);
32: str[slen-1] = 0;
33: #else
34: #error "$PETSC_ARCH/include/petscconf.h is missing PETSC_ARCH"
35: #endif
36: return(0);
37: }