<div dir="ltr">Dear concerns,<div><br></div><div>I met such issues when I  confirm that my Matlab installation is finished. I am also sure that the g++ version is given. Could you please check this problem for me?  The related information is given as follows. </div><div><br></div><div>Looking forward to hearing from you</div><div>Best regards</div><div>Xiang</div><div><div><br></div><div>>> mex -setup cpp<br>MEX configured to use 'g++' for C++ language compilation.<br></div><div>.........................................................................................................<br><div>[ADS+u2192020@cos8-25136ecf ~]$ g++ --version<br>g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13)<br>Copyright (C) 2018 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions.  There is NO<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br></div><div>.............................................................................................................</div><div>export PETSC_DIR=$PWD<br>export PETSC_ARCH=linux-debug<br>./configure \<br>  --CC=$HOME/sfw/linux/openmpi-4.0.2/bin/mpicc \<br>  --CXX=$HOME/sfw/linux/openmpi-4.0.2/bin/mpicxx \<br>  --FC=$HOME/sfw/linux/openmpi-4.0.2/bin/mpif90 \<br>  --with-debugging=1 \<br>  --download-hypre=1 \<br>  --download-fblaslapack=1 \<br>  --with-x=0\<br>  --with-matlab-dir=/home/ADS/u2192020/Matlab2022/ \<br>  --with-matlab-engine=1 \<br>  --with-matlab-engine-dir=/home/ADS/u2192020/Matlab2022/extern/engines/<br></div><div>=========================================<br>=========================================<br>Now to check if the libraries are working do:<br>make PETSC_DIR=/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB PETSC_ARCH=linux-debug check<br>=========================================<br>[ADS+u2192020@cos8-25136ecf PETSc-MATLAB]$ make -j4 check<br>Running check examples to verify correct installation<br>Using PETSC_DIR=/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB and PETSC_ARCH=linux-debug<br>gmake[3]: [/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/lib/petsc/conf/rules:320: ex19.PETSc] Error 2 (ignored)<br>*******************Error detected during compile or link!*******************<br>See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/src/snes/tutorials ex19<br>*********************************************************************************<br>/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/bin/mpicc -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -g3 -O0  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -g3 -O0    -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/include -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/include -I/home/ADS/u2192020/Matlab2022/extern/include     ex19.c  -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/Matlab2022/bin/glnxa64 -L/home/ADS/u2192020/Matlab2022/bin/glnxa64 -Wl,-rpath,/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -L/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -Wl,-rpath,/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -L/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8 -lpetsc -lHYPRE -lflapack -lfblas -lm -leng -lmex -lmx -lmat -lmwm_dispatcher -lmwopcmodel -lmwservices -lmwopcmodel -lmwm_dispatcher -lmwmpath -lmwopcmodel -lmwservices -lmwopcmodel -lmwservices -lxerces-c -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lquadmath -lstdc++ -ldl -o ex19<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwopccore.so: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwfoundation_matlabdata_matlab.so: undefined reference to `std::logic_error::logic_error(std::logic_error&&)@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmex.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmx.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'<br>collect2: error: ld returned 1 exit status<br>gmake[4]: *** [<builtin>: ex19] Error 1<br>1,5c1,10<br>< lid velocity = 0.0016, prandtl # = 1., grashof # = 1.<br><   0 SNES Function norm 0.0406612 <br><   1 SNES Function norm 4.12227e-06 <br><   2 SNES Function norm 6.098e-11 <br>< Number of SNES iterations = 2<br>---<br>> --------------------------------------------------------------------------<br>> mpiexec was unable to launch the specified application as it could not access<br>> or execute an executable:<br>> <br>> Executable: ./ex19<br>> Node: cos8-25136ecf<br>> <br>> while attempting to start process rank 0.<br>> --------------------------------------------------------------------------<br>> 2 total processes failed to start<br>/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/src/snes/tutorials<br>Possible problem with ex19 running with hypre, diffs above<br>=========================================<br>gmake[3]: [/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/lib/petsc/conf/rules:374: ex5f.PETSc] Error 2 (ignored)<br>*******************Error detected during compile or link!*******************<br>See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/src/snes/tutorials ex5f<br>*********************************************************<br>/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/bin/mpif90 -fPIC -Wall -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -g -O0   -fPIC -Wall -ffree-line-length-0 -Wno-lto-type-mismatch -Wno-unused-dummy-argument -g -O0    -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/include -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/include -I/home/ADS/u2192020/Matlab2022/extern/include     ex5f.F90  -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/Matlab2022/bin/glnxa64 -L/home/ADS/u2192020/Matlab2022/bin/glnxa64 -Wl,-rpath,/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -L/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -Wl,-rpath,/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -L/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8 -lpetsc -lHYPRE -lflapack -lfblas -lm -leng -lmex -lmx -lmat -lmwm_dispatcher -lmwopcmodel -lmwservices -lmwopcmodel -lmwm_dispatcher -lmwmpath -lmwopcmodel -lmwservices -lmwopcmodel -lmwservices -lxerces-c -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lquadmath -lstdc++ -ldl -o ex5f<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwopccore.so: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwfoundation_matlabdata_matlab.so: undefined reference to `std::logic_error::logic_error(std::logic_error&&)@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmex.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmx.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'<br>collect2: error: ld returned 1 exit status<br>gmake[4]: *** [/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/lib/petsc/conf/test:43: ex5f] Error 1<br>gmake[3]: [/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/lib/petsc/conf/rules:320: ex31.PETSc] Error 2 (ignored)<br>*******************Error detected during compile or link!*******************<br>See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/src/vec/vec/tutorials ex31<br>*********************************************************************************<br>/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/bin/mpicc -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -g3 -O0  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas -Wno-lto-type-mismatch -fstack-protector -fvisibility=hidden -g3 -O0    -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/include -I/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/include -I/home/ADS/u2192020/Matlab2022/extern/include     ex31.c  -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -L/home/ADS/u2192020/sfw/petsc/PETSc-MATLAB/linux-debug/lib -Wl,-rpath,/home/ADS/u2192020/Matlab2022/bin/glnxa64 -L/home/ADS/u2192020/Matlab2022/bin/glnxa64 -Wl,-rpath,/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -L/home/ADS/u2192020/Matlab2022/extern/lib/glnxa64 -Wl,-rpath,/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -L/home/ADS/u2192020/sfw/linux/openmpi-4.0.2/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8 -lpetsc -lHYPRE -lflapack -lfblas -lm -leng -lmex -lmx -lmat -lmwm_dispatcher -lmwopcmodel -lmwservices -lmwopcmodel -lmwm_dispatcher -lmwmpath -lmwopcmodel -lmwservices -lmwopcmodel -lmwservices -lxerces-c -lstdc++ -ldl -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lgfortran -lm -lgfortran -lm -lgcc_s -lquadmath -lpthread -lquadmath -lstdc++ -ldl -o ex31<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwopccore.so: undefined reference to `std::__cxx11::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>//home/ADS/u2192020/Matlab2022/bin/glnxa64/libmwfoundation_matlabdata_matlab.so: undefined reference to `std::logic_error::logic_error(std::logic_error&&)@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmex.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()@GLIBCXX_3.4.26'<br>/home/ADS/u2192020/Matlab2022/bin/glnxa64/libmx.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26'<br>collect2: error: ld returned 1 exit status<br>gmake[4]: *** [<builtin>: ex31] Error 1<br>Completed test examples<br>[ADS+u2192020@cos8-25136ecf PETSc-MATLAB]$ <br></div></div></div></div>