[petsc-dev] Configure --with-X-dir= Using Relative Path

Jacob Faibussowitsch jacob.fai at gmail.com
Sun Aug 2 13:57:30 CDT 2020

Hello All,

I am reconfiguring an arch within a docker using the attached reconfigure script. My petsc dir is mounted via the following commands to docker -v ${PETSC_DIR}:/petsc:delegated. I am trying to use the existing arches on my native machine as the install directories for packages compiled within the docker images because SSH keys aren’t persistent in the images and hence git pull’s won’t work. I encountered this odd bug when trying —with-zlib-dir where it prepends the existing $PETSC_DIR to the directory name automatically, but this problem persists for any package. 

There is no configure.log generated since this I guess is early enough in the configure process, so unfortunately the only error output is the wall of error text from terminal. The error indicates that configure is passing ./[COMMAND LINE DIRECTORY] instead of [COMMAND LINE DIRECTORY] to configure.

$ ls ${PETSC_DIR}/master-arch-darwin-c-debug/externalpackages/
Permissions Size User Date Modified Name
drwxrwxr-x    - root  8 Jul 16:07    petsc-pkg-mumps-d1a5c931b762
drwxr-xr-x     - root  3 Jul 21:39    hdf5-1.12.0
drwxrwxr-x    - root  1 Aug 21:34  netcdf-c-4.5.0
drwxr-xr-x     - root  3 Jul 21:38    zlib-1.2.11
drwxr-xr-x     - root 29 Jul 17:43   mpich-3.3.2
drwxr-xr-x     - root  6 Jul 17:06    Chaco-2.2-p2
drwxr-xr-x     - root  1 Aug 21:36  git.ctetgen
drwxr-xr-x     - root  1 Aug 21:34  git.exodusii
drwxr-xr-x     - root  1 Aug 21:31  git.med
drwxr-xr-x     - root  1 Aug 21:31  git.metis
drwxr-xr-x     - root  1 Aug 21:31  git.parmetis
drwxr-xr-x     - root  1 Aug 21:32  git.pnetcdf
drwxr-xr-x     - root  1 Aug 21:35  git.scalapack
drwxr-xr-x     - root  1 Aug 21:31  git.sowing
drwxr-xr-x     - root  1 Aug 21:34  git.triangle

$ echo $PETSC_DIR

             Configuring PETSc to compile on your system                       
    TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT while running ./configure 
Nonexistent directory: /petsc/${PETSC_DIR}/master-arch-darwin-c-debug/externalpackages/zlib-1.2.11 for key with-zlib-dir

  File "/petsc/config/configure.py", line 449, in petsc_configure
    framework = config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:], loadArgDB = 0)
  File "/petsc/config/BuildSystem/config/framework.py", line 107, in __init__
  File "/petsc/config/BuildSystem/config/framework.py", line 324, in createChildren
  File "/petsc/config/BuildSystem/config/framework.py", line 309, in getChild
  File "/petsc/config/PETSc/Configure.py", line 91, in setupDependencies
    obj = self.registerPythonFile(package,'config.packages')
  File "/petsc/config/PETSc/Configure.py", line 49, in registerPythonFile
    utilityObj                             = self.framework.require(directory+utilityName, self)
  File "/petsc/config/BuildSystem/config/framework.py", line 329, in require
    config = self.getChild(moduleName, keywordArgs)
  File "/petsc/config/BuildSystem/config/framework.py", line 309, in getChild
  File "/petsc/config/BuildSystem/config/packages/ADIOS.py", line 17, in setupDependencies
    self.zlib           = framework.require('config.packages.zlib',self)
  File "/petsc/config/BuildSystem/config/framework.py", line 329, in require
    config = self.getChild(moduleName, keywordArgs)
  File "/petsc/config/BuildSystem/config/framework.py", line 307, in getChild
  File "/petsc/config/BuildSystem/config/base.py", line 94, in setup
  File "/petsc/config/BuildSystem/script.py", line 108, in setup
  File "/petsc/config/BuildSystem/logger.py", line 75, in setup
  File "/petsc/config/BuildSystem/args.py", line 76, in setup
  File "/petsc/config/BuildSystem/script.py", line 92, in setupArguments
  File "/petsc/config/BuildSystem/config/packages/zlib.py", line 16, in setupHelp
    config.package.Package.setupHelp(self, help)
  File "/petsc/config/BuildSystem/config/package.py", line 156, in setupHelp
    help.addArgument(self.PACKAGE,'-with-'+self.package+'-dir=<dir>',nargs.ArgDir(None,None,'Indicate the root directory of the '+self.name+' installation',mustExist = 1))
  File "/petsc/config/BuildSystem/help.py", line 108, in addArgument
    self.argDB.setType(self.getArgName(name), argType, forceLocal = 1)
  File "/petsc/config/BuildSystem/RDict.py", line 222, in setType
  File "/petsc/config/BuildSystem/nargs.py", line 325, in setValue
    raise ValueError('Nonexistent directory: '+str(value)+' for key '+str(self.key))

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200802/27dd8b94/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reconfigure-arch-linux-c-debug.py
Type: text/x-python-script
Size: 1379 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200802/27dd8b94/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200802/27dd8b94/attachment-0001.html>

More information about the petsc-dev mailing list