Prev: How to delete a root object
Next: Misterious error when trying to connect totarget in Real Time Windows Target
From: Joachim Goschel on 9 Jul 2007 18:23 Christopher Hulbert wrote: > > > > The intel shared libraries need to be in your LD_LIBRARY_PATH. > Thanks for the suggestion but this does not seem to be the issue. The libraries are in my LD_LIBRARY_PATH, as I can verify via "getenv LD_LIBRARY_PATH" from the Matlab command line...
From: Joachim Goschel on 13 Jul 2007 14:20 Christopher Hulbert wrote: > > From Matlab, use "!ldd /path/name.mexglx" and look for missing > libraries. In my > Intel 10.0.023, for_deallocate shows up in libifcore.so.5 and > libifcoremt.so.5. > > Chris > Thanks, again! Indeed, ldd indicates that there are three undefined symbols (for_deallocate, for_alloc_allocatable, for_check_mult_overflow) in my .mexglx file. And these indeed show up in the shared libraries above which I have under /opt/intel/fc/10.0.25/lib. The strange thing is, I tell ifort to search for this directory. The relevant section of mexopts.sh looks like #--------------------------------------------------------------------- ------- MATLAB="$MATLAB" ;; glnx86) #--------------------------------------------------------------------- ------- RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch" CC='gcc' CFLAGS='-fPIC -ansi -D_GNU_SOURCE -pthread -fexceptions' CLIBS="$RPATH $MLIBS -lm -lstdc++" COPTIMFLAGS='-O3 -DNDEBUG' CDEBUGFLAGS='-g' # CXX='icc' CXXFLAGS='-fPIC -ansi -Wall -D_GNU_SOURCE -pthread ' CXXLIBS="$RPATH $MLIBS -lm" CXXOPTIMFLAGS='-O3 -DNDEBUG' CXXDEBUGFLAGS='-g' # #For the Linux platform, we are still using the native g77. # NOTE: g77 is not thread safe FC='ifort' FFLAGS='-fPIC -u -warn -fexceptions' FLIBS="$RPATH $MLIBS -L/opt/intel/fc/10.0.025/lib -lm" FOPTIMFLAGS='-O3 -xT -openmp' # FOPTIMFLAGS='-O3 -xT' FDEBUGFLAGS='-g' # LD='icc' LDEXTENSION='.mexglx' LDFLAGS="-pthread -shared -Wl,--version-script,$TMW_ROOT/extern/lib/$Arch/$MAPFILE" LDOPTIMFLAGS='$FOPTIMFLAGS' LDDEBUGFLAGS='-g' # POSTLINK_CMDS=':' I am pretty much clueless at this point...
From: Joachim Goschel on 13 Jul 2007 15:43 Christopher Hulbert wrote: > > > Joachim Goschel wrote: >> Christopher Hulbert wrote: >> >>> From Matlab, use "!ldd /path/name.mexglx" and look for missing >>> libraries. In my >>> Intel 10.0.023, for_deallocate shows up in libifcore.so.5 and >>> libifcoremt.so.5. >>> >>> Chris >>> >> >> Thanks, again! Indeed, ldd indicates that there are three > undefined >> symbols (for_deallocate, for_alloc_allocatable, >> for_check_mult_overflow) in my .mexglx file. And these indeed > show up >> in the shared libraries above which I have under >> /opt/intel/fc/10.0.25/lib. >> >> The strange thing is, I tell ifort to search for this directory. > The >> relevant section of mexopts.sh looks like > > > Does ldd indicate it cannot find a library, or does the needed > library not show > up at all? If it's the former, you need to tell Matlab to look in > there for > libraries. You can do that with the LD_LIBRARY_PATH variable. > > Chris > > Chris, thanks for you help! Running ldd without any options does not show any missing libraries or symbols. Running "!ldd -r myfile.mexglx" gives the output below. No library is shown as not found but the three aforementioned symbols are undefined. Of course, given your suggestions, I double-checked that ALL libraries shown by ldd are in my LD_LIBRARY_PATH library (specifically, /opt/intel/fc/10.0.25/lib is in there) !ldd -r onesim.mexglx linux-gate.so.1 => (0xffffe000) libmx.so => /usr/local/matlab74/bin/glnx86/libmx.so (0xb7f37000) libmex.so => /usr/local/matlab74/bin/glnx86/libmex.so (0xb7f2a000) libmat.so => /usr/local/matlab74/bin/glnx86/libmat.so (0xb7f0d000) libimf.so => /opt/intel/cc/10.0.025/lib/libimf.so (0xb7ce0000) libm.so.6 => /lib/libm.so.6 (0xb7c97000) libsvml.so => /opt/intel/cc/10.0.025/lib/libsvml.so (0xb7bf9000) libguide.so => /usr/local/matlab74/bin/glnx86/libguide.so (0xb7bbb000) libgcc_s.so.1 => /usr/local/matlab74/sys/os/glnx86/libgcc_s.so.1 (0xb7bb0000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7b97000) libintlc.so.5 => /opt/intel/cc/10.0.025/lib/libintlc.so.5 (0xb7b54000) libc.so.6 => /lib/libc.so.6 (0xb7a26000) libdl.so.2 => /lib/libdl.so.2 (0xb7a22000) libut.so => /usr/local/matlab74/bin/glnx86/libut.so (0xb7940000) libicudata.so.32 => /usr/local/matlab74/bin/glnx86/libicudata.so.32 (0xb793d000) libicuuc.so.32 => /usr/local/matlab74/bin/glnx86/libicuuc.so.32 (0xb7860000) libicui18n.so.32 => /usr/local/matlab74/bin/glnx86/libicui18n.so.32 (0xb773c000) libicuio.so.32 => /usr/local/matlab74/bin/glnx86/libicuio.so.32 (0xb7731000) libz.so => /usr/local/matlab74/bin/glnx86/libz.so (0xb7721000) libstdc++.so.6 => /usr/local/matlab74/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6 (0xb7643000) libmwservices.so => /usr/local/matlab74/bin/glnx86/libmwservices.so (0xb74d7000) libmwmpath.so => /usr/local/matlab74/bin/glnx86/libmwmpath.so (0xb74bd000) libmwm_dispatcher.so => /usr/local/matlab74/bin/glnx86/libmwm_dispatcher.so (0xb7472000) libhdf5.so.0 => /usr/local/matlab74/bin/glnx86/libhdf5.so.0 (0xb7335000) /lib/ld-linux.so.2 (0x80000000) librt.so.1 => /lib/librt.so.1 (0xb732b000) libmwmathutil.so => /usr/local/matlab74/bin/glnx86/libmwmathutil.so (0xb72b5000) libncurses.so.5 => /lib/libncurses.so.5 (0xb726e000) libboost_filesystem-gcc-mt-1_33_1.so.1.33.1 => /usr/local/matlab74/bin/glnx86/../../bin/glnx86/libboost_filesystem-gc c-mt-1_33_1.so.1.33.1 (0xb725d000) libmwdatasvcs.so => /usr/local/matlab74/bin/glnx86/libmwdatasvcs.so (0xb7246000) libxerces-c.so.26 => /usr/local/matlab74/bin/glnx86/libxerces-c.so.26 (0xb6eed000) libmwxmlcore.so => /usr/local/matlab74/bin/glnx86/libmwxmlcore.so (0xb6e7c000) undefined symbol: for_deallocate (./onesim.mexglx) undefined symbol: for_alloc_allocatable (./onesim.mexglx) undefined symbol: for_check_mult_overflow (./onesim.mexglx)
From: Joachim Goschel on 13 Jul 2007 15:45 Christopher Hulbert wrote: > > > Joachim Goschel wrote: >> Christopher Hulbert wrote: >> >>> From Matlab, use "!ldd /path/name.mexglx" and look for missing >>> libraries. In my >>> Intel 10.0.023, for_deallocate shows up in libifcore.so.5 and >>> libifcoremt.so.5. >>> >>> Chris >>> >> >> Thanks, again! Indeed, ldd indicates that there are three > undefined >> symbols (for_deallocate, for_alloc_allocatable, >> for_check_mult_overflow) in my .mexglx file. And these indeed > show up >> in the shared libraries above which I have under >> /opt/intel/fc/10.0.25/lib. >> >> The strange thing is, I tell ifort to search for this directory. > The >> relevant section of mexopts.sh looks like > > > Does ldd indicate it cannot find a library, or does the needed > library not show > up at all? If it's the former, you need to tell Matlab to look in > there for > libraries. You can do that with the LD_LIBRARY_PATH variable. > > Chris > > Chris, thanks for you help! Running ldd without any options does not show any missing libraries or symbols. Running "!ldd -r myfile.mexglx" gives the output below. No library is shown as not found but the three aforementioned symbols are undefined. Of course, given your suggestions, I double-checked that ALL libraries shown by ldd are in my LD_LIBRARY_PATH variable (specifically, /opt/intel/fc/10.0.25/lib is in there) !ldd -r onesim.mexglx linux-gate.so.1 => (0xffffe000) libmx.so => /usr/local/matlab74/bin/glnx86/libmx.so (0xb7f37000) libmex.so => /usr/local/matlab74/bin/glnx86/libmex.so (0xb7f2a000) libmat.so => /usr/local/matlab74/bin/glnx86/libmat.so (0xb7f0d000) libimf.so => /opt/intel/cc/10.0.025/lib/libimf.so (0xb7ce0000) libm.so.6 => /lib/libm.so.6 (0xb7c97000) libsvml.so => /opt/intel/cc/10.0.025/lib/libsvml.so (0xb7bf9000) libguide.so => /usr/local/matlab74/bin/glnx86/libguide.so (0xb7bbb000) libgcc_s.so.1 => /usr/local/matlab74/sys/os/glnx86/libgcc_s.so.1 (0xb7bb0000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7b97000) libintlc.so.5 => /opt/intel/cc/10.0.025/lib/libintlc.so.5 (0xb7b54000) libc.so.6 => /lib/libc.so.6 (0xb7a26000) libdl.so.2 => /lib/libdl.so.2 (0xb7a22000) libut.so => /usr/local/matlab74/bin/glnx86/libut.so (0xb7940000) libicudata.so.32 => /usr/local/matlab74/bin/glnx86/libicudata.so.32 (0xb793d000) libicuuc.so.32 => /usr/local/matlab74/bin/glnx86/libicuuc.so.32 (0xb7860000) libicui18n.so.32 => /usr/local/matlab74/bin/glnx86/libicui18n.so.32 (0xb773c000) libicuio.so.32 => /usr/local/matlab74/bin/glnx86/libicuio.so.32 (0xb7731000) libz.so => /usr/local/matlab74/bin/glnx86/libz.so (0xb7721000) libstdc++.so.6 => /usr/local/matlab74/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6 (0xb7643000) libmwservices.so => /usr/local/matlab74/bin/glnx86/libmwservices.so (0xb74d7000) libmwmpath.so => /usr/local/matlab74/bin/glnx86/libmwmpath.so (0xb74bd000) libmwm_dispatcher.so => /usr/local/matlab74/bin/glnx86/libmwm_dispatcher.so (0xb7472000) libhdf5.so.0 => /usr/local/matlab74/bin/glnx86/libhdf5.so.0 (0xb7335000) /lib/ld-linux.so.2 (0x80000000) librt.so.1 => /lib/librt.so.1 (0xb732b000) libmwmathutil.so => /usr/local/matlab74/bin/glnx86/libmwmathutil.so (0xb72b5000) libncurses.so.5 => /lib/libncurses.so.5 (0xb726e000) libboost_filesystem-gcc-mt-1_33_1.so.1.33.1 => /usr/local/matlab74/bin/glnx86/../../bin/glnx86/libboost_filesystem-gc c-mt-1_33_1.so.1.33.1 (0xb725d000) libmwdatasvcs.so => /usr/local/matlab74/bin/glnx86/libmwdatasvcs.so (0xb7246000) libxerces-c.so.26 => /usr/local/matlab74/bin/glnx86/libxerces-c.so.26 (0xb6eed000) libmwxmlcore.so => /usr/local/matlab74/bin/glnx86/libmwxmlcore.so (0xb6e7c000) undefined symbol: for_deallocate (./onesim.mexglx) undefined symbol: for_alloc_allocatable (./onesim.mexglx) undefined symbol: for_check_mult_overflow (./onesim.mexglx)
From: Joachim on 13 Jul 2007 16:29
Christopher Hulbert wrote: > [chulbert(a)hulbert64 ~]$ /opt/intel/fc/10.0.023/bin/ifort -shared > -O0 -o > testfor.mexglx testfor.f90 Thanks, this resolves the issue! Just in case anybody else is interested, my mexopts.sh specified linking with icc, which did not seem to do any good here. Simply creating the mex-file with ifort, as suggested by Chris, works--I can use allocatable arrays. |