1 #define PETSC_DLL 2 3 #include "petscsys.h" /*I "petscsys.h" I*/ 4 5 #undef __FUNCT__ 6 #define __FUNCT__ "PetscGetArchType" 7 /*@C 8 PetscGetArchType - Returns a standardized architecture type for the machine 9 that is executing this routine. 10 11 Not Collective 12 13 Input Parameter: 14 . slen - length of string buffer 15 16 Output Parameter: 17 . str - string area to contain architecture name, should be at least 18 10 characters long. Name is truncated if string is not long enough. 19 20 Level: developer 21 22 Concepts: machine type 23 Concepts: architecture 24 25 @*/ 26 PetscErrorCode PETSCSYS_DLLEXPORT PetscGetArchType(char str[],size_t slen) 27 { 28 PetscErrorCode ierr; 29 30 PetscFunctionBegin; 31 #if defined(PETSC_ARCH) 32 ierr = PetscStrncpy(str,PETSC_ARCH,slen-1);CHKERRQ(ierr); 33 str[slen-1] = 0; 34 #else 35 #error "$PETSC_ARCH/include/petscconf.h is missing PETSC_ARCH" 36 #endif 37 PetscFunctionReturn(0); 38 } 39 40