[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-users] condor_compile with dynamic linking ?



Dear All,

I'm trying to see if I can build MATLAB standalone excutables
using condor_compile on a Debian 5 VM. The main problem seems
to be that almost all of the MATLAB libraries are provided as
dynamic shared objects (.so's) and condor_compile doesn't seem
to want to link them. 

$ condor_compile gcc <matlab link options ....>

gives

/usr/bin/ld: cannot find -lmwmclmcrrt

...presumably because it's looking for the Matlab runtime library
called libmwmclmcrrt.a which is only available as a DSO: libmwmclmcrrt.so

If I do a bit of hacking and pull out the -Bstatic link option that
condor_compile puts in, I can link OK but the executable crashes
seemingly at the start of the Matlab code:

smithic@vma103228:~$ ./mydriver
Condor: Notice: Will checkpoint to ./mydriver.ckpt
Condor: Notice: Remote system calls disabled.
terminate called after throwing an instance of 'apiException'
  what():  Fatal error loading library /home/smithic/libmx.so Error: /home/smit
ic/libmx.so: cannot open shared object file: No such file or directory

(Note that the Condor code is in there though).

So the $ 64,000 question is - is there anyway I can build an executable with
checkpointing support if it calls shared object libraries.

regards,

-ian.

PS1: Despite comments I've seen on this list or elsewhere, it is still possible to
translate MATLAB M-files into C using the Matlab Coder. Whether this allows 
you to build a monolithic statically linked executable is not clear. It certainly 
does not allow you to use all of the toolbox functions available. See:
http://www.mathworks.com/help/toolbox/eml/ug/bsud5f4.html

PS2: I'm thinking of looking at DMTCP as a way of doing checkpointing without
the need for recompiling/linking (see: http://dmtcp.sourceforge.net/ ). It
specifically mentions MATLAB as an application. Has anyone had any success with this ?

PS3: If anyone is interested - I wrote some notes for our users on how to include
their own checkpointing/restart functionality in their M-files. I haven't managed
to persuade too many users to do this (need to take more of a BOFH approach obviously)
but those that have found it worked quite well. See:

http://www.liv.ac.uk/csd/escience/condor/checkpoint.htm


---------------------------------------
Dr Ian C. Smith,
Advanced Research Computing,
University of Liverpool, UK.