I'm trying to get R 1.9.0 running on AIX 5.1 with the standard AIX compilers (xlc, xlf) and it is failing 2 of the tests, test-Reg in reg-tests-1.R like this: bash-2.05b$ tail -30 reg-tests-1.Rout.fail [,1] [,2] [1,] 1 3 [2,] 2 4 [3,] 1 3 [4,] 2 4 > stopifnot(typeof(res) == "list") > ## were not implemented in 1.8.1 > > > ## Date objects with NA's > (t1 <- strptime(c("6. Aug. 1930", "3. Nov. 1925", "28. Mar. 1959", + NA, paste(1:29," Feb. 1960", sep=".")), + format = "%d. %b. %Y")) [1] "1930-08-06" "1925-11-03" "1959-03-28" NA "1960-02-01" [6] "1960-02-02" "1960-02-03" "1960-02-04" "1960-02-05" "1960-02-06" [11] "1960-02-07" "1960-02-08" "1960-02-09" "1960-02-10" "1960-02-11" [16] "1960-02-12" "1960-02-13" "1960-02-14" "1960-02-15" "1960-02-16" [21] "1960-02-17" "1960-02-18" "1960-02-19" "1960-02-20" "1960-02-21" [26] "1960-02-22" "1960-02-23" "1960-02-24" "1960-02-25" "1960-02-26" [31] "1960-02-27" "1960-02-28" "1960-02-29" > stopifnot(6 == length(print(s1 <- summary(t1))), + s1== summary(as.POSIXct(t1)), + 6 == length(print(format(as.Date(s1)))) ) Min. 1st Qu. Median Mean 3rd Qu. Max. NA NA NA NA NA NA Min. 1st Qu. Median Mean 3rd Qu. Max. NA NA NA NA NA NA Error in if (!(is.logical(r <- eval(ll[[i]])) && all(r))) stop(paste(deparse(mc[[i + : missing value where TRUE/FALSE needed Execution halted and also in base-Ex.R like this: bash-2.05b$ tail base-Ex.Rout.fail > ### Title: Generate Regular Sequences of Dates > ### Aliases: seq.Date > ### Keywords: manip chron > > ### ** Examples > > ## first days of years > seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years") Error in fromchar(x) : character string is not in a standard unambiguous format Execution halted Does anyone have any ideas on how to fix this? Andy Pierce
The second (at least) looks like a broken strptime. Try undefining HAVE_WORKING_STRPTIME in src/include/config.h and recompiling. Unfortunately, it could also be a broken mktime. On Mon, 3 May 2004, Andy Pierce wrote:> I'm trying to get R 1.9.0 running on AIX 5.1 with the standard AIX > compilers (xlc, xlf) and it is failing 2 of the tests, > test-Reg in reg-tests-1.R like this: > > bash-2.05b$ tail -30 reg-tests-1.Rout.fail > [,1] [,2] > [1,] 1 3 > [2,] 2 4 > [3,] 1 3 > [4,] 2 4 > > stopifnot(typeof(res) == "list") > > ## were not implemented in 1.8.1 > > > > > > ## Date objects with NA's > > (t1 <- strptime(c("6. Aug. 1930", "3. Nov. 1925", "28. Mar. 1959", > + NA, paste(1:29," Feb. 1960", sep=".")), > + format = "%d. %b. %Y")) > [1] "1930-08-06" "1925-11-03" "1959-03-28" NA "1960-02-01" > [6] "1960-02-02" "1960-02-03" "1960-02-04" "1960-02-05" "1960-02-06" > [11] "1960-02-07" "1960-02-08" "1960-02-09" "1960-02-10" "1960-02-11" > [16] "1960-02-12" "1960-02-13" "1960-02-14" "1960-02-15" "1960-02-16" > [21] "1960-02-17" "1960-02-18" "1960-02-19" "1960-02-20" "1960-02-21" > [26] "1960-02-22" "1960-02-23" "1960-02-24" "1960-02-25" "1960-02-26" > [31] "1960-02-27" "1960-02-28" "1960-02-29" > > stopifnot(6 == length(print(s1 <- summary(t1))), > + s1== summary(as.POSIXct(t1)), > + 6 == length(print(format(as.Date(s1)))) ) > Min. 1st Qu. Median Mean 3rd Qu. Max. > NA NA NA NA NA NA > Min. 1st Qu. Median Mean 3rd Qu. Max. > NA NA NA NA NA NA > Error in if (!(is.logical(r <- eval(ll[[i]])) && all(r))) > stop(paste(deparse(mc[[i + : > missing value where TRUE/FALSE needed > Execution halted > > and also in base-Ex.R like this: > > bash-2.05b$ tail base-Ex.Rout.fail > > ### Title: Generate Regular Sequences of Dates > > ### Aliases: seq.Date > > ### Keywords: manip chron > > > > ### ** Examples > > > > ## first days of years > > seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years") > Error in fromchar(x) : character string is not in a standard unambiguous > format > Execution halted > > Does anyone have any ideas on how to fix this? > > Andy Pierce > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
So -- I am getting the same thing - as far as the base-Ex.Rout.fail -- did undefining HAVE_WORKING STRPTIME fix the problem? Despite using the suggestions on page 21 of the install guide, I cannot seem to find the set of options necessary for dynamic linking. I am loading with xlc, MAIN_LDFLAGS = -brtl and SHLIB_LDFLAGS = -G and still get the dreaded: "> library(SparseM) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/home/blackforest/thoar/R/R-1.9.0/library/SparseM/libs/SparseM.so": Error in library(SparseM) : .First.lib failed" I need to compile in 64 bit mode so I can access more than 2GB of memory. (so my CFLAGS, FFLAGS, LD_FLAGS all have extra baggage) Have you done this? If you have -- would you care to share your environment variable settings as well as your call to configure? (exists in config.log) I'm getting pretty frustrated with this. I am stepping back to see if I can get the 32bit compile to accept the dynamic loading - so anything would help. Thanks -- Tim> Date: Mon, 03 May 2004 08:27:47 -0400 > From: Andy Pierce <apierce at stny.rr.com> > To: r-help at stat.math.ethz.ch > Subject: [R] R 1.9.0 on AIX, 64-bit > > I'm trying to get R 1.9.0 running on AIX 5.1 with the standard AIX > compilers (xlc, xlf) and it is failing 2 of the tests, > test-Reg in reg-tests-1.R like this: > > bash-2.05b$ tail -30 reg-tests-1.Rout.fail > [,1] [,2] > [1,] 1 3 > [2,] 2 4 > [3,] 1 3 > [4,] 2 4 > > stopifnot(typeof(res) == "list") > > ## were not implemented in 1.8.1 > > > > > > ## Date objects with NA's > > (t1 <- strptime(c("6. Aug. 1930", "3. Nov. 1925", "28. Mar. 1959", > + NA, paste(1:29," Feb. 1960", sep=".")), > + format = "%d. %b. %Y")) > [1] "1930-08-06" "1925-11-03" "1959-03-28" NA "1960-02-01" > [6] "1960-02-02" "1960-02-03" "1960-02-04" "1960-02-05" "1960-02-06" > [11] "1960-02-07" "1960-02-08" "1960-02-09" "1960-02-10" "1960-02-11" > [16] "1960-02-12" "1960-02-13" "1960-02-14" "1960-02-15" "1960-02-16" > [21] "1960-02-17" "1960-02-18" "1960-02-19" "1960-02-20" "1960-02-21" > [26] "1960-02-22" "1960-02-23" "1960-02-24" "1960-02-25" "1960-02-26" > [31] "1960-02-27" "1960-02-28" "1960-02-29" > > stopifnot(6 == length(print(s1 <- summary(t1))), > + s1== summary(as.POSIXct(t1)), > + 6 == length(print(format(as.Date(s1)))) ) > Min. 1st Qu. Median Mean 3rd Qu. Max. > NA NA NA NA NA NA > Min. 1st Qu. Median Mean 3rd Qu. Max. > NA NA NA NA NA NA > Error in if (!(is.logical(r <- eval(ll[[i]])) && all(r))) > stop(paste(deparse(mc[[i + : > missing value where TRUE/FALSE needed > Execution halted > > and also in base-Ex.R like this: > > bash-2.05b$ tail base-Ex.Rout.fail > > ### Title: Generate Regular Sequences of Dates > > ### Aliases: seq.Date > > ### Keywords: manip chron > > > > ### ** Examples > > > > ## first days of years > > seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years") > Error in fromchar(x) : character string is not in a standard unambiguous > format > Execution halted > > Does anyone have any ideas on how to fix this? > > Andy Pierce > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >## Tim Hoar, Associate Scientist email: thoar at ucar.edu ## ## Geophysical Statistics Project phone: 303-497-1708 ## ## National Center for Atmospheric Research FAX : 303-497-1333 ## ## Boulder, CO 80307 http://www.cgd.ucar.edu/~thoar ##
Here is a followup to Andy's post -- I have a working 64-bit R on AIX ... My institution is running AIX 5.1. Several things are needed to build R 1.9.0 and use dynamic loading of .so objects. *) setenv OBJECT_MODE 64 or the equivalent. *) There is a quirk (bug?) in the AIX compilers in 64bit mode that requires changing configure:line 36555 to initialize a variable to zero. Line 36555 should be: time_t ct=0; without the change -- configure hits a test for POSIX times and hangs ... This can also be overcome by using -qinitauto=00, but it is a performance hit ... so it is probably undesirable in the long run. Note that in 32bit mode, this is not needed. *) The dynamic linking options specified in the R Installation and Administration Guide: Section B.7.8 did not work for me -- the ones that did work are: OBJECT_MODE=64 LDFLAGS='-brtl' CFLAGS='-O -qstrict' FFLAGS='-O -qstrict' CXXFLAGS='-O -qstrict' CC=/usr/bin/xlc_r F77=/usr/bin/xlf_r CXX=/usr/bin/xlC_r furthermore, I was able to configure with the X11 libraries (and did not have to supply the "--without-blas" option): ./configure --prefix='blah_blah_blah' it is nice to be able to plot! Our IBM rep indicated that with LDFLAGS set as above, "configure" is generally smart enough to figure out everything else -- kudos to the R configure team. I have not tried a higher level of optimization. *) Our system does not have a 32,64-bit /lib/crt0.o -- ours is only 32bit. Our 64bit one is /lib/crt0_64.o so after configure generates a Makeconf file, it must be edited to use /lib/crt0_64.o instead of crt0.o *) (credit to Andy Pierce)> Date: Mon, 10 May 2004 13:31:22 -0400 > From: Andy Pierce <apierce at stny.rr.com> > To: Tim Hoar <thoar at ucar.edu> > Subject: Re: [R] R 1.9.0 on AIX, 64-bit > > I worked the problem down to where there seems to be something wrong > with mktime in the way that R uses it.... I modified src/main/datetime.c > to add the lines for _AIX which you see below... oddly, if you > extract out the mktime code from here and stuff it into a standalone > routine, it seems to work fine. It's all in the handling of dates from > before the epoch (1970). > > static Rboolean have_broken_mktime(void) > { > #ifdef _AIX > return TRUE; > #else > #ifdef Win32 > > return TRUE; > > (the rest of the existing function.... > > #endif > }*) Our system is configured such that it is guaranteed to fail the "running tests of Internet and socket function" tests, so I have not run any of the tests after that -- yet. *) (again - credit to Andy Pierce) When I tried to build the SparseM package -- there was an unresolved external -- "etime" Adding a file "etime.c" to the SparseM/src with the following: #include <sys/time.h> #include <sys/resource.h> float etime(tt) float tt[2]; { int who; struct rusage used; who = 0; getrusage(who,&used); /* tt[0] = used.ru_exutime.tv_sec+((used.ru_exutime.tv_usec)/1000000.); */ tt[0] = used.ru_utime.tv_sec+((used.ru_utime.tv_usec)/1000000.); tt[1] = used.ru_stime.tv_sec+((used.ru_stime.tv_usec)/1000000.); return(tt[0]+tt[1]); } I did not find any problems in the config.log or the build output that indicates etime is a problem anywhere else. -=-=-=-=-=-=-=-=-=-=- After all the above -- I can dyn.load(), generate figures, etc. Hope this helps someone ... Tim <Andy's post from Mon, 03 May 2004 08:27:47 -0400 deleted> ## Tim Hoar, Associate Scientist email: thoar at ucar.edu ## ## Geophysical Statistics Project phone: 303-497-1708 ## ## National Center for Atmospheric Research FAX : 303-497-1333 ## ## Boulder, CO 80307 http://www.cgd.ucar.edu/~thoar ##