[CM] CLM-on-Mac improvements

Michael Klingbeil michael@klingbeil.com
Mon, 27 May 2002 14:17:55 -0400


MPW with optimization can be extremely slow to compile large 
instruments. Given enough time the compile probably will complete. 
(for example I tried this on piano.ins -- it took forever to compile 
but it did eventually finish successfully). However you can just turn 
off optimization:

(definstrument (myinstrument :c-options "")
    ...)

In some instances I found that running with optimization would result 
in about 90% speed increase at runtime (for example with 
fm-violin.clm running v.ins and reverb) so I thought it might be a 
worthwhile default. Perhaps the default should be no optimization 
since it can be so slow to compile.

I think the compile time is somewhat reduced using slightly less 
agressive optimization. For example:

(definstrument (myinstrument :c-options "-opt speed,nointer,norep,unroll")


The interruptable run loop in the new CLM MacOS build will result in 
some slowdown, so if you don't turn on optimization, the new CLM 
MacOS build will end up being slightly slower than before. I suppose 
the interruptable run loop could be another compile time option.

I think the ultimate solution to any MacOS problems is to use CLM on 
Linux... :(



>*Something* in the new CLM build appears to be causing severe compile
>difficulties with one of my instruments (mac/mcl). It is a very fat (not phat,
>but fat) instrument, broken up into about 10 macro calls. Prior to this last
>update, it took 40-60 seconds to compile on my computer. With the new
>version, I'm not actually sure it can compile at all: I give up after 15
>minutes.
>
>Specifically, CLM executes the MrC -shared_lib_export on -opt
>speed,unroll,unswitch (etc.) command, ToolServer launches... but
>ToolServer never succesfully completes its work.
>
>At first I assumed this was a bug in my code that was not being trapped
>properly and causing an infinite loop in MrC. So I commented out all of my
>macro calls. Compile worked. I added in the macros one by one. The
>compile time kept expanding, exponentially it seems, with each addition.
>Until it exceeded 15 minutes...
>
>At which time I gave up and compiled it with the old CLM.
>
>I could send the instrument to someone if that would help, since I'm not
>sure where to go from here in trying to track down the problem.
>
>-=Bret
>
>
>Bret Battey, DMA                                http://BatHatMedia.com
>----------------------------------------------------------------------
>Center for Digital Arts and Experimental Media
>University of Washington, Seattle   http://www.washington.edu/dxarts/
>
>2001-2002 Fulbright Scholar to India, Pune University, Pune, Maharashtra
>Department of Computer Science            http://cs.unipune.ernet.in/
>
>
>
>On Thu, 23 May 2002, Bill Schottstaedt wrote:
>
>>  Michael Klingbeil has made many more improvements to the
>>  Mac (MCL) version of CLM: optimization switches, interruptible
>>  run loop, documentation, clm1.lisp (and hence ATS). These
>>  are now in the clm tarball at ccrma-ftp.  Needless to say,
>>  thank you!
>>  _______________________________________________
>>  Cmdist mailing list
>>  Cmdist@ccrma.stanford.edu
>>  http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>>
>
>
>
>_______________________________________________
>Cmdist mailing list
>Cmdist@ccrma.stanford.edu
>http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist