[petsc-users] Petsc and Matlab R2010b

Barry Smith bsmith at mcs.anl.gov
Wed Mar 30 11:54:23 CDT 2011


   Please switch to petsc-dev http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html to build with Matlab R2010b. This version of Matlab came out long after petsc-3.1 and hence we needed to update PETSc for it.

    Barry


On Mar 30, 2011, at 8:04 AM, domenico.borzacchiello at univ-st-etienne.fr wrote:

> Hi,
> I'm trying to build Petsc (current release) with Matlab R2010b with the
> following command line
> 
> ./config/configure.py --with-cc=icc --with-fc=ifort
> --download-f-blas-lapack=1 --download-mpich=1
> --with-matlab-dir=/opt/MATLAB/R2010b --with-matlab-engine
> 
> The configuration stage is successfully completed. then If I build the
> libraries I get the following warning messages:
> 
> BEGINNING TO COMPILE MATLAB INTERFACE
> sread.c(35): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryRead(fd,mxGetPr(plhs[0]),cnt,dt);if (ierr)
> PETSC_MEX_ERROR("Unable to receive double items.");
>                                                     ^
> 
> sread.c(38): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryRead(fd,mxGetPr(plhs[0]),cnt,dt);if (ierr)
> PETSC_MEX_ERROR("Unable to receive int items.");
>                                                     ^
> 
> sread.c(41): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryRead(fd,tmp,cnt,dt);if (ierr)
> PETSC_MEX_ERROR("Unable to receive char items.");
>                                        ^
> 
> ld: sread.o: relocation R_X86_64_32 against `.rodata' can not be used when
> making a shared object; recompile with -fPIC
> sread.o: could not read symbols: Bad value
> 
>    mex: link of ' "sread.mexa64"' failed.
> 
> make[10]: [sread] Errore 1 (ignorato)
> /bin/mv: impossibile eseguire stat di "sread.mex*": File o directory non
> esistente
> make[10]: [sread] Errore 1 (ignorato)
> ld: sopen.o: relocation R_X86_64_32 against `.rodata' can not be used when
> making a shared object; recompile with -fPIC
> sopen.o: could not read symbols: Bad value
> 
>    mex: link of ' "sopen.mexa64"' failed.
> 
> make[10]: [sopen] Errore 1 (ignorato)
> /bin/mv: impossibile eseguire stat di "sopen.mex*": File o directory non
> esistente
> make[10]: [sopen] Errore 1 (ignorato)
> ld: sclose.o: relocation R_X86_64_32 against `.rodata' can not be used
> when making a shared object; recompile with -fPIC
> sclose.o: could not read symbols: Bad value
> 
>    mex: link of ' "sclose.mexa64"' failed.
> 
> make[10]: [sclose] Errore 1 (ignorato)
> /bin/mv: impossibile eseguire stat di "sclose.mex*": File o directory non
> esistente
> make[10]: [sclose] Errore 1 (ignorato)
> swrite.c(32): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryWrite(fd,mxGetPr(prhs[1]),cnt,dt,PETSC_FALSE);if
> (ierr) PETSC_MEX_ERROR("Unable to send double items.");
>                                                      ^
> 
> swrite.c(37): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryWrite(fd,tmp,cnt,dt,PETSC_FALSE);if (ierr)
> PETSC_MEX_ERROR("Unable to send int items.");
>                                         ^
> 
> swrite.c(42): warning #188: enumerated type mixed with another type
>      ierr = PetscBinaryWrite(fd,tmp,cnt,dt,PETSC_FALSE);if (ierr)
> PETSC_MEX_ERROR("Unable to send char items.");
>                                         ^
> 
> ld: swrite.o: relocation R_X86_64_32 against `.rodata' can not be used
> when making a shared object; recompile with -fPIC
> swrite.o: could not read symbols: Bad value
> 
>    mex: link of ' "swrite.mexa64"' failed.
> 
> Then if I try to run the tests i get the error:
> 
> ld: cannot find -licudata
> ld: cannot find -licui18n
> ld: cannot find -licuuc
> ld: cannot find -lustdio
> 
> What am I doing wrong? It worked perfectly without the matlab engine?
> 
> Thank you in advance,
> Domenico
> 



More information about the petsc-users mailing list