<div dir="auto">I will try and let you know.<div dir="auto"><br></div><div dir="auto">Thanks and regards</div><div dir="auto">Srinivas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 6, 2023, 23:47 Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div><br></div>   Ok, so the C++ binding for Matlab engine is working on your machine. PETSc uses the C binding which links against different libraries but, one would think the C binding would work for sure if the C++ binding works. Can you try a Matlab Engine C example provided by Matlab?<div><br><div><br></div><div><br><div><br><blockquote type="cite"><div>On Sep 6, 2023, at 3:58 AM, INTURU SRINIVAS 20PHD0548 <<a href="mailto:inturu.srinivas2020@vitstudent.ac.in" target="_blank" rel="noreferrer">inturu.srinivas2020@vitstudent.ac.in</a>> wrote:</div><br><div><div dir="ltr"><div>Hi Amneet,</div><div><br></div><div>I repeated the same procedure again and this time it is working.</div><div><b>$g++ -std=c++11 -I /usr/local/MATLAB/R2020b/extern/include/ -L /usr/local/MATLAB/R2020b/extern/bin/glnxa64/ -pthread myEngineApp2.cpp -lMatlabDataArray -lMatlabEngine</b></div><div><b>$LD_LIBRARY_PATH=/usr/local/MATLAB/R2020b/extern/bin/glnxa64:/usr/local/MATLAB/R2020b/sys/os/glnxa64</b></div><div><b>$export LD_LIBRARY_PATH</b></div><div><b>$./a.out</b><br>Square root of -2 is 0 + 1.41421i<br>Square root of 2 is 1.41421 + 0i<br>Square root of 6 is 2.44949 + 0i<br>Square root of 8 is 2.82843 + 0i<br></div><div><div>I don't know how it is working this time?</div><div><br></div><div>Thanks and regards</div><div>Srinivas<br></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 6, 2023 at 12:17 PM INTURU SRINIVAS 20PHD0548 <<a href="mailto:inturu.srinivas2020@vitstudent.ac.in" target="_blank" rel="noreferrer">inturu.srinivas2020@vitstudent.ac.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Amneet,</div><div>I tried the following example to run a matlab engine.</div><div><br></div><div>#include "MatlabDataArray.hpp"<br>#include "MatlabEngine.hpp"<br>#include <iostream><br>void callSQRT() {<br><br>    using namespace matlab::engine;<br><br>    // Start MATLAB engine synchronously<br>    std::unique_ptr<MATLABEngine> matlabPtr = startMATLAB();<br><br>    //Create MATLAB data array factory<br>    matlab::data::ArrayFactory factory;<br><br>    // Define a four-element typed array<br>    matlab::data::TypedArray<double> const argArray = <br>        factory.createArray({ 1,4 }, { -2.0, 2.0, 6.0, 8.0 });<br><br>    // Call MATLAB sqrt function on the data array<br>    matlab::data::Array const results = matlabPtr->feval(u"sqrt", argArray);<br><br>    // Display results<br>    for (int i = 0; i < results.getNumberOfElements(); i++) {<br>        double a = argArray[i];<br>        std::complex<double> v = results[i];<br>        double realPart = v.real();<br>        double imgPart = v.imag();<br>        std::cout << "Square root of " << a << " is " << <br>            realPart << " + " << imgPart << "i" << std::endl;<br>    }<br>}<br><br>int main() {<br>    callSQRT();<br>    return 0;<br>}</div><div><br></div><div><b>$g++ -std=c++11 -I /usr/local/MATLAB/R2020b/extern/include/ -L /usr/local/MATLAB/R2020b/extern/bin/glnxa64/ -pthread myEngineApp.cpp -lMatlabDataArray -lMatlabEngine</b></div><div><b>$LD_LIBRARY_PATH=/usr/local/MATLAB/R2020b/extern/bin/glnxa64:/usr/local/MATLAB/R2020b/sys/os/glnxa64</b></div><div><b>$export LD_LIBRARY_PATH</b></div><div><b>$./a.out</b><br>Starting<br>Error: The import statement 'import matlab.internal.engine.input' cannot be found or cannot be imported. Imported names must end with '.*' or be fully qualified.<br><br>terminate called after throwing an instance of 'matlab::engine::EngineException'<br>  what():  MATLAB process cannot be created.<br>Aborted (core dumped)</div><div><br></div><div>I got the above error for Matlab R2020b. Please help me to sort out this.</div><div><br></div><div>Thanks and regards</div><div>Srinivas<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 11:39 PM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank" rel="noreferrer">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">BTW, what Barry is suggesting is the following:<div><br></div><div>Compile a sample code with a command line this:</div><div> </div><div><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px">g++ -std=c++11 -I <em style="box-sizing:border-box">matlabroot</em>/extern/include/ -L <em style="box-sizing:border-box">matlabroot</em>/extern/bin/glnxa64/ 
    -pthread myEngineApp.cpp -lMatlabDataArray -lMatlabEngine</pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px">This command is provided here:</pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px"><a href="https://www.mathworks.com/help/matlab/matlab_external/build-c-engine-programs.html" target="_blank" rel="noreferrer">https://www.mathworks.com/help/matlab/matlab_external/build-c-engine-programs.html</a><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px">A sample MATLAB code is here:</pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px"><a href="https://www.mathworks.com/help/matlab/matlab_external/call-matlab-functions-from-c-1.html" target="_blank" rel="noreferrer">https://www.mathworks.com/help/matlab/matlab_external/call-matlab-functions-from-c-1.html</a><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13px;padding:0px;margin-top:0px;margin-bottom:10px;margin-left:2em;line-height:1.42;color:rgb(33,33,33);word-break:normal;background-image:none;background-position:0% center;background-size:auto;background-repeat:repeat;background-origin:padding-box;background-clip:border-box;border:medium;border-radius:0px">(You can just pick a few lines of code from here to create a barebone example)</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 11:02 AM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank" rel="noreferrer">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Srinivas --- Do you have a different version of MATLAB that you can install? If your organization has a MATLAB license, you can install recent versions of MATLAB from <a href="http://mathworks.com/" target="_blank" rel="noreferrer">mathworks.com</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 10:37 AM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" rel="noreferrer">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div>   Ok, I have no suggestions. It seems to be more an issue with the Matlab than PETSc. You could find a pure Matlab example of using the engine (in the Matlab documentation) and try it to see if it works.<div><br></div><div>   Barry</div><div><br><div><br><blockquote type="cite"><div>On Sep 5, 2023, at 12:27 PM, INTURU SRINIVAS 20PHD0548 <<a href="mailto:inturu.srinivas2020@vitstudent.ac.in" target="_blank" rel="noreferrer">inturu.srinivas2020@vitstudent.ac.in</a>> wrote:</div><br><div><div dir="ltr"><div>I replaced e->ep = engOpen(buffer); with e->ep = engOpen("");</div><div>I got the same errors for petsc 3.17.5</div><div><br></div><div><b>make all<br></b></div><div>   CC linux-opt/obj/sys/classes/matlabengine/matlab.o<br>     CLINKER linux-opt/lib/libpetsc.so.3.17.5<br>BEGINNING TO COMPILE MATLAB INTERFACE<br>Building with 'gcc'.<br>/home/vit/sfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c: In function ‘PetscBinaryWrite’:<br>/home/vit/sfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c:164:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>  164 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>      |      ^<br><br>MEX completed successfully.<br>Building with 'gcc'.<br>MEX completed successfully.<br>Building with 'gcc'.<br>MEX completed successfully.<br>Building with 'gcc'.<br>/home/vit/sfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c: In function ‘PetscBinaryWrite’:<br>/home/vit/sfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c:164:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>  164 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>      |      ^<br><br>MEX completed successfully.<br>=========================================<br>=========================================<br>Now to check if the libraries are working do:<br>make PETSC_DIR=/home/vit/sfw/petsc/3.17.5 PETSC_ARCH=linux-opt check</div><div><br></div><div><b>make test query=requires queryval=matlab DATAFILESPATH=/home/vit/datafiles/</b><br>Using MAKEFLAGS: -- DATAFILESPATH=/home/vit/datafiles/ queryval=matlab query=requires<br>     CLINKER linux-opt/tests/ksp/ksp/tutorials/ex72<br>        TEST linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>not ok ksp_ksp_tutorials-ex72_12 # Error code: 85<br>#     [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>#   [0]PETSC ERROR: Error in external library<br>#    [0]PETSC ERROR: Unable to start MATLAB engine with /usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash <br>#      [0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank" rel="noreferrer">https://petsc.org/release/faq/</a> for trouble shooting.<br>#     [0]PETSC ERROR: Petsc Release Version 3.17.5, Sep 30, 2022 <br>#  [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit Tue Sep  5 21:39:22 2023<br>#   [0]PETSC ERROR: Configure options --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0 --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b --with-matlab-engine=1 -with-blaslapack-dir=/usr/local/MATLAB/R2020b --known-64-bit-blas-indices=1<br>#      [0]PETSC ERROR: #1 PetscMatlabEngineCreate() at /home/vit/sfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:83<br>#  [0]PETSC ERROR: #2 PETSC_MATLAB_ENGINE_() at /home/vit/sfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:332<br>#    [0]PETSC ERROR: #3 PetscMatlabEnginePut() at /home/vit/sfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:245<br>#    [0]PETSC ERROR: #4 MatLUFactorNumeric_Matlab() at /home/vit/sfw/petsc/3.17.5/src/mat/impls/aij/seq/matlab/aijmatlab.c:144<br>#    [0]PETSC ERROR: #5 MatLUFactorNumeric() at /home/vit/sfw/petsc/3.17.5/src/mat/interface/matrix.c:3020<br>#        [0]PETSC ERROR: #6 PCSetUp_LU() at /home/vit/sfw/petsc/3.17.5/src/ksp/pc/impls/factor/lu/lu.c:131<br>#    [0]PETSC ERROR: #7 PCSetUp() at /home/vit/sfw/petsc/3.17.5/src/ksp/pc/interface/precon.c:990<br># [0]PETSC ERROR: #8 KSPSetUp() at /home/vit/sfw/petsc/3.17.5/src/ksp/ksp/interface/itfunc.c:407<br>#       [0]PETSC ERROR: #9 main() at /home/vit/sfw/petsc/3.17.5/src/ksp/ksp/tutorials/ex72.c:305<br>#     [0]PETSC ERROR: PETSc Option Table entries:<br>#  [0]PETSC ERROR: -check_pointer_intensity 0<br>#   [0]PETSC ERROR: -error_output_stdout<br># [0]PETSC ERROR: -f0 /home/vit/datafiles//matrices/arco1<br>#      [0]PETSC ERROR: -malloc_dump<br># [0]PETSC ERROR: -pc_factor_mat_solver_type matlab<br>#    [0]PETSC ERROR: -pc_type lu<br>#  [0]PETSC ERROR: -use_gpu_aware_mpi 0<br># [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------<br>#   --------------------------------------------------------------------------<br>#   MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD<br>#       with errorcode 85.<br>#   <br>#     NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>#  You may or may not see output from other processes, depending on<br>#     exactly when Open MPI kills them.<br>#    --------------------------------------------------------------------------<br> ok ksp_ksp_tutorials-ex72_12 # SKIP Command failed so no diff<br><br><br># FAILED ksp_ksp_tutorials-ex72_12<br>#<br># To rerun failed tests: <br>#     /usr/bin/make -f gmakefile test test-fail=1</div><div><br></div><div>Thanks and regards</div><div>Srinivas<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 9:05 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" rel="noreferrer">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div><div>    The error is occuring during</div><div><br></div>     e->ep = engOpen(buffer);<br><div><br></div><div>Since the direct launch of /usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash from your terminal shell worked we have to assume the problem is occuring when engOpen() is attempting to connect the stdout and stdin from the Matlab session that is launched to the executable. </div><div><br></div><div>You can try the following. In 3.17.5 edit the file src/sys/classes/matlabengine/matlab.c and locate the line </div><div><br></div><div>e->ep = engOpen(buffer);</div><div><br></div><div>replace it with</div><div><br></div><div>e->ep = engOpen("");</div><div><br></div><div>Now in the PETSc directory do make all (it should recompile one file) and then run the </div><div><b><br></b></div><div>make test query=requires queryval=matlab DATAFILESPATH=/home/vit/datafiles/</div><div><br></div><div>again</div><div><br></div><div><br></div><div><br></div><div><b><br></b></div><div><b><br></b><blockquote type="cite"><div>On Sep 5, 2023, at 3:39 AM, INTURU SRINIVAS 20PHD0548 via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a>> wrote:</div><br><div><div dir="ltr"><div>Hi Amneeth,</div><div><br></div><div>I think the errors are different with petsc 3.17.5 <br></div><div><br></div><div><b>./configure --CC=/usr/bin/mpicc --CXX=/usr/bin/mpicxx --FC=/usr/bin/mpif90 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0 --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b --with-blaslapack-dir=/usr/local/MATLAB/R2020b --known-64-bit-blas-indices=1 --with-matlab-engine=1</b><br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>The version of PETSc you are using is out-of-date, we recommend updating to the new release<br> Available Version: 3.19.5   Installed Version: 3.17.5<br><a href="https://petsc.org/release/download/" target="_blank" rel="noreferrer">https://petsc.org/release/download/</a><br>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>=============================================================================================<br>                         Configuring PETSc to compile on your system                         <br>=============================================================================================<br>Compilers:                                                                      <br>  C Compiler:         /usr/bin/mpicc  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -O3  <br>    Version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>  C++ Compiler:         /usr/bin/mpicxx  -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -O3  -std=gnu++17 -fPIC <br>    Version: g++ (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0<br>  Fortran Compiler:         /usr/bin/mpif90  -fPIC -Wall -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -O3  <br>    Version: GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>Linkers:<br>  Shared linker:   /usr/bin/mpicc  -shared  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -O3<br>  Dynamic linker:   /usr/bin/mpicc  -shared  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -O3<br>  Libraries linked against:   -lquadmath -lstdc++ -ldl <br>BlasLapack:<br>  Library:  -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64 -L/usr/local/MATLAB/R2020b/sys/os/glnxa64 /usr/local/MATLAB/R2020b/bin/glnxa64/mkl.so -liomp5 -lpthread<br>  uses OpenMP; use export OMP_NUM_THREADS=<p> or -omp_num_threads <p> to control the number of threads<br>  uses 8 byte integers<br>MPI:<br>  Version:  3<br>  mpiexec: /usr/bin/mpiexec<br>  Implementation: openmpi<br>  OMPI_VERSION: 4.0.3<br>pthread:<br>cmake:<br>  Version:  3.16.3<br>  /usr/bin/cmake<br>regex:<br>Matlab:<br>  Includes: -I/usr/local/MATLAB/R2020b/extern/include<br>  /usr/local/MATLAB/R2020b<br>MatlabEngine:<br>  Library:  -Wl,-rpath,/usr/local/MATLAB/R2020b/bin/glnxa64 -L/usr/local/MATLAB/R2020b/bin/glnxa64 -Wl,-rpath,/usr/local/MATLAB/R2020b/extern/lib/glnxa64 -L/usr/local/MATLAB/R2020b/extern/lib/glnxa64 -leng -lmex -lmx -lmat -lmwm_dispatcher -lmwopcmodel -lmwservices -lmwopcmodel -lmwm_dispatcher -lmwmpath -lmwopcmodel -lmwservices -lmwopcmodel -lmwservices -lxerces-c<br>  Language used to compile PETSc: C<br>PETSc:<br>  PETSC_ARCH: linux-opt<br>  PETSC_DIR: /home/vit/ibamrsfw/petsc/3.17.5<br>  Prefix: <inplace installation><br>  Scalar type: real<br>  Precision: double<br>  Support for __float128<br>  Integer size: 4 bytes<br>  Single library: yes<br>  Shared libraries: yes<br>  Memory alignment from malloc(): 16 bytes<br>  Using GNU make: /usr/bin/make<br>xxx=========================================================================xxx<br> Configure stage complete. Now build PETSc libraries with:<br>   make PETSC_DIR=/home/vit/ibamrsfw/petsc/3.17.5 PETSC_ARCH=linux-opt all<br>xxx=========================================================================xxx</div><div><b><br></b></div><div><b>$make</b></div><div>FC linux-opt/obj/tao/f90-mod/petsctaomod.o<br>     CLINKER linux-opt/lib/libpetsc.so.3.17.5<br>BEGINNING TO COMPILE MATLAB INTERFACE<br>Building with 'gcc'.<br>/home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c: In function ‘PetscBinaryWrite’:<br>/home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c:164:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>  164 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>      |      ^<br><br>MEX completed successfully.<br>Building with 'gcc'.<br>MEX completed successfully.<br>Building with 'gcc'.<br>MEX completed successfully.<br>Building with 'gcc'.<br>/home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c: In function ‘PetscBinaryWrite’:<br>/home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/viewer/impls/socket/matlab/bread.c:164:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>  164 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>      |      ^<br><br>MEX completed successfully.<br>=========================================<br>=========================================<br>Now to check if the libraries are working do:<br>make PETSC_DIR=/home/vit/ibamrsfw/petsc/3.17.5 PETSC_ARCH=linux-opt check</div><div><br></div><div><b>$make test query=requires queryval=matlab DATAFILESPATH=/home/vit/datafiles/</b><br>/usr/bin/python3 /home/vit/ibamrsfw/petsc/3.17.5/config/gmakegentest.py --petsc-dir=/home/vit/ibamrsfw/petsc/3.17.5 --petsc-arch=linux-opt --testdir=./linux-opt/tests<br>Using MAKEFLAGS: -- DATAFILESPATH=/home/vit/datafiles/ queryval=matlab query=requires<br>          CC linux-opt/tests/ksp/ksp/tutorials/ex72.o<br>     CLINKER linux-opt/tests/ksp/ksp/tutorials/ex72<br>        TEST linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>not ok ksp_ksp_tutorials-ex72_12 # Error code: 85<br># [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>#   [0]PETSC ERROR: Error in external library<br>#    [0]PETSC ERROR: Unable to start MATLAB engine with /usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash <br>#      [0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank" rel="noreferrer">https://petsc.org/release/faq/</a> for trouble shooting.<br>#     [0]PETSC ERROR: Petsc Release Version 3.17.5, Sep 30, 2022 <br>#  [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit Tue Sep  5 10:15:57 2023<br>#   [0]PETSC ERROR: Configure options --CC=/usr/bin/mpicc --CXX=/usr/bin/mpicxx --FC=/usr/bin/mpif90 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0 --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b --with-blaslapack-dir=/usr/local/MATLAB/R2020b --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>#       [0]PETSC ERROR: #1 PetscMatlabEngineCreate() at /home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:82<br>#     [0]PETSC ERROR: #2 PETSC_MATLAB_ENGINE_() at /home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:331<br>#       [0]PETSC ERROR: #3 PetscMatlabEnginePut() at /home/vit/ibamrsfw/petsc/3.17.5/src/sys/classes/matlabengine/matlab.c:244<br>#       [0]PETSC ERROR: #4 MatLUFactorNumeric_Matlab() at /home/vit/ibamrsfw/petsc/3.17.5/src/mat/impls/aij/seq/matlab/aijmatlab.c:144<br>#       [0]PETSC ERROR: #5 MatLUFactorNumeric() at /home/vit/ibamrsfw/petsc/3.17.5/src/mat/interface/matrix.c:3020<br>#   [0]PETSC ERROR: #6 PCSetUp_LU() at /home/vit/ibamrsfw/petsc/3.17.5/src/ksp/pc/impls/factor/lu/lu.c:131<br>#       [0]PETSC ERROR: #7 PCSetUp() at /home/vit/ibamrsfw/petsc/3.17.5/src/ksp/pc/interface/precon.c:990<br>#    [0]PETSC ERROR: #8 KSPSetUp() at /home/vit/ibamrsfw/petsc/3.17.5/src/ksp/ksp/interface/itfunc.c:407<br>#  [0]PETSC ERROR: #9 main() at /home/vit/ibamrsfw/petsc/3.17.5/src/ksp/ksp/tutorials/ex72.c:305<br>#        [0]PETSC ERROR: PETSc Option Table entries:<br>#  [0]PETSC ERROR: -check_pointer_intensity 0<br>#   [0]PETSC ERROR: -error_output_stdout<br># [0]PETSC ERROR: -f0 /home/vit/datafiles//matrices/arco1<br>#      [0]PETSC ERROR: -malloc_dump<br># [0]PETSC ERROR: -pc_factor_mat_solver_type matlab<br>#    [0]PETSC ERROR: -pc_type lu<br>#  [0]PETSC ERROR: -use_gpu_aware_mpi 0<br># [0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------<br>#   --------------------------------------------------------------------------<br>#   MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD<br>#       with errorcode 85.<br>#   <br>#     NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>#  You may or may not see output from other processes, depending on<br>#     exactly when Open MPI kills them.<br>#    --------------------------------------------------------------------------<br> ok ksp_ksp_tutorials-ex72_12 # SKIP Command failed so no diff<br><br><br># FAILED ksp_ksp_tutorials-ex72_12<br>#<br># To rerun failed tests: <br>#     /usr/bin/make -f gmakefile test test-fail=1</div><div><br></div><div>To get the info of the error there is no specific probe id reported.</div><div><br></div><div>How to check error info and proceed further?<br></div><div><br></div><div>Thanks and regards</div><div>Srinivas<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 5, 2023 at 1:08 AM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank" rel="noreferrer">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Do you get similar errors with petsc 3.17.5 using the new configure options that Satish mentioned?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 3, 2023 at 10:19 PM INTURU SRINIVAS 20PHD0548 via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry for missing that.</div><div><b>/usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash</b><br><br>                            < M A T L A B (R) ><br>                  Copyright 1984-2020 The MathWorks, Inc.<br>              R2020b Update 3 (9.9.0.1538559) 64-bit (glnxa64)<br>                             November 23, 2020<br><br> <br>To get started, type doc.<br>For product information, visit <a href="http://www.mathworks.com/" target="_blank" rel="noreferrer">www.mathworks.com</a>.<br> <br></div><div>Thanks and regards</div><div>Srinivas<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 4, 2023 at 10:19 AM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank" rel="noreferrer">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You are missing one more step:<br>
<br>
> [0] PetscInitialize(): Running on machine: MB108SMEC028<br>
> [0] PetscMatlabEngineCreate(): Starting MATLAB engine with command /usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash<br>
<br>
No run matlab manually on "MB108SMEC028" with the command "/usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash"<br>
<br>
Does this work for you? As the message indicates this command is invoked by "matlab_ls_test" - and that is failing.<br>
<br>
Satish<br>
<br>
<br>
On Mon, 4 Sep 2023, INTURU SRINIVAS 20PHD0548 via petsc-users wrote:<br>
<br>
> Hi Sathish,<br>
> <br>
> I tried the following procedure<br>
> <br>
> *$make *<br>
> CLINKER linux-opt/lib/libpetsc.so.3.13.4<br>
> BEGINNING TO COMPILE MATLAB INTERFACE<br>
> Building with 'gcc'.<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:<br>
> In function ‘PetscBinaryWrite’:<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> warning: ‘err’ may be used uninitialized in this function<br>
> [-Wmaybe-uninitialized]<br>
>   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>
>       |      ^<br>
> <br>
> MEX completed successfully.<br>
> Building with 'gcc'.<br>
> MEX completed successfully.<br>
> Building with 'gcc'.<br>
> MEX completed successfully.<br>
> Building with 'gcc'.<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:<br>
> In function ‘PetscBinaryWrite’:<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> warning: ‘err’ may be used uninitialized in this function<br>
> [-Wmaybe-uninitialized]<br>
>   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>
>       |      ^<br>
> <br>
> MEX completed successfully.<br>
> =========================================<br>
> Now to check if the libraries are working do:<br>
> make PETSC_DIR=/home/vit/sfw/petsc/3.13.4 PETSC_ARCH=linux-opt check<br>
> <br>
> *$make test query=requires queryval=matlab<br>
> DATAFILESPATH=/home/vit/datafiles/*<br>
> Using MAKEFLAGS: -- DATAFILESPATH=/home/vit/datafiles/ queryval=matlab<br>
> query=requires<br>
>           CC linux-opt/tests/ksp/ksp/tutorials/ex72.o<br>
>      CLINKER linux-opt/tests/ksp/ksp/tutorials/ex72<br>
>         TEST linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>
> not ok ksp_ksp_tutorials-ex72_12 # Error code: 139<br>
> # [0]PETSC ERROR: --------------------- Error Message<br>
> --------------------------------------------------------------<br>
> # [0]PETSC ERROR: Error in external library<br>
> # [0]PETSC ERROR: Unable to start MATLAB engine on<br>
> # [0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> for trouble shooting.<br>
> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> # [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit Mon Sep<br>
>  4 10:02:32 2023<br>
> # [0]PETSC ERROR: Configure options<br>
> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> # [0]PETSC ERROR: #1 PetscMatlabEngineCreate() line 67 in<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> # [0]PETSC ERROR: --------------------- Error Message<br>
> --------------------------------------------------------------<br>
> # [0]PETSC ERROR: Petsc has generated inconsistent data<br>
> # [0]PETSC ERROR:<br>
> # [0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> for trouble shooting.<br>
> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> # [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit Mon Sep<br>
>  4 10:02:32 2023<br>
> # [0]PETSC ERROR: Configure options<br>
> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> # [0]PETSC ERROR: #2 PETSC_MATLAB_ENGINE_() line 316 in<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> # [0]PETSC ERROR:<br>
> ------------------------------------------------------------------------<br>
> # [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,<br>
> probably memory access out of range<br>
> # [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
> # [0]PETSC ERROR: or see<br>
> <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>
> # [0]PETSC ERROR: or try <a href="http://valgrind.org/" rel="noreferrer noreferrer" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS<br>
> X to find memory corruption errors<br>
> # [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link,<br>
> and run<br>
> # [0]PETSC ERROR: to get more information on the crash.<br>
> # [0]PETSC ERROR: --------------------- Error Message<br>
> --------------------------------------------------------------<br>
> # [0]PETSC ERROR: Signal received<br>
> # [0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> for trouble shooting.<br>
> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> # [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit Mon Sep<br>
>  4 10:02:32 2023<br>
> # [0]PETSC ERROR: Configure options<br>
> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> # [0]PETSC ERROR: #3 User provided function() line 0 in  unknown file<br>
> # --------------------------------------------------------------------------<br>
> # MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD<br>
> # with errorcode 50162059.<br>
> #<br>
> # NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
> # You may or may not see output from other processes, depending on<br>
> # exactly when Open MPI kills them.<br>
> # --------------------------------------------------------------------------<br>
>  ok ksp_ksp_tutorials-ex72_12 # SKIP Command failed so no diff<br>
>           CC<br>
> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o<br>
>      CLINKER<br>
> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test<br>
>         TEST<br>
> linux-opt/tests/counts/tao_leastsquares_tutorials_matlab-matlab_ls_test.counts<br>
> not ok tao_leastsquares_tutorials_matlab-matlab_ls_test # Error code: 124<br>
> # Running problem 5<br>
> # [0]PETSC ERROR: --------------------- Error Message<br>
> --------------------------------------------------------------<br>
> # [0]PETSC ERROR: Error in external library<br>
> # [0]PETSC ERROR: Unable to start MATLAB engine on<br>
> # [0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> for trouble shooting.<br>
> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> # [0]PETSC ERROR: ../matlab_ls_test on a linux-opt named MB108SMEC028 by<br>
> vit Mon Sep  4 10:02:34 2023<br>
> # [0]PETSC ERROR: Configure options<br>
> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> # [0]PETSC ERROR: #1 PetscMatlabEngineCreate() line 67 in<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> # [0]PETSC ERROR: #2 main() line 126 in<br>
> /home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c<br>
> # [0]PETSC ERROR: PETSc Option Table entries:<br>
> # [0]PETSC ERROR: -prob_id 5<br>
> # [0]PETSC ERROR: -tao_smonitor<br>
> # [0]PETSC ERROR: ----------------End of Error Message -------send entire<br>
> error message to petsc-maint@mcs.anl.gov----------<br>
> # --------------------------------------------------------------------------<br>
> # MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_SELF<br>
> # with errorcode 126076.<br>
> #<br>
> # NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
> # You may or may not see output from other processes, depending on<br>
> # exactly when Open MPI kills them.<br>
> # --------------------------------------------------------------------------<br>
>  ok tao_leastsquares_tutorials_matlab-matlab_ls_test # SKIP Command failed<br>
> so no diff<br>
> <br>
> # -------------<br>
> #   Summary<br>
> # -------------<br>
> # FAILED ksp_ksp_tutorials-ex72_12<br>
> tao_leastsquares_tutorials_matlab-matlab_ls_test<br>
> # success 0/2 tests (0.0%)<br>
> # failed 2/2 tests (100.0%)<br>
> # todo 0/2 tests (0.0%)<br>
> # skip 0/2 tests (0.0%)<br>
> #<br>
> # Wall clock time for tests: 4 sec<br>
> # Approximate CPU time (not incl. build time): 0.03 sec<br>
> #<br>
> # To rerun failed tests:<br>
> #     /usr/bin/make -f gmakefile test test-fail=1<br>
> #<br>
> # Timing summary (actual test time / total CPU time):<br>
> #   ksp_ksp_tutorials-ex72_12: 0.01 sec / 0.02 sec<br>
> #   tao_leastsquares_tutorials_matlab-matlab_ls_test: 0.01 sec / 0.01 sec<br>
> <br>
> *$cd src/tao/leastsquares/tutorials/matlab/*<br>
> *$make matlab_ls_test*<br>
> /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicc -fPIC -Wall -Wwrite-strings<br>
> -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector<br>
> -fvisibility=hidden -O3 -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing<br>
> -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -O3<br>
>  -I/home/vit/sfw/petsc/3.13.4/include<br>
> -I/home/vit/sfw/petsc/3.13.4/linux-opt/include<br>
> -I/usr/local/MATLAB/R2020b/extern/include<br>
> -I/home/vit/sfw/linux/openmpi/4.1.4/include      matlab_ls_test.c<br>
>  -Wl,-rpath,/home/vit/sfw/petsc/3.13.4/linux-opt/lib<br>
> -L/home/vit/sfw/petsc/3.13.4/linux-opt/lib<br>
> /usr/local/MATLAB/R2020b/bin/glnxa64/mkl.so<br>
> -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64<br>
> -L/usr/local/MATLAB/R2020b/sys/os/glnxa64<br>
> -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64:/usr/local/MATLAB/R2020b/bin/glnxa64:/usr/local/MATLAB/R2020b/extern/lib/glnxa64<br>
> -L/usr/local/MATLAB/R2020b/bin/glnxa64<br>
> -L/usr/local/MATLAB/R2020b/extern/lib/glnxa64<br>
> -Wl,-rpath,/home/vit/sfw/linux/openmpi/4.1.4/lib<br>
> -L/home/vit/sfw/linux/openmpi/4.1.4/lib<br>
> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/9<br>
> -L/usr/lib/gcc/x86_64-linux-gnu/9 -Wl,-rpath,/usr/lib/x86_64-linux-gnu<br>
> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu<br>
> -L/lib/x86_64-linux-gnu -lpetsc -liomp5 -lpthread -lm -leng -lmex -lmx<br>
> -lmat -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh<br>
> -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lquadmath<br>
> -lstdc++ -ldl -o matlab_ls_test<br>
> <br>
> *$LD_PRELOAD=/lib/x86_64-linux-gnu/libgfortran.so.5 ./matlab_ls_test<br>
>  -tao_smonitor -prob_id 5 -info*<br>
> [0] PetscInitialize(): PETSc successfully started: number of processors = 1<br>
> [0] PetscGetHostName(): Rejecting domainname, likely is NIS<br>
> MB108SMEC028.(none)<br>
> [0] PetscInitialize(): Running on machine: MB108SMEC028<br>
> Running problem 5<br>
> [0] PetscCommDuplicate(): Duplicating a communicator 140155238476992<br>
> 94202473157392 max tags = 2147483647<br>
> [0] PetscMatlabEngineCreate(): Starting MATLAB engine with command<br>
> /usr/local/MATLAB/R2020b/bin/matlab -glnxa64 -nodisplay  -nosplash<br>
> [0]PETSC ERROR: --------------------- Error Message<br>
> --------------------------------------------------------------<br>
> [0]PETSC ERROR: Error in external library<br>
> [0]PETSC ERROR: Unable to start MATLAB engine on<br>
> [0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> for trouble shooting.<br>
> [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> [0]PETSC ERROR: ./matlab_ls_test on a linux-opt named MB108SMEC028 by vit<br>
> Mon Sep  4 10:09:56 2023<br>
> [0]PETSC ERROR: Configure options<br>
> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> [0]PETSC ERROR: #1 PetscMatlabEngineCreate() line 67 in<br>
> /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> [0]PETSC ERROR: #2 main() line 126 in matlab_ls_test.c<br>
> [0]PETSC ERROR: PETSc Option Table entries:<br>
> [0]PETSC ERROR: -info<br>
> [0]PETSC ERROR: -prob_id 5<br>
> [0]PETSC ERROR: -tao_smonitor<br>
> [0]PETSC ERROR: ----------------End of Error Message -------send entire<br>
> error message to petsc-maint@mcs.anl.gov----------<br>
> --------------------------------------------------------------------------<br>
> MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_SELF<br>
> with errorcode 126076.<br>
> <br>
> NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
> You may or may not see output from other processes, depending on<br>
> exactly when Open MPI kills them.<br>
> <br>
> Please find the attachment for configure.log and make.log files<br>
> <br>
> On Sun, Sep 3, 2023 at 8:00 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank" rel="noreferrer">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> > To use datafiles in the test suite:<br>
> ><br>
> > cd $HOME<br>
> > git clone <a href="https://gitlab.com/petsc/datafiles" rel="noreferrer noreferrer" target="_blank">https://gitlab.com/petsc/datafiles</a><br>
> > <configure should now pick up this location and set DATAFILESPATH - or set<br>
> > manually with make><br>
> ><br>
> > make test query=requires queryval=matlab DATAFILESPATH=$HOME/datafiles<br>
> ><br>
> > Satish<br>
> ><br>
> > On Sun, 3 Sep 2023, Matthew Knepley wrote:<br>
> ><br>
> > > On Sun, Sep 3, 2023 at 8:47 AM INTURU SRINIVAS 20PHD0548 <<br>
> > > <a href="mailto:inturu.srinivas2020@vitstudent.ac.in" target="_blank" rel="noreferrer">inturu.srinivas2020@vitstudent.ac.in</a>> wrote:<br>
> > ><br>
> > > > Hi Matthew,<br>
> > > ><br>
> > > > I am using PETSc to simulate the problems using IBAMR. I do not have<br>
> > any<br>
> > > > separate test files to test PETSc alone. Can you please help me how to<br>
> > > > define this DATAFILESPATH?<br>
> > > ><br>
> > ><br>
> > > That test you tried uses a certain matrix. On our machine, we point to<br>
> > this<br>
> > > matrix using an environment variable, DATAFILESPATH. You don't have those<br>
> > > matrices, since they are just for testing here. That<br>
> > > is why I suggested just using a different matrix, or running a problem<br>
> > you<br>
> > > care about in IBAMR.<br>
> > ><br>
> > >   Thanks,<br>
> > ><br>
> > >      Matt<br>
> > ><br>
> > ><br>
> > > > Thanks and regards<br>
> > > > Srinivas.<br>
> > > ><br>
> > > > On Sun, Sep 3, 2023 at 6:06 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" rel="noreferrer">knepley@gmail.com</a>><br>
> > wrote:<br>
> > > ><br>
> > > >> On Sun, Sep 3, 2023 at 3:04 AM INTURU SRINIVAS 20PHD0548 via<br>
> > petsc-users <<br>
> > > >> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank" rel="noreferrer">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > > >><br>
> > > >>> Hi Sathish,<br>
> > > >>><br>
> > > >>> Thank you so much for your efforts and the support you are giving me<br>
> > to<br>
> > > >>> sort this out.<br>
> > > >>><br>
> > > >>> I tried to follow the same procedure which you followed to build<br>
> > Petsc<br>
> > > >>> 3.13.4 with Matlab-R2020b on Ubuntu20.04.<br>
> > > >>><br>
> > > >>> *$./configure --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4<br>
> > > >>> COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt<br>
> > > >>> --with-debugging=0 --with-x=0<br>
> > --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --known-64-bit-blas-indices=1 --with-matlab-engine=1*<br>
> > > >>> Using python3 for Python<br>
> > > >>><br>
> > > >>><br>
> > ===============================================================================<br>
> > > >>>              Configuring PETSc to compile on your system<br>
> > > >>><br>
> > > >>><br>
> > > >>><br>
> > ===============================================================================<br>
> > > >>><br>
> > ===============================================================================<br>
> > > >>>                                         It appears you do not have<br>
> > valgrind<br>
> > > >>> installed on your system.<br>
> > > >>>   We HIGHLY recommend you install it from <a href="http://www.valgrind.org/" rel="noreferrer noreferrer" target="_blank">www.valgrind.org</a><br>
> > > >>>                                              Or install<br>
> > valgrind-devel or<br>
> > > >>> equivalent using your package manager.<br>
> > > >>>           Then rerun ./configure<br>
> > > >>><br>
> > > >>><br>
> > ===============================================================================<br>
> > > >>>                                   Compilers:<br>
> > > >>><br>
> > > >>>   C Compiler:         /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicc<br>
> > -fPIC<br>
> > > >>> -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > > >>> -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>     Version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>
> > > >>>   C++ Compiler:       /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicxx<br>
> > > >>>  -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > > >>> -fstack-protector -fvisibility=hidden -O3  -fPIC<br>
> > > >>>     Version: g++ (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0<br>
> > > >>>   Fortran Compiler:   /home/vit/sfw/linux/openmpi/4.1.4/bin/mpif90<br>
> > > >>>  -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -O3<br>
> > > >>>     Version: GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>
> > > >>> Linkers:<br>
> > > >>>   Shared linker:   /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicc<br>
> > -shared<br>
> > > >>>  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing<br>
> > -Wno-unknown-pragmas<br>
> > > >>> -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>   Dynamic linker:   /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicc<br>
> > -shared<br>
> > > >>>  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing<br>
> > -Wno-unknown-pragmas<br>
> > > >>> -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>   Libraries linked against:   -lquadmath -lstdc++ -ldl<br>
> > > >>> make:<br>
> > > >>>   Version:  4.2<br>
> > > >>>   /usr/bin/make<br>
> > > >>> BlasLapack:<br>
> > > >>>   Library:  /usr/local/MATLAB/R2020b/bin/glnxa64/mkl.so<br>
> > > >>> -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/sys/os/glnxa64 -liomp5 -lpthread<br>
> > > >>>   uses OpenMP; use export OMP_NUM_THREADS=<p> or -omp_num_threads<br>
> > <p> to<br>
> > > >>> control the number of threads<br>
> > > >>>   uses 8 byte integers<br>
> > > >>> MPI:<br>
> > > >>>   Version:  3<br>
> > > >>>   Includes: -I/home/vit/sfw/linux/openmpi/4.1.4/include<br>
> > > >>>   Mpiexec: /home/vit/sfw/linux/openmpi/4.1.4/bin/mpiexec<br>
> > --oversubscribe<br>
> > > >>>   OMPI_VERSION: 4.1.4<br>
> > > >>> pthread:<br>
> > > >>> cmake:<br>
> > > >>>   Version:  3.16.3<br>
> > > >>>   /usr/bin/cmake<br>
> > > >>> regex:<br>
> > > >>> Matlab:<br>
> > > >>>   Includes: -I/usr/local/MATLAB/R2020b/extern/include<br>
> > > >>>   /usr/local/MATLAB/R2020b<br>
> > > >>> MatlabEngine:<br>
> > > >>>   Library:<br>
> > > >>><br>
> > -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64:/usr/local/MATLAB/R2020b/bin/glnxa64:/usr/local/MATLAB/R2020b/extern/lib/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/bin/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/extern/lib/glnxa64 -leng -lmex -lmx -lmat<br>
> > -lut<br>
> > > >>> -licudata -licui18n -licuuc<br>
> > > >>>   Language used to compile PETSc: C<br>
> > > >>> PETSc:<br>
> > > >>>   PETSC_ARCH: linux-opt<br>
> > > >>>   PETSC_DIR: /home/vit/sfw/petsc/3.13.4<br>
> > > >>>   Scalar type: real<br>
> > > >>>   Precision: double<br>
> > > >>>   Support for __float128<br>
> > > >>>   Integer size: 4 bytes<br>
> > > >>>   shared libraries: enabled<br>
> > > >>>   Memory alignment from malloc(): 16 bytes<br>
> > > >>><br>
> > > >>><br>
> > xxx=========================================================================xxx<br>
> > > >>>  Configure stage complete. Now build PETSc libraries with:<br>
> > > >>>    make PETSC_DIR=/home/vit/sfw/petsc/3.13.4 PETSC_ARCH=linux-opt all<br>
> > > >>><br>
> > > >>><br>
> > xxx=========================================================================xxx<br>
> > > >>><br>
> > > >>> Then I removed all occurrences of -lut -licudata -licui18n -licuuc as<br>
> > > >>> you suggested earlier.<br>
> > > >>><br>
> > > >>> *$make*<br>
> > > >>>  FC linux-opt/obj/tao/f90-mod/petsctaomod.o<br>
> > > >>>      CLINKER linux-opt/lib/libpetsc.so.3.13.4<br>
> > > >>> BEGINNING TO COMPILE MATLAB INTERFACE<br>
> > > >>> Building with 'gcc'.<br>
> > > >>><br>
> > /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:<br>
> > > >>> In function ‘PetscBinaryWrite’:<br>
> > > >>><br>
> > /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> > > >>> warning: ‘err’ may be used uninitialized in this function<br>
> > > >>> [-Wmaybe-uninitialized]<br>
> > > >>>   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>
> > > >>>       |      ^<br>
> > > >>><br>
> > > >>> MEX completed successfully.<br>
> > > >>> Building with 'gcc'.<br>
> > > >>> MEX completed successfully.<br>
> > > >>> Building with 'gcc'.<br>
> > > >>> MEX completed successfully.<br>
> > > >>> Building with 'gcc'.<br>
> > > >>><br>
> > /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:<br>
> > > >>> In function ‘PetscBinaryWrite’:<br>
> > > >>><br>
> > /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> > > >>> warning: ‘err’ may be used uninitialized in this function<br>
> > > >>> [-Wmaybe-uninitialized]<br>
> > > >>>   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to socket\n");<br>
> > > >>>       |      ^<br>
> > > >>><br>
> > > >>> MEX completed successfully.<br>
> > > >>> =========================================<br>
> > > >>> Now to check if the libraries are working do:<br>
> > > >>> make PETSC_DIR=/home/vit/sfw/petsc/3.13.4 PETSC_ARCH=linux-opt check<br>
> > > >>> ===============================================<br>
> > > >>><br>
> > > >>> *$make test query=requires queryval=matlab*<br>
> > > >>> Using MAKEFLAGS: -- queryval=matlab query=requires<br>
> > > >>>           CC linux-opt/tests/ksp/ksp/tutorials/ex72.o<br>
> > > >>>      CLINKER linux-opt/tests/ksp/ksp/tutorials/ex72<br>
> > > >>>         TEST linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>
> > > >>> not ok ksp_ksp_tutorials-ex72_12 # Error code: 169<br>
> > > >>> # [0]PETSC ERROR: --------------------- Error Message<br>
> > > >>> --------------------------------------------------------------<br>
> > > >>> # [0]PETSC ERROR: Unable to open file<br>
> > > >>> # [0]PETSC ERROR: Cannot locate file: /matrices/arco1<br>
> > > >>><br>
> > > >><br>
> > > >> No, the problem is that you do not have DATAFILESPATH defined, so it<br>
> > > >> cannot find the matrix to test. Try running some test of yours.<br>
> > > >><br>
> > > >>   Thanks,<br>
> > > >><br>
> > > >>      Matt<br>
> > > >><br>
> > > >><br>
> > > >>> # [0]PETSC ERROR: See<br>
> > > >>> <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble<br>
> > > >>> shooting.<br>
> > > >>> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> > > >>> # [0]PETSC ERROR: ../ex72 on a linux-opt named MB108SMEC028 by vit<br>
> > Sun<br>
> > > >>> Sep  3 11:51:03 2023<br>
> > > >>> # [0]PETSC ERROR: Configure options<br>
> > > >>> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> > > >>> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> > > >>> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> > > >>> # [0]PETSC ERROR: #1 PetscViewerFileSetUp_BinarySTDIO() line 1444 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/binary/binv.c<br>
> > > >>> # [0]PETSC ERROR: #2 PetscViewerSetUp_Binary() line 1511 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/impls/binary/binv.c<br>
> > > >>> # [0]PETSC ERROR: #3 PetscViewerSetUp() line 328 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/sys/classes/viewer/interface/view.c<br>
> > > >>> # [0]PETSC ERROR: #4 MatLoad_SeqAIJ() line 4563 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/mat/impls/aij/seq/aij.c<br>
> > > >>> # [0]PETSC ERROR: #5 MatLoad() line 1225 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/mat/interface/matrix.c<br>
> > > >>> # [0]PETSC ERROR: #6 main() line 113 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/ksp/ksp/tutorials/ex72.c<br>
> > > >>> # [0]PETSC ERROR: PETSc Option Table entries:<br>
> > > >>> # [0]PETSC ERROR: -f0 /matrices/arco1<br>
> > > >>> # [0]PETSC ERROR: -pc_factor_mat_solver_type matlab<br>
> > > >>> # [0]PETSC ERROR: -pc_type lu<br>
> > > >>> # [0]PETSC ERROR: ----------------End of Error Message -------send<br>
> > > >>> entire error message to petsc-maint@mcs.anl.gov----------<br>
> > > >>> #<br>
> > > >>><br>
> > --------------------------------------------------------------------------<br>
> > > >>> # MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_SELF<br>
> > > >>> # with errorcode 113065.<br>
> > > >>> #<br>
> > > >>> # NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
> > > >>> # You may or may not see output from other processes, depending on<br>
> > > >>> # exactly when Open MPI kills them.<br>
> > > >>> #<br>
> > > >>><br>
> > --------------------------------------------------------------------------<br>
> > > >>>  ok ksp_ksp_tutorials-ex72_12 # SKIP Command failed so no diff<br>
> > > >>>           CC<br>
> > > >>> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o<br>
> > > >>>      CLINKER<br>
> > > >>> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test<br>
> > > >>>         TEST<br>
> > > >>><br>
> > linux-opt/tests/counts/tao_leastsquares_tutorials_matlab-matlab_ls_test.counts<br>
> > > >>> not ok tao_leastsquares_tutorials_matlab-matlab_ls_test # Error<br>
> > code: 124<br>
> > > >>> # Running problem 5<br>
> > > >>> # [0]PETSC ERROR: --------------------- Error Message<br>
> > > >>> --------------------------------------------------------------<br>
> > > >>> # [0]PETSC ERROR: Error in external library<br>
> > > >>> # [0]PETSC ERROR: Unable to start MATLAB engine on<br>
> > > >>> # [0]PETSC ERROR: See<br>
> > > >>> <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble<br>
> > > >>> shooting.<br>
> > > >>> # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> > > >>> # [0]PETSC ERROR: ../matlab_ls_test on a linux-opt named<br>
> > MB108SMEC028 by<br>
> > > >>> vit Sun Sep  3 11:51:05 2023<br>
> > > >>> # [0]PETSC ERROR: Configure options<br>
> > > >>> --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> > > >>> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt --with-debugging=0<br>
> > > >>> --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> > > >>> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> > > >>> # [0]PETSC ERROR: #1 PetscMatlabEngineCreate() line 67 in<br>
> > > >>> /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> > > >>> # [0]PETSC ERROR: #2 main() line 126 in<br>
> > > >>><br>
> > /home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c<br>
> > > >>> # [0]PETSC ERROR: PETSc Option Table entries:<br>
> > > >>> # [0]PETSC ERROR: -prob_id 5<br>
> > > >>> # [0]PETSC ERROR: -tao_smonitor<br>
> > > >>> # [0]PETSC ERROR: ----------------End of Error Message -------send<br>
> > > >>> entire error message to petsc-maint@mcs.anl.gov----------<br>
> > > >>> #<br>
> > > >>><br>
> > --------------------------------------------------------------------------<br>
> > > >>> # MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_SELF<br>
> > > >>> # with errorcode 126076.<br>
> > > >>> #<br>
> > > >>> # NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>
> > > >>> # You may or may not see output from other processes, depending on<br>
> > > >>> # exactly when Open MPI kills them.<br>
> > > >>> #<br>
> > > >>><br>
> > --------------------------------------------------------------------------<br>
> > > >>>  ok tao_leastsquares_tutorials_matlab-matlab_ls_test # SKIP Command<br>
> > > >>> failed so no diff<br>
> > > >>><br>
> > > >>> # -------------<br>
> > > >>> #   Summary<br>
> > > >>> # -------------<br>
> > > >>> # FAILED ksp_ksp_tutorials-ex72_12<br>
> > > >>> tao_leastsquares_tutorials_matlab-matlab_ls_test<br>
> > > >>> # success 0/2 tests (0.0%)<br>
> > > >>> # failed 2/2 tests (100.0%)<br>
> > > >>> # todo 0/2 tests (0.0%)<br>
> > > >>> # skip 0/2 tests (0.0%)<br>
> > > >>> #<br>
> > > >>> # Wall clock time for tests: 3 sec<br>
> > > >>> # Approximate CPU time (not incl. build time): 0.05 sec<br>
> > > >>> #<br>
> > > >>> # To rerun failed tests:<br>
> > > >>> #     /usr/bin/make -f gmakefile test test-fail=1<br>
> > > >>> #<br>
> > > >>> # Timing summary (actual test time / total CPU time):<br>
> > > >>> #   ksp_ksp_tutorials-ex72_12: 0.02 sec / 0.03 sec<br>
> > > >>> #   tao_leastsquares_tutorials_matlab-matlab_ls_test: 0.02 sec /<br>
> > 0.02 sec<br>
> > > >>><br>
> > > >>> *How to sort out this error?*<br>
> > > >>><br>
> > > >>> *$cd src/tao/leastsquares/tutorials/matlab/*<br>
> > > >>> *$make matlab_ls_test*<br>
> > > >>> /home/vit/sfw/linux/openmpi/4.1.4/bin/mpicc -fPIC -Wall<br>
> > -Wwrite-strings<br>
> > > >>> -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector<br>
> > > >>> -fvisibility=hidden -O3 -fPIC -Wall -Wwrite-strings<br>
> > -Wno-strict-aliasing<br>
> > > >>> -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>  -I/home/vit/sfw/petsc/3.13.4/include<br>
> > > >>> -I/home/vit/sfw/petsc/3.13.4/linux-opt/include<br>
> > > >>> -I/usr/local/MATLAB/R2020b/extern/include<br>
> > > >>> -I/home/vit/sfw/linux/openmpi/4.1.4/include      matlab_ls_test.c<br>
> > > >>>  -Wl,-rpath,/home/vit/sfw/petsc/3.13.4/linux-opt/lib<br>
> > > >>> -L/home/vit/sfw/petsc/3.13.4/linux-opt/lib<br>
> > > >>> /usr/local/MATLAB/R2020b/bin/glnxa64/mkl.so<br>
> > > >>> -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/sys/os/glnxa64<br>
> > > >>><br>
> > -Wl,-rpath,/usr/local/MATLAB/R2020b/sys/os/glnxa64:/usr/local/MATLAB/R2020b/bin/glnxa64:/usr/local/MATLAB/R2020b/extern/lib/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/bin/glnxa64<br>
> > > >>> -L/usr/local/MATLAB/R2020b/extern/lib/glnxa64<br>
> > > >>> -Wl,-rpath,/home/vit/sfw/linux/openmpi/4.1.4/lib<br>
> > > >>> -L/home/vit/sfw/linux/openmpi/4.1.4/lib<br>
> > > >>> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/9<br>
> > > >>> -L/usr/lib/gcc/x86_64-linux-gnu/9<br>
> > -Wl,-rpath,/usr/lib/x86_64-linux-gnu<br>
> > > >>> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu<br>
> > > >>> -L/lib/x86_64-linux-gnu -lpetsc -liomp5 -lpthread -lm -leng -lmex<br>
> > -lmx<br>
> > > >>> -lmat -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr<br>
> > -lmpi_mpifh<br>
> > > >>> -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread<br>
> > -lquadmath<br>
> > > >>> -lstdc++ -ldl -o matlab_ls_test<br>
> > > >>><br>
> > > >>> I think there is a problem with the Matlab-R2020b version.<br>
> > > >>> I am sharing the configure.log and make.log files. Please find the<br>
> > > >>> attachment and do the needful.<br>
> > > >>><br>
> > > >>><br>
> > > >>> Thanks and regards<br>
> > > >>> Srinivas<br>
> > > >>><br>
> > > >>><br>
> > > >>> On Sat, Sep 2, 2023 at 11:15 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank" rel="noreferrer">balay@mcs.anl.gov</a>><br>
> > wrote:<br>
> > > >>><br>
> > > >>>> Perhaps you can try the following to get additional info - and debug<br>
> > > >>>><br>
> > > >>>> Satish<br>
> > > >>>> ----------<br>
> > > >>>><br>
> > > >>>> balay@compute-386-07:/scratch/balay/petsc$ cd<br>
> > > >>>> src/tao/leastsquares/tutorials/matlab/<br>
> > > >>>> balay@compute-386-07<br>
> > :/scratch/balay/petsc/src/tao/leastsquares/tutorials/matlab$<br>
> > > >>>> make matlab_ls_test<br>
> > > >>>> /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpicc -fPIC<br>
> > -Wall<br>
> > > >>>> -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > -fstack-protector<br>
> > > >>>> -fvisibility=hidden -O3 -fPIC -Wall -Wwrite-strings<br>
> > -Wno-strict-aliasing<br>
> > > >>>> -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>> -I/scratch/balay/petsc/include<br>
> > -I/scratch/balay/petsc/linux-opt/include<br>
> > > >>>><br>
> > -I/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/include<br>
> > > >>>> -I/nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/include<br>
> > > >>>> matlab_ls_test.c  -Wl,-rpath,/scratch/balay/petsc/linux-opt/lib<br>
> > > >>>> -L/scratch/balay/petsc/linux-opt/lib<br>
> > > >>>><br>
> > -Wl,-rpath,/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64:/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/glnxa64:/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/lib/glnxa64<br>
> > > >>>><br>
> > -L/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/glnxa64<br>
> > > >>>><br>
> > -L/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/lib/glnxa64<br>
> > > >>>> -Wl,-rpath,/nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/lib<br>
> > > >>>> -L/nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/lib<br>
> > > >>>> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/9<br>
> > > >>>> -L/usr/lib/gcc/x86_64-linux-gnu/9<br>
> > -Wl,-rpath,/usr/lib/x86_64-linux-gnu<br>
> > > >>>> -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu<br>
> > > >>>> -L/lib/x86_64-linux-gnu -lpetsc -llapack -lblas -lpthread -lm -leng<br>
> > -lmex<br>
> > > >>>> -lmx -lmat -lut -licudata -licui18n -licuuc -lstdc++ -ldl -lmpifort<br>
> > -lmpi<br>
> > > >>>> -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lstdc++ -ldl -o<br>
> > > >>>> matlab_ls_test<br>
> > > >>>> balay@compute-386-07<br>
> > :/scratch/balay/petsc/src/tao/leastsquares/tutorials/matlab$<br>
> > > >>>> LD_PRELOAD=/lib/x86_64-linux-gnu/libgfortran.so.5 ./matlab_ls_test<br>
> > > >>>> -tao_smonitor -prob_id 5 -info<br>
> > > >>>> [0] PetscInitialize(): PETSc successfully started: number of<br>
> > processors<br>
> > > >>>> = 1<br>
> > > >>>> [0] PetscGetHostName(): Rejecting domainname, likely is NIS<br>
> > > >>>> compute-386-07.(none)<br>
> > > >>>> [0] PetscInitialize(): Running on machine: compute-386-07<br>
> > > >>>> Running problem 5<br>
> > > >>>> [0] PetscCommDuplicate(): Duplicating a communicator 1140850689<br>
> > > >>>> -2080374784 max tags = 268435455<br>
> > > >>>> [0] PetscMatlabEngineCreate(): Starting MATLAB engine with command<br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/matlab<br>
> > > >>>> -glnxa64 -nodisplay  -nosplash<br>
> > > >>>> [0] PetscMatlabEngineCreate(): Started MATLAB engine<br>
> > > >>>> [0] PetscMatlabEngineEvaluate(): Evaluating MATLAB string:<br>
> > > >>>> TestingInitialize<br>
> > > >>>> [0] PetscMatlabEngineEvaluate(): Done evaluating Matlab string:<br>
> > > >>>> TestingInitialize<br>
> > > >>>> 5<br>
> > > >>>> <snip><br>
> > > >>>><br>
> > > >>>> <<<< Now verify if the above matlab command actually works for you<br>
> > - on<br>
> > > >>>> this machine..>>>>><br>
> > > >>>><br>
> > > >>>> balay@compute-386-07<br>
> > :/scratch/balay/petsc/src/tao/leastsquares/tutorials/matlab$<br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/matlab<br>
> > > >>>> -glnxa64 -nodisplay  -nosplash<br>
> > > >>>><br>
> > > >>>><br>
> > > >>>>                                    < M A T L A B (R) ><br>
> > > >>>><br>
> > > >>>>                          Copyright 1984-2021 The MathWorks, Inc.<br>
> > > >>>><br>
> > > >>>>                          R2021a (9.10.0.1602886) 64-bit (glnxa64)<br>
> > > >>>><br>
> > > >>>>                                     February 17, 2021<br>
> > > >>>><br>
> > > >>>><br>
> > > >>>> To get started, type doc.<br>
> > > >>>> For product information, visit <a href="http://www.mathworks.com/" rel="noreferrer noreferrer" target="_blank">www.mathworks.com</a>.<br>
> > > >>>><br>
> > > >>>> >><br>
> > > >>>><br>
> > > >>>><br>
> > > >>>> On Sat, 2 Sep 2023, Satish Balay via petsc-users wrote:<br>
> > > >>>><br>
> > > >>>> > Please don't cc: both petsc-users and petsc-maint [reverting<br>
> > thread<br>
> > > >>>> to petsc-users only]<br>
> > > >>>> ><br>
> > > >>>> > I'm not sure what is happening here. Can you send the<br>
> > corresponding<br>
> > > >>>> configure.log, make.log [compressed]?<br>
> > > >>>> ><br>
> > > >>>> > Here is my attempt to reproduce (with petsc-3.13) on Ubuntu-20.04,<br>
> > > >>>> with Matlab-R2021a - and that works:<br>
> > > >>>> ><br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ git branch<br>
> > > >>>> >   main<br>
> > > >>>> >   release<br>
> > > >>>> > * release-3.13<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ module load<br>
> > matlab/R2021a<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ which matlab<br>
> > > >>>> ><br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/matlab<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ ./configure<br>
> > > >>>> --with-mpi-dir=/nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/<br>
> > > >>>> COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt<br>
> > > >>>> --with-debugging=0 --with-x=0<br>
> > > >>>><br>
> > --with-matlab-dir=/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a<br>
> > > >>>><br>
> > --with-blaslapack-dir=/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a<br>
> > > >>>> --known-64-bit-blas-indices=1 --with-matlab-engine=1<br>
> > > >>>> > <snip><br>
> > > >>>> > Compilers:<br>
> > > >>>><br>
> > > >>>><br>
> > > >>>><br>
> > > >>>> >   C Compiler:<br>
> > > >>>>  /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpicc  -fPIC<br>
> > -Wall<br>
> > > >>>> -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > -fstack-protector<br>
> > > >>>> -fvisibility=hidden -O3<br>
> > > >>>> >     Version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>
> > > >>>> >   C++ Compiler:<br>
> > > >>>>  /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpicxx  -Wall<br>
> > > >>>> -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > -fstack-protector<br>
> > > >>>> -fvisibility=hidden -O3  -fPIC<br>
> > > >>>> >     Version: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>
> > > >>>> >   Fortran Compiler:<br>
> > > >>>>  /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpif90  -fPIC<br>
> > -Wall<br>
> > > >>>> -ffree-line-length-0 -Wno-unused-dummy-argument -O3<br>
> > > >>>> >     Version: GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0<br>
> > > >>>> > Linkers:<br>
> > > >>>> >   Shared linker:<br>
> > > >>>>  /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpicc<br>
> > -shared  -fPIC<br>
> > > >>>> -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > > >>>> -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>> >   Dynamic linker:<br>
> > > >>>>  /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpicc<br>
> > -shared  -fPIC<br>
> > > >>>> -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas<br>
> > > >>>> -fstack-protector -fvisibility=hidden -O3<br>
> > > >>>> >   Libraries linked against:   -lquadmath -lstdc++ -ldl<br>
> > > >>>> > make:<br>
> > > >>>> >   Version:  4.2<br>
> > > >>>> >   /usr/bin/make<br>
> > > >>>> > BlasLapack:<br>
> > > >>>> >   Library:<br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/glnxa64/mkl.so<br>
> > > >>>><br>
> > -Wl,-rpath,/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64<br>
> > > >>>><br>
> > -L/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64<br>
> > > >>>> -liomp5 -lpthread<br>
> > > >>>> >   uses OpenMP; use export OMP_NUM_THREADS=<p> or -omp_num_threads<br>
> > <p><br>
> > > >>>> to control the number of threads<br>
> > > >>>> >   uses 8 byte integers<br>
> > > >>>> > MPI:<br>
> > > >>>> >   Version:  4<br>
> > > >>>> >   Includes:<br>
> > -I/nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/include<br>
> > > >>>> >   Mpiexec:<br>
> > /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/bin/mpiexec<br>
> > > >>>> >   MPICH_NUMVERSION: 40002300<br>
> > > >>>> > pthread:<br>
> > > >>>> >   Library:  -lpthread<br>
> > > >>>> > cmake:<br>
> > > >>>> >   Version:  3.16.3<br>
> > > >>>> >   /usr/bin/cmake<br>
> > > >>>> > regex:<br>
> > > >>>> > Matlab:<br>
> > > >>>> >   Includes:<br>
> > > >>>><br>
> > -I/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/include<br>
> > > >>>> >   /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a<br>
> > > >>>> > MatlabEngine:<br>
> > > >>>> >   Library:<br>
> > > >>>><br>
> > -Wl,-rpath,/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64:/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/glnxa64:/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/lib/glnxa64<br>
> > > >>>><br>
> > -L/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/bin/glnxa64<br>
> > > >>>><br>
> > -L/nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/extern/lib/glnxa64<br>
> > > >>>> -leng -lmex -lmx -lmat -lut -licudata -licui18n -licuuc<br>
> > > >>>> > sowing:<br>
> > > >>>> >   Version:  1.1.25<br>
> > > >>>> >   /scratch/balay/petsc/linux-opt/bin/bfort<br>
> > > >>>> > valgrind:<br>
> > > >>>> >   Language used to compile PETSc: C<br>
> > > >>>> > PETSc:<br>
> > > >>>> >   PETSC_ARCH: linux-opt<br>
> > > >>>> >   PETSC_DIR: /scratch/balay/petsc<br>
> > > >>>> >   Scalar type: real<br>
> > > >>>> >   Precision: double<br>
> > > >>>> >   Support for __float128<br>
> > > >>>> >   Integer size: 4 bytes<br>
> > > >>>> >   shared libraries: enabled<br>
> > > >>>> >   Memory alignment from malloc(): 16 bytes<br>
> > > >>>> ><br>
> > > >>>><br>
> > xxx=========================================================================xxx<br>
> > > >>>> >  Configure stage complete. Now build PETSc libraries with:<br>
> > > >>>> >    make PETSC_DIR=/scratch/balay/petsc PETSC_ARCH=linux-opt all<br>
> > > >>>> ><br>
> > > >>>><br>
> > xxx=========================================================================xxx<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ make<br>
> > > >>>><br>
> > > >>>><br>
> > > >>>><br>
> > > >>>> ><br>
> > > >>>> > <snip><br>
> > > >>>> >           FC linux-opt/obj/tao/f90-mod/petsctaomod.o<br>
> > > >>>> >      CLINKER linux-opt/lib/libpetsc.so.3.13.6<br>
> > > >>>> > BEGINNING TO COMPILE MATLAB INTERFACE<br>
> > > >>>> > Building with 'gcc'.<br>
> > > >>>> ><br>
> > > >>>><br>
> > /scratch/balay/petsc/src/sys/classes/viewer/impls/socket/matlab/bread.c: In<br>
> > > >>>> function ‘PetscBinaryWrite’:<br>
> > > >>>> ><br>
> > > >>>><br>
> > /scratch/balay/petsc/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> > > >>>> warning: ‘err’ may be used uninitialized in this function<br>
> > > >>>> [-Wmaybe-uninitialized]<br>
> > > >>>> >   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to<br>
> > socket\n");<br>
> > > >>>> >       |      ^<br>
> > > >>>> ><br>
> > > >>>> > MEX completed successfully.<br>
> > > >>>> > Building with 'gcc'.<br>
> > > >>>> > MEX completed successfully.<br>
> > > >>>> > Building with 'gcc'.<br>
> > > >>>> > MEX completed successfully.<br>
> > > >>>> > Building with 'gcc'.<br>
> > > >>>> ><br>
> > > >>>><br>
> > /scratch/balay/petsc/src/sys/classes/viewer/impls/socket/matlab/bread.c: In<br>
> > > >>>> function ‘PetscBinaryWrite’:<br>
> > > >>>> ><br>
> > > >>>><br>
> > /scratch/balay/petsc/src/sys/classes/viewer/impls/socket/matlab/bread.c:167:6:<br>
> > > >>>> warning: ‘err’ may be used uninitialized in this function<br>
> > > >>>> [-Wmaybe-uninitialized]<br>
> > > >>>> >   167 |   if (err < 0) PETSC_MEX_ERROR("Error writing to<br>
> > socket\n");<br>
> > > >>>> >       |      ^<br>
> > > >>>> ><br>
> > > >>>> > MEX completed successfully.<br>
> > > >>>> > =========================================<br>
> > > >>>> > Now to check if the libraries are working do:<br>
> > > >>>> > make PETSC_DIR=/scratch/balay/petsc PETSC_ARCH=linux-opt check<br>
> > > >>>> > =========================================<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$ make test<br>
> > query=requires<br>
> > > >>>> queryval=matlab<br>
> > > >>>> > Using MAKEFLAGS: -- queryval=matlab query=requires<br>
> > > >>>> >           CC linux-opt/tests/ksp/ksp/tutorials/ex72.o<br>
> > > >>>> >      CLINKER linux-opt/tests/ksp/ksp/tutorials/ex72<br>
> > > >>>> >         TEST<br>
> > linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>
> > > >>>> > not ok ksp_ksp_tutorials-ex72_12 # Error code: 1<br>
> > > >>>> > #     ../ex72:<br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64/libgfortran.so.5:<br>
> > > >>>> version `GFORTRAN_9' not found (required by<br>
> > > >>>><br>
> > /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/lib/libmpifort.so.12)<br>
> > > >>>> >  ok ksp_ksp_tutorials-ex72_12 # SKIP Command failed so no diff<br>
> > > >>>> >           CC<br>
> > > >>>> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o<br>
> > > >>>> >      CLINKER<br>
> > > >>>> linux-opt/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test<br>
> > > >>>> >         TEST<br>
> > > >>>><br>
> > linux-opt/tests/counts/tao_leastsquares_tutorials_matlab-matlab_ls_test.counts<br>
> > > >>>> > not ok tao_leastsquares_tutorials_matlab-matlab_ls_test # Error<br>
> > code:<br>
> > > >>>> 1<br>
> > > >>>> > #     ../matlab_ls_test:<br>
> > > >>>><br>
> > /nfs/gce/software/custom/linux-ubuntu20.04-x86_64/matlab/R2021a/sys/os/glnxa64/libgfortran.so.5:<br>
> > > >>>> version `GFORTRAN_9' not found (required by<br>
> > > >>>><br>
> > /nfs/gce/projects/petsc/soft/u20.04/mpich-4.0.2/lib/libmpifort.so.12)<br>
> > > >>>> >  ok tao_leastsquares_tutorials_matlab-matlab_ls_test # SKIP<br>
> > Command<br>
> > > >>>> failed so no diff<br>
> > > >>>> > <snip><br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$<br>
> > > >>>> LD_PRELOAD=/lib/x86_64-linux-gnu/libgfortran.so.5 make test<br>
> > query=requires<br>
> > > >>>> queryval=matlab<br>
> > > >>>> > Using MAKEFLAGS: -- queryval=matlab query=requires<br>
> > > >>>> >         TEST<br>
> > linux-opt/tests/counts/ksp_ksp_tutorials-ex72_12.counts<br>
> > > >>>> >  ok ksp_ksp_tutorials-ex72_12<br>
> > > >>>> >  ok diff-ksp_ksp_tutorials-ex72_12<br>
> > > >>>> >         TEST<br>
> > > >>>><br>
> > linux-opt/tests/counts/tao_leastsquares_tutorials_matlab-matlab_ls_test.counts<br>
> > > >>>> >  ok tao_leastsquares_tutorials_matlab-matlab_ls_test<br>
> > > >>>> >  ok diff-tao_leastsquares_tutorials_matlab-matlab_ls_test<br>
> > > >>>> ><br>
> > > >>>> > # -------------<br>
> > > >>>> > #   Summary<br>
> > > >>>> > # -------------<br>
> > > >>>> > # success 4/4 tests (100.0%)<br>
> > > >>>> > # failed 0/4 tests (0.0%)<br>
> > > >>>> > # todo 0/4 tests (0.0%)<br>
> > > >>>> > # skip 0/4 tests (0.0%)<br>
> > > >>>> > #<br>
> > > >>>> > # Wall clock time for tests: 27 sec<br>
> > > >>>> > # Approximate CPU time (not incl. build time): 15.190000000000001<br>
> > sec<br>
> > > >>>> > #<br>
> > > >>>> > # Timing summary (actual test time / total CPU time):<br>
> > > >>>> > #   tao_leastsquares_tutorials_matlab-matlab_ls_test: 6.47 sec /<br>
> > 7.54<br>
> > > >>>> sec<br>
> > > >>>> > #   ksp_ksp_tutorials-ex72_12: 6.46 sec / 7.65 sec<br>
> > > >>>> > balay@compute-386-07:/scratch/balay/petsc$<br>
> > > >>>> ><br>
> > > >>>> ><br>
> > > >>>> ><br>
> > > >>>> ><br>
> > > >>>> ><br>
> > > >>>> > On Sat, 2 Sep 2023, INTURU SRINIVAS 20PHD0548 wrote:<br>
> > > >>>> ><br>
> > > >>>> > > Based on the suggestions given by Sathish, I have tried to<br>
> > > >>>> configure petsc<br>
> > > >>>> > > 3.13.4 with Matlab-R2020b. But, it was not successful. After<br>
> > > >>>> running make<br>
> > > >>>> > > -j 10 test command I have got the following error message.<br>
> > > >>>> > ><br>
> > > >>>> > > not ok tao_leastsquares_tutorials_matlab-matlab_ls_test # Error<br>
> > > >>>> code: 124<br>
> > > >>>> > > # Running problem 5<br>
> > > >>>> > > # [0]PETSC ERROR: --------------------- Error Message<br>
> > > >>>> > > --------------------------------------------------------------<br>
> > > >>>> > > # [0]PETSC ERROR: Error in external library<br>
> > > >>>> > > # [0]PETSC ERROR: Unable to start MATLAB engine on<br>
> > > >>>> > > # [0]PETSC ERROR: See<br>
> > > >>>> <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
> > > >>>> > > for trouble shooting.<br>
> > > >>>> > > # [0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020<br>
> > > >>>> > > # [0]PETSC ERROR: ../matlab_ls_test on a linux-opt named<br>
> > > >>>> MB108SMEC028 by<br>
> > > >>>> > > vit Sat Sep  2 12:27:22 2023<br>
> > > >>>> > > # [0]PETSC ERROR: Configure options<br>
> > > >>>> > > --with-mpi-dir=/home/vit/sfw/linux/openmpi/4.1.4 COPTFLAGS=-O3<br>
> > > >>>> > > CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 PETSC_ARCH=linux-opt<br>
> > > >>>> --with-debugging=0<br>
> > > >>>> > > --with-x=0 --with-matlab-dir=/usr/local/MATLAB/R2020b<br>
> > > >>>> > > --with-matlab-engine=1<br>
> > > >>>> --with-blaslapack-dir=/usr/local/MATLAB/R2020b<br>
> > > >>>> > > --known-64-bit-blas-indices=1<br>
> > > >>>> > > # [0]PETSC ERROR: #1 PetscMatlabEngineCreate() line 67 in<br>
> > > >>>> > > /home/vit/sfw/petsc/3.13.4/src/sys/classes/matlabengine/matlab.c<br>
> > > >>>> > > # [0]PETSC ERROR: #2 main() line 126 in<br>
> > > >>>> > ><br>
> > > >>>><br>
> > /home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c<br>
> > > >>>> > > # [0]PETSC ERROR: PETSc Option Table entries:<br>
> > > >>>> > > # [0]PETSC ERROR: -prob_id 5<br>
> > > >>>> ></blockquote></div></blockquote></div></blockquote></div></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></blockquote></div></blockquote></div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div>

<br>
<i><span><b>Disclaimer:</b><br>This message was sent from Vellore Institute of Technology.  The contents of this email may contain legally protected confidential or privileged information of “Vellore Institute of Technology”.  If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. If you have received this email in error, please promptly notify the sender by reply email and delete the original email and any backup copies without reading them.</span></i><br>