Actual source code: arch.c
1: #define PETSC_DLL
3: #include petsc.h
4: #include petscsys.h
8: /*@C
9: PetscGetArchType - Returns a standardized architecture type for the machine
10: that is executing this routine.
12: Not Collective
14: Input Parameter:
15: . slen - length of string buffer
17: Output Parameter:
18: . str - string area to contain architecture name, should be at least
19: 10 characters long. Name is truncated if string is not long enough.
21: Level: developer
23: Concepts: machine type
24: Concepts: architecture
26: @*/
27: PetscErrorCode PETSC_DLLEXPORT PetscGetArchType(char str[],size_t slen)
28: {
32: #if defined(PETSC_ARCH_NAME)
33: PetscStrncpy(str,PETSC_ARCH_NAME,slen-1);
34: str[slen-1] = 0;
35: #else
36: #error "bmake/$PETSC_ARCH/petscconf.h is missing PETSC_ARCH_NAME"
37: #endif
38: return(0);
39: }