Personal tools
You are here: Home cmgui Wiki cmissmake
Views
FrontPage >>

cmissmake

last edited 4 months ago by Alanwu

Usage

cmissmake is a script which can be called to make cmiss on all the different computers it needs to be built on.

If you have cmissmake installed you can build cmgui by typing cmissmake cmgui. Note you can also build cm or unemap by specifiying cmissmake cm or cmissmake unemap.

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 slow computers are esu8 and bioeng21 (the mac).

To install cmissmake

  1. Set up a cmiss bin directory:
        cd $CMISS_ROOT
        mkdir cmiss_bin
    
  2. Checkout the cmiss bin module from cvs:
        cd $CMISS_ROOT/cmiss_bin
    
        cvs checkout bin
    
  3. Set up a user bin directory if you do not already have one:
        cd ~/
        mkdir bin
    
  4. Add your user bin directory to your path. Edit your .bashrc file (or equivalent) to add in ~/bin to your path. If you are running a bash script then you would add a line like: export PATH=~/bin:.:$PATH. Remember to either start a new shell or source your .bashrc file to reload it: source ~/.bashrc
  5. Create a symbolic link from within your user bin directory to cmissmake (and any other binary files you wish to easily access):
        ln -s $CMISS_ROOT/cmiss/cmiss_bin/bin/cmissmake .
    
  6. 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 run-command.pl 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.

You should now be able to run cmissmake

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).
  • bioeng22 Large PC running linux (amd64 bit chipset). Outside server room by poster printer (Level 6).
  • bioeng46 Apple imac running OS X (intel chipset). On Peter Bier's desk (level 6).
  • bioeng85, PC running linux (i686 32 bit chipset). In server room (level 6)
  • hpc, IBM super computer running AIX. Owen G Glenn building.

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 automaticaly remounted. Log on to bioeng 46 and then type:

      sudo mount nsd.bioeng.auckland.ac.nz:/hpc /hpc
      sudo mount nsd.bioeng.auckland.ac.nz:/people /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 cmiss@esu8.auckland.ac.nz, 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 bioeng.auckland.ac.nz and auckland.ac.nz (The file to edit is /etc/dhcp3/dhclient.conf which is used to generate /etc/resolv.conf).


comments:

--server --cheng, Wed, 12 Mar 2008 11:39:55 +1300 reply
Hi does anybody understand what the --server flag does? I'm trying to do a cmissmake on just one machine (say linux). I think this is not possible at present.

--server --blackett, Thu, 13 Mar 2008 14:21:15 +1300 reply
The --server flag is because the same program is both used by the client (you when you run cmissmake) and the hosting machines (the servers), and the --server flag tells the that process that it is on the host machine and should actually run the build. I don't think cmissmake supports what you want at the moment although such a filter could be added. If you want to just make all the versions on a machine, you currently have to log in to that machine, cd to /hpc/cmiss/PROGRAM, and run make all, which is what cmissmake does.

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.