2: #include <petscsys.h> 4: /*@C 5: PetscGetArchType - Returns the $PETSC_ARCH that was used for this configuration of PETSc 7: Not Collective 9: Input Parameter: 10: . slen - length of string buffer 12: Output Parameter: 13: . str - string area to contain architecture name, should be at least 14: 10 characters long. Name is truncated if string is not long enough. 16: Level: developer 19: Fortran Version: 20: In Fortran this routine has the format 22: $ character*(10) str 23: $ call PetscGetArchType(str,ierr) 25: Notes: This name is arbitrary and need not correspond to the physical hardware or the software running on the system. 27: .seealso: PetscGetUserName(),PetscGetHostName() 28: @*/ 29: PetscErrorCode PetscGetArchType(char str[],size_t slen) 30: { 34: #if defined(PETSC_ARCH) 35: PetscStrncpy(str,PETSC_ARCH,slen-1); 36: str[slen-1] = 0; 37: #else 38: #error "$PETSC_ARCH/include/petscconf.h is missing PETSC_ARCH" 39: #endif 40: return(0); 41: }