1 
2 #include <petscsys.h>         /*I  "petscsys.h"  I*/
3 
4 /*@C
5      PetscGetArchType - Returns the $PETSC_ARCH that was used for this configuration of PETSc
6 
7      Not Collective
8 
9      Input Parameter:
10 .    slen - length of string buffer
11 
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.
15 
16      Level: developer
17 
18 
19    Fortran Version:
20    In Fortran this routine has the format
21 
22 $       character*(10) str
23 $       call PetscGetArchType(str,ierr)
24 
25    Notes:
26     This name is arbitrary and need not correspond to the physical hardware or the software running on the system.
27 
28 .seealso: PetscGetUserName(),PetscGetHostName()
29 @*/
PetscGetArchType(char str[],size_t slen)30 PetscErrorCode  PetscGetArchType(char str[],size_t slen)
31 {
32   PetscErrorCode ierr;
33 
34   PetscFunctionBegin;
35 #if defined(PETSC_ARCH)
36   ierr = PetscStrncpy(str,PETSC_ARCH,slen-1);CHKERRQ(ierr);
37   str[slen-1] = 0;
38 #else
39 #error "$PETSC_ARCH/include/petscconf.h is missing PETSC_ARCH"
40 #endif
41   PetscFunctionReturn(0);
42 }
43 
44