access_admin_nci_update - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki

Updating UM Admin & Small Execs on NCI

[ScottWales 23-03-2012]

This is how I installed the 8.0 Admin scripts and small execs. I use bash as my shell, modify commands per your shell of choice as needed

Create a new local change branch in svn

svn cp https://access-svn.nci.org.au/svn/UM_Admin/branches/dev/Share/VN{7.9,8.0}_local_changes -m "Branch from 7.9 to 8.0" 

Extract the patchfile for the new release

tar xvf Patchfiles.tgz
tar xvf Patchfiles/Admin_vn7.9-vn8.0_patch

Fix the hashbang line in the shell scripts (scripts ask for sh but use extra features, not sure if ksh will work)

scripts=$(find Admin_vn7.9-vn8.0_patch -name *-patch)
for file in $scripts; do sed -i $file -e 's|/bin/sh|/bin/bash|'; done

Apply the patches

Admin_vn7.9-vn8.0_patch/fcm-import-patch https://access-svn.nci.org.au/svn/UM_Admin/branches/dev/Share/VN8.0_local_changes

I copied the NCI config file from vn7.8, if branching later versions from the 8.0 local changes this won't need to be done, command is listed here for posterity

# svn cp https://access-svn.nci.org.au/svn/UM_Admin/branches/dev/Share/VN{7.8,8.0}_local_changes/Install_scripts/Configs/Linux-nci -m "Copy 7.8 config file to 8.0" 

Check out the branch to a working directory

svn co https://access-svn.nci.org.au/svn/UM_Admin/branches/dev/Share/VN8.0_local_changes

Some changes are needed in the install script due to changes in naming between ACCESS and MetOffice. Again if branching off 8.0 these changes should already be present, check them only if errors appear when running the script.

# sed -i VN8.0_local_changes/Install_scripts/UmInstall -e 's|^\(\s*\$UM_SVN_URL\s*=\).*$|\1 "${UM_REPOS}/um/trunk";|'
# sed -i VN8.0_local_changes/Install_scripts/UmInstall -e 's|^\(\s*\$ADMIN_URL\s*=\).*$|\1 "${UM_REPOS}/UM_Admin/trunk/Install";|'

The Aux data needed for the install isn't in an accesscollab repository. I used a local repository for this data, changing $DATA_URL in the install script. The Met Office instructions indicate that you can also delete lines 400-414 of UmInstall and copy the data across manually.

Check the remote username and paths in VN8.0_local_changes/Install_scripts/Configs/Linux-nci. It is probably best to test installing to a temporary directory before installing to the access user.

Install the scripts with the command

./VN8.0_local_changes/Install_scripts/UmInstall --vn HEAD --envver 8.0 --vnpath vn8.0 --file VN8.0_local_changes/Install_scripts/Configs/Linux-nci

Check that the files are present in the $RDIR specified in the Linux-nci config file. There should at least be ctldata and normal directories within $RDIR.

The repository used for the small exec compilation requires the linux-ifort-nci machine configuration from the local changes branch. I used a test branch of UM 8.0 for this, it is probably going to be better later on to use something like the VN8.0_local_changes branch.

# sed -i VN8.0_local_changes/Install_scripts/UmInstall -e 's|^\(\s*\$UM_SVN_URL\s*=\).*$|\1 "${UM_REPOS}/um/branches/dev/saw562/VN8.0_local_changes";|'

Build the small execs using

./VN8.0_local_changes/Install_scripts/UmBuildSmllExecs --vn HEAD --envver 8.0 --vnpath vn8.0 --file VN8.0_local_changes/Install_scripts/Configs/Linux-nci

The jobs will be submitted to vayu, make sure you've got a ssh key set up to get automatic access if you're not doing the submission directly on Vayu (I did the set-up on my local workstation)