PETSC_DIR as a symlink

Jed Brown jed at 59A2.org
Thu Nov 26 03:33:02 CST 2009


I was recently building PETSc on a system where /home is a slow NFS
mount so of course I wanted to build on /scratch.  However, since I want
other nodes to use it, PETSC_DIR should really be in /home.  My initial
thought was to symlink from /home to /scratch, then move the directory
after compilation of several configurations.  This does not work due to
os.path.isdir returning false for symlinks to directories, and the use
of os.path.realpath to confirm that PETSC_DIR is the current directory.

Would it be reasonable to relax these checks to merely confirm that
PETSC_DIR *points* to the current directory, or will that cause more
confusion than it's worth?  I wouldn't expect people to set up such
symlinks unless they knew the score.

Jed



More information about the petsc-dev mailing list