[petsc-users] how is PETSC_MAX_PATH_LEN defined?

Satish Balay balay at mcs.anl.gov
Thu Mar 1 16:14:35 CST 2012


from include/petscsys.h

>>>>>>>>>
#if defined(PETSC_HAVE_LIMITS_H)
#include <limits.h>
#endif
#if defined(PETSC_HAVE_SYS_PARAM_H)
#include <sys/param.h>
#endif
#if defined(PETSC_HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif
#if defined(MAXPATHLEN)
#  define PETSC_MAX_PATH_LEN     MAXPATHLEN
#elif defined(MAX_PATH)
#  define PETSC_MAX_PATH_LEN     MAX_PATH
#elif defined(_MAX_PATH)
#  define PETSC_MAX_PATH_LEN     _MAX_PATH
#else
#  define PETSC_MAX_PATH_LEN     4096
#endif
<<<<<<<<<<<

So usually the value is picked up from system include files via
MAXPATHLEN etc - and if no value is found - it it set as 4096.

Satish

On Thu, 1 Mar 2012, Ju LIU wrote:

> Hi:
> 
> I am reading
> http://www.mcs.anl.gov/petsc/petsc-current/src/mat/examples/tutorials/ex9.c.html
> 
> I am curious about the value of PETSC_MAX_PATH_LEN.
> 
> Thanks,
> 
> Ju
> 



More information about the petsc-users mailing list