[Developers] Uppercase letters in model name

Arni Magnusson arnima at hafro.is
Tue Nov 9 13:57:36 PST 2010


Hi all,

Weihai Liu just sent me an email, pointing out an ADMB issue when a model 
name contains uppercase letters:

* Create a directory containing two files, simple.tpl and simple.dat.

* Rename the files to siMPle.tpl and siMPle.dat.

* Build the model, this will result in a siMPle executable.

* Run the model.

---

This example highlights two issues:

1. Just typing 'siMPle' will not run the model in Linux, because the model 
insists on looking for 'simple.dat' in lowercase. The user will either 
have to rename the executable, or specify -ind siMPle.dat.

2. All the output files (simple.cor, simple.par, simple.std, ...) are in 
lowercase, while the source code, executable, and input file contain 
uppercase letters. This can cause problems when using automated tools to 
archive and/or analyze pairs of input and output files.

These issues are minor nuisance, but it's probably easy to change the 
behavior of ADMB so that the siMPle executable looks for siMPle.dat and 
writes siMPle.* output files. This line from model7.cpp looks relevant:

   for (int i=1;i<=len;i++) adprogram_name[i]=tolower(adprogram_name[i]);

Spaces in path is asking for trouble, but uppercase letters are usually 
supported in statistical computing.

Arni



On Tue, 9 Nov 2010, Weihai Liu wrote:

> Hi Arni,
>
> When using your admb.el file on ubuntu, the view report file or view 
> estimate file or view point estimate menu will report error, "can not 
> find the file", IF my tpl file had mixed Capital letter in its filename, 
> see if my tpl is mixBayes.tpl, then the report file will be all small 
> case mixbayes.rep, the same for .cor, .par etc, so they can not find it, 
> because the filename had been changed by admb, but actually the files 
> are there, it is the admb not consistent, the .htp, .o or .cpp are 
> correct, but all others being forced to use all small case letter as 
> filename. I only test it for non re.
>
> That will not be a problem for windows, and will not be a problem if the 
> tpl filename is all small case letters, I just let you know to see if 
> you can fix this either through change your admb.el file or let the admb 
> fix it. The admb I am using is 64bit for linux.
>
> Thank you.
>
> Weihai Liu
>


More information about the Developers mailing list