Install cm on a Laptop for Development
Set up an ssh tunnel for cvs access
The first step to be able to download the source code for cm is to set up an ssh tunnel. The website below gives a good description.
Setting Up for CMISS CVS Access
When setting up the ssh tunnel, the -f and -N allow the tunnel to be left in the background and start using cvs as if I was using it on my pc at the University.
Note that if you have just added new environment variables to your .(t)cshrc file, then make sure the shell's environment is updated by typing 'source .cshrc'.
Set up a local cmiss directory
Next you should create a local cmiss directory where your modules will be placed. You also need to set up the CMISS_ROOT envirnoment variable which identifies this directory. Normally this is set to /hpc/cmiss but we need to set it to our local cmiss directory for the build script below to work.
Make a mycmiss dir:
cd ~ mkdir mycmissMake sure the CMISS_ROOT environment variable is set:
setenv CMISS_ROOT ~/mycmissRemember to add lines to set up your environment variables to your .(t)cshrc file so that future shell sessions will have the correct environment.
Useful info
Here's a good site to look at cm source code checking out and stuff...
Note that if you intend on working on a local copy of cm plugged in to the university network you should follow the instructions in the site above. The instructions below are for installing the entire source of cm onto your laptop, so that you can work on it without being connected to the network. This is more than half a gig of files.
The quick method
If you have set up your cmiss root variable to point to a local directory you can try downloading the following script to build cm for i686 linux machines.
http://www.cmiss.org/cm/wiki/buildcmfori686linux/download
Once downloaded you should be able to type 'bash build_cm_for_i686_linux.sh' It will take around 10 to 20 minutes to get all the files and build cm.
The alternative
Change into local cmiss directory:
cd ~/mycmissCheckout the cm makefile first:
cvs co cm/MakefileThen I check out the entire cm directory:
cvs co cmAlso the perl interpreter:
cvs co perl_interpreterAs well as the code for the perl_interpreter I need the perl interpreter library files. They are binary files that do not get checked out. If you want to build the library files see: http://www.cmiss.org/cmgui/wiki/BuildingThePerlInterpreterLibraries
It is quicker just to copy the library files off hpc. Note we need to ensure that the directory structure is the same as in /hpc/cmiss so we first create the lib directory and then copy over the library files for your computer and os (in this case the i686-linux directory):
mkdir perl_interpreter/lib scp -r USERNAME@bioeng22:/hpc/cmiss/perl_interpreter/lib/i686-linux/ perl_interpreter/libNote the trailing slash after i686-linux is important so that the entire i686-linux directory is placed inside the lib directory.
I also created a couple of symbolic links which seemed necessary for cm compilation:
ln -s 5.6.1/i686-linux-dynamic/libperlinterpreter-debug.a liperlinterpreter-debug.a ln -s 5.6.1/i686-linux-dynamic/libperlinterpreter.a libperlinterpreter.aI checked out cellml to use in my definition of material laws:
cvs co cellmlHere the cellml library files need to be scp'ed:
mkdir cellml/lib scp -r USERNAME@bioeng22:/hpc/cmiss/cellml/lib/i686-linux/ cellml/libNote that when you compile, I think the cellml stuff needs a libstdc++.a to be on your computer for compilation. My laptop didn't have this installed, so I just had to copy it over to the appropriate directory:
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.2/listdc++.aYou can also get this static library by installing a mandrake rpm package that comes on the installation cd (at least for Mandrake 10 anyway)
Checked out the linear solvers directory:
cvs co linear_solversOnce again, there are some binary files in here that needed scp'ing:
scp -r USERNAME@bioeng22:/hpc/cmiss/linear_solvers/lib/ linear_solversThen also check out the cmiss_perl and cmiss_utils (don't know if I need this actually):
cvs co cmiss_perl cvs co cmiss_utilsYou may also need to check out the sqp directory (sequential quadratic programming modules) or the lsoda directory (ODE integrator). Once again, there are a couple of *.a files that need to be scp'ed from sqp/lib/i686-linux (I am using linux on my laptop) into the laptop directory structure.
Another directory you might like to check out is the gx directory. This has been set aside now since CMGUI is being used mostly to view deformations and things. But you can check it out and copy over the lib directory just as I did for the others if you want to use it.
Then i go into mycmiss/cm and type gmake or make:
cd ~/mycmiss/cm makeAnd that's it! Badabing Badabum!
Hope I have not missed anything out. If you think I have, please add extra stuff....