As it is our intention to upgrade over time (or fix if necessary) the tools supplied in the SifDec package, a mechanism for keeping an installed system up to date, and to install newer instances of the tools, is required. This is the role of the update_sifdec script. If all goes well, you should not have to use update_sifdec immediately. Announcements of bug-fixes and enhancements will be posted and indicated on the website. There are two forms of the command.
In its first form, update_sifdec takes two command-line options, as follows
prompt% update_sifdec filename
where filename is the name of the file to upgrade, possibly specified with a path. Suppose, for example, that the file gps.f has been improved so as to perform its task faster, upgrading your current instance of SifDec is achieved by typing
prompt% update_sifdec gps.f
at the command prompt. This command first copies the new source file to proper location, which is in this case $SIFDEC/common/src/tools. If there are currently both single and double precision instances, you will be asked to choose which you would like to update; if there is only one instance under $MYSIFDEC, the precision will be chosen accordingly. The script then casts and compiles the incoming file. Of course, corresponding actions are performed depending on the type of filename: if it is a script, it is only cast, and stored in its proper place, and if it is a documentation file, it is simply moved to $SIFDEC/common/doc.
In its second form, update_sifdec takes three command-line options, described as follows
prompt% update_sifdec -a filename
where filename is the name of a file describing a list of SifDec files to be upgraded. The file filename should contain
/home/upgrade
$SIFDEC/common/src/tools/gps.f
$SIFDEC/build/scripts/install_sifdec
compiler.cry.unc.f90
sifdecode.pro
but exactly the same result would be produced by the simpler file
/home/upgrade
gps.f
install_sifdec
compiler.cry.unc.f90
sifdecode.pro
or by the deliberately confusing file
/home/upgrade
/usr/share/junk/gps.f
/home/upgrade/install_sifdec
/home/downgrade/compiler.cry.unc.f90
/opt/degrade/sifdecode.pro
As above, SifDec copies these files from /home/upgrade to their proper location, prompts for the precision required (if necessary), casts and, where necessary, compiles the incoming files, and updates the specified instance stored under $MYSIFDEC.
The additional command-line option -m forces update_sifdec to simply move the files to their proper location and to skip compilation. Help may be obtained from update_sifdec through either of the -h, -help or -help flags.
To summarize, the complete synopsis of update_sifdec is as follows
update_sifdec [-h | -help | -help] [-m] [-a listFile | newFile]
In the situation where SifDec has been unpacked but no further installation steps were performed, or all current instances were deleted, update_sifdec still can move the updated source files to their proper location, skipping the compilation phase. The same syntax as above can be used.
Caution: attention should be paid to the fact that update_sifdec works by source-ing the UNIX commands from the file $MYSIFDEC/precision/config/cmds (where precision is the required precision) and that these commands define the temporary directory used during compilation phase. In most cases, this temporary directory is simply /tmp. This temporary directory must not be the same as that specified in the first line of update_sifdec's input file (/home/upgrade in the examples above). When no compilation occurs and update_sifdec simply moves the files to their proper location, it will source the file $SIFDEC/build/arch/system.all, a symbolic link to one of the other system.* files, rather than the command file, as the location of this will not yet have been assigned. The user might reset this link to better suit their system, or create a suitable system.all file of their own, better able to give the correct commands in all, or most, cases.
Please remark that it should be safer to update files using the -m command-line option to update_sifdec, and then to issue a make all (or make -s all) from $MYSIFDEC (or from the home directory of the SifDec instance which should be rebuilt).