<div dir="ltr"><div>Hello,</div><div><br></div><div>I want to build PETSc with MATLAB for working on the simulation using IBAMR open software. While building the PETSc, using the following </div><div>
<div class="gmail-Dyb9Ge" aria-hidden="true"><div class="gmail-tGPUJe"><div class="gmail-xPx9xc gmail-Ajdkue"></div></div></div><div class="gmail-ptW7te" role="region" aria-labelledby="c122"><br><div>export PETSC_DIR=$PWD<br>export PETSC_ARCH=linux-debug<br>./configure \<br>  --CC=$HOME/sfw/linux/openmpi/4.1.4/bin/mpicc \<br>  --CXX=$HOME/sfw/linux/openmpi/4.1.4/bin/mpicxx \<br>  --FC=$HOME/sfw/linux/openmpi/4.1.4/bin/mpif90 \<br>  --with-debugging=1 \<br>  --download-hypre=1 \<br>  --download-fblaslapack=1 \<br>  --with-x=0 \<br>  --with-matlab-dir=/usr/local/MATLAB/R2020b/ <br>  --with-matlab-engine=1 <br>  --with-matlab-engine-dir=/usr/local/MATLAB/R2020b/extern/engines/</div><div><br></div><div>make -j4 <br></div><div>make -j4 test</div><div class="gmail-DTXlsb"><div><br></div><div>I got the following error</div></div><div>CLINKER linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test<br>/usr/bin/ld: linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o: in function `EvaluateResidual':<br>/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:32:
 undefined reference to `PetscMatlabEnginePut'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:33:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:35:
 undefined reference to `PetscMatlabEngineGet'<br>/usr/bin/ld: linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o: in function `EvaluateJacobian':<br>/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:46:
 undefined reference to `PetscMatlabEnginePut'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:47:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:49:
 undefined reference to `PetscMatlabEngineGet'<br>/usr/bin/ld: linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o: in function `TaoPounders':<br>/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:75:
 undefined reference to `PetscMatlabEngineGet'<br>/usr/bin/ld: linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test.o: in function `main':<br>/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:126:
 undefined reference to `PetscMatlabEngineCreate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:127:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:139:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:140:
 undefined reference to `PetscMatlabEngineGetArray'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:142:
 undefined reference to `PetscMatlabEngineGetArray'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:144:
 undefined reference to `PetscMatlabEngineGetArray'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:146:
 undefined reference to `PetscMatlabEngineGetArray'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:148:
 undefined reference to `PetscMatlabEngineGetArray'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:154:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:157:
 undefined reference to `PetscMatlabEngineEvaluate'<br>/usr/bin/ld: 
/home/vit/sfw/petsc/3.13.4/src/tao/leastsquares/tutorials/matlab/matlab_ls_test.c:158:
 undefined reference to `PetscMatlabEngineDestroy'</div><div class="gmail-DTXlsb"><div><br>collect2: error: ld returned 1 exit status<br></div></div><div>make: *** [gmakefile.test:185: linux-debug/tests/tao/leastsquares/tutorials/matlab/matlab_ls_test] Error 1<br>make: *** Waiting for unfinished jobs....</div></div>  <br></div><div>Please help me to solve this issue</div><div><br></div><div>Thank you</div><div>Srinivas<br></div><div><br></div></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>