Personal tools
You are here: Home / cmgui / Wiki / cmissmake
Log in

Forgot your password?



cmissmake is a script which can be called to make various cmiss related targets on all the different computers they need to be built on. It is run as part of the overnight build process.

The cmissmake script can be run in one of two modes. When run in client mode (default) it takes care of sending off the requests to make the target on the relevant machines. To do this it forks a number of cmissmake jobs to run on the relevant servers. It keeps track of the progress of these jobs and reports on them. When run in server mode it takes care of making the target on that particular server.

If you have cmissmake installed locally you can build cmgui on the relevant machines by running it in client mode. If you have set up your PATH variable correctly you simply open a terminal and type 'cmissmake cmgui'. Note you can also build cm, unemap, zinc or zinc-npruntime by using these one of these targets instead of cmgui.

WARNING! If you stop cmissmake by typing Ctrl-C it will not clean up after itself nicely. Stopping it like this is likely to leave lock files and processes hanging around. You will then need to log on to the affected machines and manually delete lock files and kill any left over processes. See below for more info on this.

If you wish to restart cmissmake it is best to suspend the existing process using Ctrl-Z and then background it by typing 'bg'. You can then start a new instance of cmissmake without fear of leaving a mess around. Cmissmake is smart enough that it will detect if another process has started a build on a computer. It will wait until that build is completed before starting its own.

In general the bottle neck is esu8 and if you have several people trying to run cmissmake at once it may easily take upwards of 10 minutes for it to finish. During execution you will get updated with what jobs have finished on what machines.

To install cmissmake

  1. Checkout the cmiss bin module from cvs:
cd $CMISS_ROOT cvs checkout bin
  1. Set up ssh support for the various computers. To do this various files need to be placed in your ~/.ssh directory. You will need to copy from an existing user the following files from their ~/.ssh directory: the '' file and the 'cmiss-groups' directory. (Note from Shane) These required files are also in the CVS so you can get them with 'cvs checkout .ssh'. You may not want to do this directly into your own ~/.ssh directory, but potentially linking from somewhere into your ~/.ssh directory would be a reasonable thing to do. Obviously by doing so you are trusting all the people who can check in to the cmiss cvs not to use this mechanism to gain access to your computer.
  2. Check the permisions on the cmissmake script 'ls -al' and if necessary add execute permissions for it:
cd $CMISS_ROOT/bin chmod u+x cmissmake

You should now be able to run cmissmake from within the cmiss root bin directory, eg:

cd $CMISS_ROOT/bin
./cmissmake cmgui

Configuring to be able to run from any directory

Add your cmiss bin directory to your path. To do this permanently edit your .bashrc file (or equivalent) to add in $CMISS_ROOT/bin to your path. If you are running a bash script then you would add a line like: 'export PATH=$CMISS_ROOT/bin:.:$PATH'. Note that this assumes you have already set up your CMISS_ROOT variable earlier in the script. Remember to either start a new shell or source your .bashrc file to reload it: 'source ~/.bashrc'

Alternatively you may like to see How to set up a local bin directory which details how I manage executables and scripts I want to run from any location.

Fixing problems

As cmissmake builds executables on various different machines it is important that these machines are switched on and that their environments are correctly configured. If the environment is not correct then there may be problems with the build.

Machines involved

  • esu8, SGI Octane running IRIX (64 bit chipset). In server room (level 6).
  • bioeng46 Apple imac running OS X (intel chipset). On Justin Marsh's desk (level 6).
  • bioeng85, PC running ubuntu dapper (i686 32 bit chipset). In server room (level 6)
  • bioeng1031, virtual machine running ubuntu dapper (64 bit).
  • bioeng1032, virtual machine running ubuntu hardy (64 bit).

Mac failing to build cmgui on bioeng46

Check that /hpc and /people are mounted correctly on bioeng46. These are not mounted automatically on reboot. Also if you network falls over they will not be automatically remounted. Log on to bioeng 46 and then type:

sudo mount_nfs -T -P /hpc
sudo mount_nfs -T -P /people

Cmissmake hanging due to lock files

When you run cmissmake, someone else may be running it at the same time. It is important that the builds do not interfere with each other so before building an executable on a machine cmissmake will create a lock file under an appropriate directory in /hpc/cmiss/ (eg /hpc/cmiss/unemap/lock.i386 might get created if you were building unemap). The lock is released by cmissmake after the executable has built by removing the file. Once the lock is released another instance of cmissmake will be able to access that directory.

If cmissmake is killed in mid process by using Ctrl-C, then lockfiles may be left around. This means that the next time cmissmake is run, it will detect a lock and then wait until the lock is released before building the executable for that machine. If the lock is due to an old killed process it will never be released and cmissmake will hang. To get around this, you will need to manually remove the lock file. This will allow cmissmake to access that machine to build the required executable.

Build fail due to unrecognized host names

When cmissmake runs, ssh is used to access various machines and compile executables on them. If your machine does not recognise commands like 'ssh cmiss@esu8' and 'ssh cmiss@bioeng46' you will need to configure your settings so that these machines can be accessed this way. You can manually check you have access from your machine by using ssh to each of the machines required by cmissmake. Note that it is not enough to have access via the long name 'ssh', you need to be able to use the short name 'esu8'.

Get your sys admin to set this up for you if it is not already. When using ssh it should search the domains and (The file to edit is /etc/dhcp3/dhclient.conf which is used to generate /etc/resolv.conf).