[ADMB Users] file name length

Ben Bolker bbolker at gmail.com
Tue Dec 14 13:25:34 PST 2010


  John: I sent an example to the list which may be awaiting moderation.
This is a slightly updated version.
It shows that a tpl file named "toy[x]36.tpl" (i.e., toy + 36 x's)
works, but toy[x]37.tpl fails.

  The attached files were generated by the R code below, and fail ...

library(R2admb)

set.seed(101)
x <- rnorm(1000)

dir.create("tmp")
setwd("tmp")

testfn <- function(n=200,clean=TRUE,...) {
  fn <- paste(c("toy",rep("x",n)),collapse="")
  writeLines(c("PROCEDURE_SECTION",
               "",
               "  f+=norm2((x-mu)/sigma);"),
             con=file(paste(fn,"tpl",sep=".")))



  setup_admb()
  d1 <- do_admb(fn,
                data=list(x=x),
                params=list(mu=0.5,sigma=1),
                bounds=list(sigma=c(0,20)),
                checkparam="write",
                checkdata="write",
                clean=clean,
                ...)
  if (clean) {unlink(fn)
              unlink(paste(fn,"tpl",sep="."))
              unlink(paste(fn,"_gen.tpl",sep=""))
            }
}

testfn(n=36)
testfn(n=37)
testfn(n=37,clean=FALSE)
On 10-12-14 03:13 PM, John Sibert wrote:
> Can you give us an example of a file name that doesn't work for you? And
> tell us what OS you are using?
> 
> ADMB is completely intolerant of file names with spaces, and, depending
> on the OS, is not happy with mixed cases.
> 
> John
> 
> On 12/14/2010 06:52 AM, Luis Ridao wrote:
>> ADMB-help,
>>
>> I was wondering what is the maximum length of a file name allowed in
>> ADMB.
>>
>> I seem to have problems when file names are too long. My tendency is
>> to use
>> decriptive file names. When they are reduced the problem is gone.
>>
>> Thank in advance
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: toyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dat
Type: application/x-ns-proxy-autoconfig
Size: 10320 bytes
Desc: not available
URL: <http://lists.admb-project.org/pipermail/users/attachments/20101214/c7e7b87c/attachment.dat>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: toyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.htp
URL: <http://lists.admb-project.org/pipermail/users/attachments/20101214/c7e7b87c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: toyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pin
URL: <http://lists.admb-project.org/pipermail/users/attachments/20101214/c7e7b87c/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: toyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.tpl
URL: <http://lists.admb-project.org/pipermail/users/attachments/20101214/c7e7b87c/attachment-0002.ksh>


More information about the Users mailing list