<div>Thank Satish. It worked as you said. But when I rebuild petsc using </div><div>./configure --with-matlab</div><div>It prompts </div><div><div>===============================================================================</div><div>             Configuring PETSc to compile on your system</div><div>===============================================================================</div><div>TESTING: configureLibrary from config.packages.Matlab(config/BuildSystem/config/packages/Matlab.py:35)         *******************************************************************************</div><div>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):</div><div>-------------------------------------------------------------------------------</div><div>Could not find a functional Matlab</div><div>Run with --with-matlab-dir=Matlabrootdir if you know where it is</div><div>*******************************************************************************</div></div><div><div><br></div><div>Then, I did the following. But it shows that "/Users/zhihui/Applications/MATLAB_R2018a.app/bin/matlab" nonexistent. However, it does exist as</div><div><div>Scott-Grad-MBP:bin zhihui$ pwd</div><div>/Applications/MATLAB_R2018a.app/bin</div><div>Scott-Grad-MBP:bin zhihui$ ls</div><div>activate_matlab.sh<span style="white-space:pre">  </span>lcdata_utf8.xml<span style="white-space:pre">              </span>matlab-glselector.sh<span style="white-space:pre"> </span>mexsh</div><div>deactivate_matlab.sh<span style="white-space:pre">     </span>ldd<span style="white-space:pre">                  </span>matopts.sh<span style="white-space:pre">           </span>optsetup.sh</div><div>engopts.sh<span style="white-space:pre">         </span>m3iregistry<span style="white-space:pre">          </span>mex<span style="white-space:pre">                  </span>registry</div><div>lcdata.xml<span style="white-space:pre">            </span>maci64<span style="white-space:pre">                       </span>mexext<span style="white-space:pre">                       </span>util</div><div>lcdata.xsd<span style="white-space:pre">                </span>matlab<span style="white-space:pre">                       </span>mexopts.sh</div><div><br></div></div><div>Do you know what it is going on here?</div><div><br></div><div><br></div><div><div>Scott-Grad-MBP:petsc-3.8.3 zhihui$ ./configure --with-matlab-dir=./../../../../Applications/MATLAB_R2018a/bin/matlab</div><div>===============================================================================</div><div>             Configuring PETSc to compile on your system</div><div>===============================================================================</div><div>*******************************************************************************</div><div>                ERROR in COMMAND LINE ARGUMENT to ./configure</div><div>-------------------------------------------------------------------------------</div><div>Nonexistent directory: /Users/zhihui/Applications/MATLAB_R2018a/bin/matlab for key with-matlab-dir</div><div>*******************************************************************************</div><div><br></div><div><br></div><div>  File "./config/configure.py", line 390, in petsc_configure</div><div>    framework = config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:], loadArgDB = 0)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/framework.py", line 110, in __init__</div><div>    self.createChildren()</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/framework.py", line 321, in createChildren</div><div>    self.getChild(moduleName)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/framework.py", line 306, in getChild</div><div>    config.setupDependencies(self)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/PETSc/Configure.py", line 107, in setupDependencies</div><div>    obj = self.registerPythonFile(package,'config.packages')</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/PETSc/Configure.py", line 63, in registerPythonFile</div><div>    utilityObj                             = self.framework.require(directory+utilityName, self)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/framework.py", line 326, in require</div><div>    config = self.getChild(moduleName, keywordArgs)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/framework.py", line 304, in getChild</div><div>    config.setup()</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/script.py", line 101, in setup</div><div>    logger.Logger.setup(self)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/logger.py", line 85, in setup</div><div>    args.ArgumentProcessor.setup(self)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/args.py", line 75, in setup</div><div>    self.setupArguments(self.argDB)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/script.py", line 85, in setupArguments</div><div>    self.setupHelp(self.help)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/config/packages/Matlab.py", line 15, in setupHelp</div><div>    help.addArgument('MATLAB', '-with-matlab-dir=<root dir>', nargs.ArgDir(None, None, 'Specify the root directory of the Matlab installation'))</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/help.py", line 107, in addArgument</div><div>    self.argDB.setType(self.getArgName(name), argType, forceLocal = 1)</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/RDict.py", line 213, in setType</div><div>    value.setValue(v.getValue())</div><div>  File "/Users/zhihui/igx/deps/srcs/petsc-3.8.3/config/BuildSystem/nargs.py", line 324, in setValue</div><div>    raise ValueError('Nonexistent directory: '+str(value)+' for key '+str(self.key))</div><div><br></div></div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "Balay, Satish";<balay@mcs.anl.gov>;</div><div><b>Date: </b> Oct 26, 2018</div><div><b>To: </b> "avatar"<648934229@qq.com>; <wbr></div><div><b>Cc: </b> "petsc-users"<petsc-users@mcs.anl.gov>; <wbr></div><div><b>Subject: </b> Re: [petsc-users] "Could not find a suitable archiver. Use --with-arto specify an archiver"</div></div><div><br></div>On Fri, 26 Oct 2018, avatar wrote:<br><br>> Is there other way to overcome this problem? Because if I don't set TMPDIR as \tmp. My other project will break. And actually I don't even know where my project set up the TMPDIR value.<br><br>I guess you need to read up on some basic unix and system admin.<br><br>You probably meant to use:<br><br>export TMPDIR=/tmp<br><br>However  - you have:<br><br>export TMPDIR=tmp<br><br>To overcome this problem - you do:<br><br>export TMPDIR=/tmp<br><br>Satish<br></div>