Re: [Rd] Buidling R on Linux (Itanium) fails (PR#7897)

2005-07-01 Thread Ei-ji Nakama
Thu, 26 May 2005 12:09:23 +0200
Christophe Pouzat <[EMAIL PROTECTED]> wrote.
> Hi,
> 
> here is the "configure" command line I used for an Intel PIV processor 
> with icc, ifort and the intel mkl:
(snip)
> In my experience using "FPICFLAGS=-shared" is mendatory to get the 
> compilation working. The other options are mainly there to pass almost 
> all the tests (except one) of "make check".

Is not a cause to fail in a problem of FTZ,DAZ?
If there was time because I put
  http://www.nakama.ne.jp/memo/ia32_linux/
 R-2.1.1.iccftzdaz.patch.txt
please try to test it.

--
http://www.nakama.ne.jp, http://r.nakama.ne.jp
e-mail : EIJI Nakama <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R crashes for large formulas in lm() (PR#8180)

2005-10-05 Thread Ei-ji Nakama
Hi,

Wed, 5 Oct 2005 13:38:12 +0100 (BST)
Prof Brian Ripley <[EMAIL PROTECTED]> wrote.
> This is almost certainly C stack overflow, which will be _very_ 
> OS-specific. I can run this 9-var example in Linux with a stacksize of 
> 30Mb, but not the default 10Mb. I tried it with the default stack under 
> valgrind, and it works.
> 
> Windows versions of R have I believe a stack of 8Mb, and so I suspect are 
> running close to that with 8-var example.
> 
> The problem appears to be recursion in StripTerm.

default of stack of ld for Mingw seems to be 2M.
see. binutils-2.16.91-20050827-1/ld/emultempl/pe.em
   289D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x20),

How about adding the following to MkRules?
MINGW32LDFLAG=-Wl,--stack=33554432
--
http://www.nakama.ne.jp
e-mail : EIJI Nakama <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] R-beta on AIX5.2

2005-12-13 Thread Ei-ji Nakama
I build R-beta on AIX5.2 is failed.

make[3]: Entering directory
`/home/nakama/Rbeta/R-beta/src/nmath'
xlc_r -I. -I../../src/include -I../../src/include -I/usr/local/include
-I/opt/freeware/include -DHAVE_CONFIG_H   -q64 -I/usr/local/include
-I/opt/freeware/include -O2 -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -c
mlutils.c -o mlutils.o
"nmath.h", line 50.9: 1506-213 (S) Macro name calloc cannot be
redefined.
"nmath.h", line 50.9: 1506-358 (I) "calloc" is defined on line 641 of
/usr/include/stdlib.h.
make[3]: *** [mlutils.o] Error 1


--- R-beta.orig/src/nmath/nmath.h   2005-10-06 19:25:25.0 +0900
+++ R-beta/src/nmath/nmath.h2005-12-13 19:33:59.0 +0900
@@ -47,6 +47,7 @@
 #define ML_NAN R_NaN
 
 void R_CheckUserInterrupt(void);
+#undef  calloc
 #define calloc R_chk_calloc
 #define free R_chk_free
 

--
http://www.nakama.ne.jp, http://r.nakama.ne.jp
e-mail : EIJI Nakama <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] problem with display of complex number

2018-07-09 Thread Ei-ji Nakama
Hi,

> 1e10+5i
[1] 1e+10+0e+00i
> Im(1e10+5i)
[1] 5

maybe little better...

--- R-3.5.1.orig/src/main/complex.c2018-03-26 07:02:25.0 +0900
+++ R-3.5.1/src/main/complex.c2018-07-10 12:50:42.523874767 +0900
@@ -381,6 +381,7 @@
 r->i = fround(pow10 * x->i, digits)/pow10;
 } else {
 digits = (double)(dig);
+if(digits < 1) digits=1; /* a little better */
 r->r = fround(x->r, digits);
 r->i = fround(x->i, digits);
 }


-- 
Best Regards,
-- 
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] SurviveGotoBLAS2 for Win64 (human sacrifice release)

2010-12-04 Thread Ei-ji Nakama
Hi,

I put below Rblas.dll(GotoBLAS2 for Win64).
http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/windows/x64/Rblas.dll
It's a tryal phase.

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] SurviveGotoBLAS2 for Win64 (human sacrifice release)

2010-12-05 Thread Ei-ji Nakama
Hi,

2010/12/5 Prof Brian Ripley :
> However, like most BLAS this is tied to a particular chip (you don't say what 
>you
> used: my machine is identified as penryn) and I am undecided if it is worth
> provided a range of pre-compiled GotoBLAS2 Rblas.dll (or how wide the range
> would need to be to be useful).

It is the build with DYNAMIC_ARCH.

>  Maybe just "core2" would be useful: maybe penryn, dunnington, nehalem
> and atom are needed.  (A quick look suggests dunnington is not used,
> and nehalem is only used on x86_64.)

If CPU is not identified, an appropriate routine is not used.
However, neither the model of CPU nor the value of the exmodel etc
completely have the rule.
The stack alignments of Win64 are 8bytes in default.
However, stack alignments of Win32 is 4bytes (mingw,thread and DLL case).
Therefore, it doesn't run.
If the results of a lot of CPUID(http://www.etallen.com/cpuid.html)
are collected,
the automatic recognition is ameliorable.

$ ./cpuid | sed -n '/^CPU 0:/,/^CPU 1:/p'|grep "vendor_id" -B0 -C8
  vendor_id = "GenuineIntel"
  version information (1/eax):
 processor type  = primary processor (0)
 family  = Intel Pentium Pro/II/III/Celeron/Core/Core
2/Atom, AMD Athlon/Duron, Cyrix M2, VIA C3 (6)
 model   = 0xc (12)
 stepping id = 0x2 (2)
 extended family = 0x0 (0)
 extended model  = 0x2 (2)
 (simple synth)  = Intel Core i7-900 (Gulftown B1) / Core i7-980X
(Gulftown B1) / Xeon Processor 3600 (Westmere-EP B1) / Xeon Processor
5600 (Westmere-EP B1), 32nm

> So I'd identified this as something which would need quite a bit of thought,
> maybe something to be done for R 2.13.0.

I reaction may be dull.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] SurviveGotoBLAS2 for Win64 (RC release)

2011-02-09 Thread Ei-ji Nakama
Hi,

I put below Rblas.dll(GotoBLAS2 for Win64).
http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/windows/x64/
please choose the core-name of your CPU.
The recognition of the CPU of DYNAMIC_ARCH is low.

zdot[cu], zgemv came to calculate definitely.

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] SurviveGotoBLAS2 for Win64 (RC release)

2011-03-29 Thread Ei-ji Nakama
Hi,

I made the GotoBLAS2 for OSX version.
two binaries are divided by kind of powerPC.
neither binaries are different on Intel.
because there is not PPC, I can't confirm it.

http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/OSX/

2011/2/10 Ei-ji Nakama :
> Hi,
>
> I put below Rblas.dll(GotoBLAS2 for Win64).
> http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/windows/x64/
> please choose the core-name of your CPU.
> The recognition of the CPU of DYNAMIC_ARCH is low.
>
> zdot[cu], zgemv came to calculate definitely.
>
> --
> EI-JI Nakama  
> "\u4e2d\u9593\u6804\u6cbb"  
>

--
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] SurviveGotoBLAS2 for Win64 (RC release)

2011-03-31 Thread Ei-ji Nakama
> Good to see that at least someone is doing business as usual in Japan these 
> days.

Some people can't download it, can know the rolling blackouts in Tokyo area...
Today is no plan of blackout.

Best Regards,
--
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Does anybody successfully built latest R on AIX 5.3?

2011-06-19 Thread Ei-ji Nakama
Hi,

> This is strange, we are hoping to improve R performance through high clock 
> speed Power CPU(4.0 GHz above),
> Now I think we should take more considerations, RAM is also cheaper for X86 
> than Power :)

power is no good CPU.

$ lsdev -C | grep proc
proc0  Available 00-00Processor
proc2  Available 00-02Processor
$ lsattr -El proc0
frequency   420400 Processor Speed   False
smt_enabled true   Processor SMT enabled False
smt_threads 2  Processor SMT threads False
state   enable Processor state   False
typePowerPC_POWER6 Processor typeFalse
$ lsattr -El proc2
frequency   420400 Processor Speed   False
smt_enabled true   Processor SMT enabled False
smt_threads 2  Processor SMT threads False
state   enable Processor state   False
typePowerPC_POWER6 Processor typeFalse

As a result of DGEMM by GotoBLAS(http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2).
$ GOTO_NUM_THREADS=1 ./bm 2000
   12.954 GFLOPS (N x N : N=2000 1.23517sec)
   12.719 GFLOPS (N x T : N=2000 1.25796sec)
   13.118 GFLOPS (T x N : N=2000 1.21965sec)
   12.726 GFLOPS (T x T : N=2000 1.25732sec)
$ GOTO_NUM_THREADS=2 ./bm 2000
   25.259 GFLOPS (N x N : N=2000 0.633444sec)
   24.050 GFLOPS (N x T : N=2000 0.665272sec)
   25.710 GFLOPS (T x N : N=2000 0.622316sec)
   24.075 GFLOPS (T x T : N=2000 0.664595sec)
$ GOTO_NUM_THREADS=4 ./bm 2000
   21.311 GFLOPS (N x N : N=2000 0.750802sec)
   25.778 GFLOPS (N x T : N=2000 0.620694sec)
   26.398 GFLOPS (T x N : N=2000 0.60611sec)
   25.826 GFLOPS (T x T : N=2000 0.619536sec)

It's fast with the structure (L2 shared cache) of the CPU to 2CPU.

Best Regards,
--
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] additional leap second

2015-06-30 Thread Ei-ji Nakama
hi,

Index: leap_second/src/library/base/R/zdatetime.R
===
--- leap_second/src/library/base/R/zdatetime.R(revision 68608)
+++ leap_second/src/library/base/R/zdatetime.R(working copy)
@@ -24,7 +24,8 @@
   "1979-12-31", "1981-6-30", "1982-6-30", "1983-6-30",
   "1985-6-30", "1987-12-31", "1989-12-31", "1990-12-31",
   "1992-6-30", "1993-6-30", "1994-6-30","1995-12-31",
-  "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31", "2012-6-30")
+  "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31",
+  "2012-6-30", "2015-6-30")
 .leap.seconds <- strptime(paste(.leap.seconds , "23:59:60"),
   "%Y-%m-%d %H:%M:%S")
 c(as.POSIXct(.leap.seconds, "GMT")) # lose the timezone

Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] additional leap second

2015-07-01 Thread Ei-ji Nakama
sorry, i didnt watch src/main/datetime.c ...

Index: leap_second/src/main/datetime.c
===
--- leap_second/src/main/datetime.c(リビジョン 68608)
+++ leap_second/src/main/datetime.c(作業コピー)
@@ -303,14 +303,15 @@
 }

 #ifndef HAVE_POSIX_LEAPSECONDS
-/* There have been 25 leapseconds: see .leap.seconds in R
+/* There have been many leapseconds: see .leap.seconds in R
+ * (as.Date(.leap.seconds)-as.Date("1970-01-01"))*86400
  */
-static int n_leapseconds = 25;
 static const time_t leapseconds[] =
 {  78796800, 94694400,126230400,157766400,189302400,220924800,252460800,
   283996800,315532800,362793600,394329600,425865600,489024000,567993600,
   631152000,662688000,709948800,741484800,773020800,820454400,867715200,
-   915148800,1136073600,1230768000,1341100800};
+   915148800,1136073600,1230768000,1341100800,1435708800};
+static int n_leapseconds = sizeof(leapseconds)/sizeof(time_t);
 #endif

 static double guess_offset (stm *tm)

2015-07-01 17:13 GMT+09:00 Prof Brian Ripley :
> Thanks, I was working on this.
>
> There are other changes needed in src/main/datetime.c and ?.leap.seconds
> which I will commit shortly, and the example in hist.POSIXt() needed
> alteration (it seems DJM did not run 'make check'!).
>
>
>
> On 01/07/2015 06:20, Ei-ji Nakama wrote:
>>
>> hi,
>>
>> Index: leap_second/src/library/base/R/zdatetime.R
>> ===
>> --- leap_second/src/library/base/R/zdatetime.R(revision 68608)
>> +++ leap_second/src/library/base/R/zdatetime.R(working copy)
>> @@ -24,7 +24,8 @@
>> "1979-12-31", "1981-6-30", "1982-6-30", "1983-6-30",
>> "1985-6-30", "1987-12-31", "1989-12-31", "1990-12-31",
>> "1992-6-30", "1993-6-30", "1994-6-30","1995-12-31",
>> -  "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31",
>> "2012-6-30")
>> +  "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31",
>> +  "2012-6-30", "2015-6-30")
>>   .leap.seconds <- strptime(paste(.leap.seconds , "23:59:60"),
>> "%Y-%m-%d %H:%M:%S")
>>   c(as.POSIXct(.leap.seconds, "GMT")) # lose the timezone
>>
>> Best Regards,
>> --
>> Eiji NAKAMA 
>> "\u4e2d\u9593\u6804\u6cbb"  
>>
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
>
> --
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
> 1 South Parks Road, Oxford OX1 3TG, UK



-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Different results for cos,sin,tan and cospi,sinpi,tanpi

2016-11-30 Thread Ei-ji Nakama
Hi,

i try sin, cos, and tan.

> sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi)
[1] 0.5444181 0.8388140 1.5407532

However, *pi results the following

> sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45)
[1] 1 0 0

Please try whether the following becomes all right.

diff -ruN R-3.3.2.orig/src/nmath/cospi.c R-3.3.2/src/nmath/cospi.c
--- R-3.3.2.orig/src/nmath/cospi.c  2016-09-15 07:15:31.0 +0900
+++ R-3.3.2/src/nmath/cospi.c   2016-12-01 13:54:38.863357149 +0900
@@ -35,7 +35,11 @@
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

-x = fmod(fabs(x), 2.);// cos() symmetric; cos(pi(x + 2k)) ==
cos(pi x) for all integer k
+x = fabs(x);
+if ( x > 9007199254740991 ) /* 2^53-1 */
+return cos(M_PI * x);
+
+x = fmod(x, 2.);// cos() symmetric; cos(pi(x + 2k)) == cos(pi x)
for all integer k
 if(fmod(x, 1.) == 0.5) return 0.;
 if( x == 1.)   return -1.;
 if( x == 0.)   return  1.;
@@ -57,6 +61,9 @@
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

+if (( x >  9007199254740991 )||  /*  2^53-1 */
+( x < -9007199254740991 )  ) /* -2^53-1 */
+return sin(M_PI * x);
 x = fmod(x, 2.); // sin(pi(x + 2k)) == sin(pi x)  for all integer k
 // map (-2,2) --> (-1,1] :
 if(x <= -1) x += 2.; else if (x > 1.) x -= 2.;
@@ -81,6 +88,10 @@
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

+if (( x >  9007199254740991 )||  /*  2^53-1 */
+( x < -9007199254740991 )  ) /* -2^53-1 */
+return tan(M_PI * x);
+
 x = fmod(x, 1.); // tan(pi(x + k)) == tan(pi x)  for all integer k
 // map (-1,1) --> (-1/2, 1/2] :
 if(x <= -0.5) x++; else if(x > 0.5) x--;

-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Different results for cos,sin,tan and cospi,sinpi,tanpi

2016-12-01 Thread Ei-ji Nakama
hi,

my environment...
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 8 (jessie)

locale:
 [1] LC_CTYPE=ja_JP.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=ja_JP.UTF-8LC_COLLATE=ja_JP.UTF-8
 [5] LC_MONETARY=ja_JP.UTF-8LC_MESSAGES=ja_JP.UTF-8
 [7] LC_PAPER=ja_JP.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=ja_JP.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

It's not a very good example...

f0<-function(x,y)exp(complex(real=x,imag=y))
f1<-function(x,y)complex(real=exp(1)^x*cos(y),imag=exp(1)^x*sin(y))
f2<-function(x,y)complex(real=exp(1)^x*cospi(y/pi),imag=exp(1)^x*sinpi(y/pi))

f0(700,1.23)
f1(700,1.23)
f2(700,1.23)

f0(700,1.23e23)
f1(700,1.23e23)
f2(700,1.23e23)

Garbage number is required.

Thank you!

2016-12-01 18:31 GMT+09:00 Prof Brian Ripley :
> Please note that you need to report your platforms (as per the posting
> guide), as the C function starts
>
> #ifdef HAVE_COSPI
> #elif defined HAVE___COSPI
> double cospi(double x) {
> return __cospi(x);
> }
>
> And AFAICS the system versions on Solaris and OS X behave the same way as
> R's substitute.
>
>
>
>
> On 01/12/2016 09:12, Martin Maechler wrote:
>>>>>>>
>>>>>>> Martin Maechler 
>>>>>>> on Thu, 1 Dec 2016 09:36:10 +0100 writes:
>>
>>
>>>>>>> Ei-ji Nakama 
>>>>>>> on Thu, 1 Dec 2016 14:39:55 +0900 writes:
>>
>>
>> >> Hi,
>> >> i try sin, cos, and tan.
>>
>> >>> sapply(c(cos,sin,tan),function(x,y)x(y),1.23e45*pi)
>> >> [1] 0.5444181 0.8388140 1.5407532
>>
>> >> However, *pi results the following
>>
>> >>> sapply(c(cospi,sinpi,tanpi),function(x,y)x(y),1.23e45)
>> >> [1] 1 0 0
>>
>> >> Please try whether the following becomes all right.
>>
>> > [..]
>>
>> > Yes, it does  -- the fix will be in all future versions of R.
>>
>> oops not so quickly, Martin!
>>
>> Of course, the results then coincide,  by sheer implementation.
>>
>> *BUT* it is not at all clear which of the two results is better;
>> e.g., if you replace '1.23' by '1' in the above examples, the
>> result of the unchnaged  *pi() functions is 100% accurate,
>> whereas
>>
>>  R> sapply(c(cos,sin,tan), function(Fn) Fn(1e45*pi))
>>  [1] -0.8847035 -0.4661541  0.5269043
>>
>> is "garbage".  After all,  1e45 is an even integer and so, the
>> (2pi)-periodic functions should give the same as for 0  which
>> *is*  (1, 0, 0).
>>
>> For such very large arguments, the results of all of sin() ,
>> cos() and tan()  are in some sense "random garbage" by
>> necessity:
>> Such large numbers have zero information about the resolution modulo
>> [0, 2pi)  or (-pi, pi]  and hence any (non-trivial) periodic
>> function with such a "small" period can only return "random noise".
>>
>>
>> > Thank you very much Ei-ji Nakama, for this valuable contribution
>> > to make R better!
>>
>> That is still true!  It raises the issue to all of us and will
>> improve the documentation at least!
>>
>> At the moment, I'm not sure where we should go.
>> Of course, I could start experiments using my own 'Rmpfr'
>> package where I can (with increasing computational effort!) get
>> correct values (for increasingly larger arguments) but at the
>> moment, I don't see how this would help.
>>
>> Martin
>
>
>
> --
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford



-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Different results for cos,sin,tan and cospi,sinpi,tanpi

2016-12-05 Thread Ei-ji Nakama
hello,

i read this pdf (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1950.pdf)
i think ... x to be integer only(more accurate value).

following test code and patch.
### F.10.1.12 The cospi functions
## cospi(+-0)  : 1, 1
cospi(c(+0,-0))
## cospi(n + 1/2)  : all 0
cospi((-4:4)+.5)
## cospi(+-Inf): NaN
cospi(c(+Inf,-Inf))
## cospi(n)
cospi((-4:4))

### F.10.1.13 The sinpi functions
## sinpi(+-0)  :+0,-0
sprintf("%a",sinpi(c(+0,-0)))
## sinpi(n + 1/2)  : all 0
sinpi((-4:4))
## sinpi(+-Inf): NaN
sinpi(c(+Inf,-Inf))
## sinpi(n):1 -1  1 -1  1 -1  1 -1  1
sinpi((-4:4+.5))

### F.10.1.14 The tanpi functions
## tanpi(+-0)   :+0,-0
sprintf("%a",tanpi(c(+0,-0)))
## tanpi(pos even and neg odd)  :+0
sprintf("%a",tanpi(c(-3,-1,2,4)))
## tanpi(pos odd and ned even)  :-0
sprintf("%a",tanpi(c(-4,-2,1,3)))
## tanpi(n+1/2) n = even:+Inf
tanpi(c(1:3*2)+.5)
tanpi(c(1:3*2)*-1+.5)
## tanpi(n+1/2) n = odd :-Inf
tanpi(c(1:3*2+1)+.5)
tanpi(c(1:3*2+1)*-1+.5)

## tanpi(+-Inf) :NaN NaN
tanpi(c(+Inf,-Inf))

## no integer
sinpi(1.23e23) # 0.4652223
cospi(1.23e23) # 0.8851939
tanpi(1.23e23) # 0.5255597



--- R-3.3.2.orig/src/nmath/cospi.c2016-09-15 07:15:31.0 +0900
+++ R-3.3.2/src/nmath/cospi.c2016-12-05 21:29:20.764593514 +0900
@@ -21,13 +21,10 @@
The __cospi etc variants are from macOS (and perhaps other
BSD-based systems).
 */

-#ifdef HAVE_COSPI
-#elif defined HAVE___COSPI
-double cospi(double x) {
-return __cospi(x);
-}
+
+#if defined(__STDC_WANT_IEC_60559_FUNCS_EXT__) &&
__STDC_WANT_IEC_60559_FUNCS_EXT__ >= 201506L
+/* use standard cospi */
 #else
-// cos(pi * x)  -- exact when x = k/2  for all integer k
 double cospi(double x) {
 #ifdef IEEE_754
 /* NaNs propagated correctly */
@@ -35,7 +32,11 @@
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

-x = fmod(fabs(x), 2.);// cos() symmetric; cos(pi(x + 2k)) ==
cos(pi x) for all integer k
+x = fabs(x);
+if ( x > 9007199254740991 ) /* 2^53-1 */
+return cos(M_PI * x);
+
+x = fmod(x, 2.);// cos() symmetric; cos(pi(x + 2k)) == cos(pi x)
for all integer k
 if(fmod(x, 1.) == 0.5) return 0.;
 if( x == 1.)return -1.;
 if( x == 0.)return  1.;
@@ -44,11 +45,8 @@
 }
 #endif

-#ifdef HAVE_SINPI
-#elif defined HAVE___SINPI
-double sinpi(double x) {
-return __sinpi(x);
-}
+#if defined(__STDC_WANT_IEC_60559_FUNCS_EXT__) &&
__STDC_WANT_IEC_60559_FUNCS_EXT__ >= 201506L
+/* use standard cospi */
 #else
 // sin(pi * x)  -- exact when x = k/2  for all integer k
 double sinpi(double x) {
@@ -57,6 +55,12 @@
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

+if (( x >  9007199254740991 )||  /*  2^53-1 */
+( x < -9007199254740991 )  ) /* -2^53-1 */
+return sin(M_PI * x);
+
+if( x == 0 || x == -0 )
+return(x);
 x = fmod(x, 2.); // sin(pi(x + 2k)) == sin(pi x)  for all integer k
 // map (-2,2) --> (-1,1] :
 if(x <= -1) x += 2.; else if (x > 1.) x -= 2.;
@@ -69,26 +73,50 @@
 #endif

 // tan(pi * x)  -- exact when x = k/2  for all integer k
-#if defined(HAVE_TANPI) || defined(HAVE___TANPI)
+#if defined(__STDC_WANT_IEC_60559_FUNCS_EXT__) &&
__STDC_WANT_IEC_60559_FUNCS_EXT__ >= 201506L
+/* use standard cospi */
 // for use in arithmetic.c, half-values documented to give NaN
-double Rtanpi(double x)
 #else
 double tanpi(double x)
-#endif
 {
+  int _sig=0;
+  int _even=0;
+  int _odd=0;
+  int _int=0;
 #ifdef IEEE_754
 if (ISNAN(x)) return x;
 #endif
 if(!R_FINITE(x)) ML_ERR_return_NAN;

-x = fmod(x, 1.); // tan(pi(x + k)) == tan(pi x)  for all integer k
-// map (-1,1) --> (-1/2, 1/2] :
-if(x <= -0.5) x++; else if(x > 0.5) x--;
-return (x == 0.) ? 0. : ((x == 0.5) ? ML_NAN : tan(M_PI * x));
+if (( x >  9007199254740991 )||  /*  2^53-1 */
+( x < -9007199254740991 )  ) /* -2^53-1 */
+return tan(M_PI * x);
+
+if( x == 0. || x == -0. )
+return(x);
+if(x>0) _sig = 1;
+if(x<0) _sig =-1;
+
+x = fmod(x, 2.);
+if(( x == 0.0 )||( x == -0.0)){ _even = 1; _int=1;}
+if(( x == 0.5 )||( x == -0.5))  _even = 1;
+if(( x == 1.0 )||( x == -1.0)){ _odd = 1;  _int=1;}
+if(( x == 1.5 )||( x == -1.5))  _odd = 1;
+if(_int){
+  if( _sig ==  1 && _even ) return(  0.);
+  if( _sig == -1 && _odd  ) return(  0.);
+  if( _sig ==  1 && _odd  ) return( -0.);
+  if( _sig == -1 && _even ) return( -0.);
+}
+if(_even){
+if ( x ==  0.5 ) return(R_PosInf);
+if ( x == -0.5 ) return(R_NegInf);
+}else if (_odd){
+if ( x ==  1.5 ) return(R_NegInf);
+if ( x == -1.5 ) return(R_PosInf);
+}
+// otherwise
+return tan(M_PI * x);
 }

-#if !defin

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-10-02 Thread Ei-ji Nakama
Hello

> The value generated by Fortran's .TRUE. evaluates as "truthy" -- as in
> all(z[[1]]) -- but is neither equal to nor identical to TRUE. Its numeric
> conversion to -1 is most unusual, every other system I've tried converts to
> +1.

Please read the -fpscomp logicals option of ifort.

--
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX-5.3 Issue installing Matrix Package

2014-10-07 Thread Ei-ji Nakama
hi,

>> root 492034 336504   0 14:34:36 pts/11  0:00 sh 
>> /gpfs1/home/shivali/gang/R-3.1.1/lib/R/bin/Rcmd INSTALL Matrix

maybe sh running is not good.
please install bash.
CONFIG_SHELL=/boo/foo/bash before running `configure && make'.

-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [Fwd: Re: AIX-5.3 Issue installing Matrix Package]

2014-10-14 Thread Ei-ji Nakama
did you use and try gmake?
i have not AIX now ...
and all most know-how is written on R-Admin manuals.

2014-10-14 14:14 GMT+09:00  :
> Hi,
> Please help.
>
> Regards,
> Shivali
>
>  Original Message 
> Subject: Re: [Rd] AIX-5.3 Issue installing Matrix Package
> From:shiv...@mail.ncmrwf.gov.in
> Date:Wed, October 8, 2014 3:31 pm
> To:  "Ei-ji Nakama" 
> Cc:  "Martin Maechler" 
>  "R Development List" 
> --
>
> Hi ,
>
> Thanks, but i tried with bash also result is same -
> Package Matrix facing issue while Loading  -
> ~~`
> Creating a generic function for 'qr.qty' from package 'base' in package
> 'Matrix'
> Creating a generic function for 'qr.coef' from package 'base' in package
> 'Matrix'
> Creating a generic function for 'qr.resid' from package 'base' in package
> 'Matrix'
> Creating a generic function for 'qr.fitted' from package 'base' in package
> 'Matrix'
> ** help
> *** installing help indices
> ** building package indices
> Loading required package: Matrix  ==> Hanged up here
> ~``
>
>
>
> [ncmr0202][/gpfs1/home/shivali]> ps -ef | grep R-3.1.1
>  shivali 413756 480210   0 12:49:03 pts/31  0:00 bash
> /gpfs1/home/shivali/gang/R-3.1.1/lib/R/bin/Rcmd INSTALL
> Matrix_1.1-4.tar.gz
>  shivali 291478 413756 120 12:49:03 pts/31 146:54
> /gpfs1/home/shivali/gang/R-3.1.1/lib/R/bin/exec/R --args --args --args
> nextArgMatrix_1.1-4.tar.gz
>  shivali 356902 254484   0 15:17:37 pts/24  0:00 grep R-3.1.1
> [ncmr0202][/gpfs1/home/shivali]>
>
> Regards,
> Shivali Gangwar
>
>> hi,
>>
>>>> root 492034 336504   0 14:34:36 pts/11  0:00 sh
>>>> /gpfs1/home/shivali/gang/R-3.1.1/lib/R/bin/Rcmd INSTALL Matrix
>>
>> maybe sh running is not good.
>> please install bash.
>> CONFIG_SHELL=/boo/foo/bash before running `configure && make'.
>>
>> --
>> Best Regards,
>> --
>> Eiji NAKAMA 
>> "\u4e2d\u9593\u6804\u6cbb"  
>>
>> Email secured by Check Point
>>
>
>
>
>
> Email secured by Check Point
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Using a custom memory allocation function in R

2014-10-22 Thread Ei-ji Nakama
hello,
I do not understand your aim...
it not helpful in malloc_hook? example when I used hugepege is right here.

http://prs.ism.ac.jp/~nakama/ISM/ism.c

However, I think that you can more experiments in numaclt(see man numactl).

2014-10-22 23:53 GMT+09:00 SO User :
> Heads up: I posted this question on Stackoverflow yesterday
> (http://stackoverflow.com/questions/26484103/using-a-custom-memory-allocation-function-in-r).
> So far I haven't gotten a response and I thought this could be an even
> better place to ask such a question.
>
> I would like to be able to use my own memory allocation function for
> certain data structures (real valued vectors and arrays) in R. The
> reason for this is that I need my data to be 64bit aligned and I would
> like to use the numa library for having control over which memory node
> is used (I'm working on compute nodes with four 12-core AMD Opteron
> 6174 CPUs).
>
> Now I have two functions for allocating and freeing memory:
> numa_alloc_onnode and numa_free(courtesy of
> http://stackoverflow.com/questions/8154162/numa-aware-cache-aligned-memory-allocation).
> I'm using R version 3.1.1, so I have access to the function
> allocVector3(src/main/memory.c), which seems to me as the intended way
> of adding a custom memory allocator. I also found the struct
> R_allocator in src/include/R_ext
>
> However it is not clear to me how to put these pieces together. Let's
> say, in R, I want the result res of an evaluation such as
>
> res <- Y - mean(Y)
>
> to be saved in a memory area allocated with my own function, how would
> I do this? Can I integrate allocVector3 directly at the R level? I
> assume I have to go through the R-C interface. As far as I know, I
> cannot just return a pointer to the allocated area, but have to pass
> the result as an argument. So in R I call something like
>
> n <- length(Y)
> res <- numeric(length=1)
> .Call("R_allocate_using_myalloc", n, res)
> res <- Y - mean(Y)
>
> and in C
>
> #include 
> #include 
> #include 
>
> SEXP R_allocate_using_myalloc(SEXP R_n, SEXP R_res){
>
>   PROTECT(R_n = coerceVector(R_n, INTSXP));
>   PROTECT(R_res = coerceVector(R_res, REALSXP));
>   int *restrict n = INTEGER(R_n);
>
>   R_allocator_t myAllocator;
>   myAllocator.mem_alloc = numa_alloc_onnode;
>   myAllocator.mem_free = numa_free;
>   myAllocator.res = NULL;
>   myAllocator.data = ???;
>
>   R_res = allocVector3(REALSXP, n, myAllocator);
>
>   UNPROTECT(2);
>   return R_res;
> }
>
> Unfortunately I cannot get beyond a variable has incomplete type
> 'R_allocator_t' compilation error (I had to remove the .data line
> since I have no clue as to what I should put there). Also the function
> signature for numa_alloc_onnode is (size_t size, int node). How do I
> pass the number of the memory node to the numa_alloc_onnode? Is that
> somehow done through the .data field? Does any of the above code make
> sense? Is there an easier way of achieving what I want to? It seems a
> bit odd to have to allocate a small vector in R and the change its
> location in memory in C just to be able to both control the memory
> allocation and have the vector available in R...
>
> I'm trying to avoid using Rcpp, as I'm modifying a fairly large
> package and do not want to convert all C calls and thought that mixing
> different C interfaces could perform sub-optimally.
>
> Any help is greatly appreciated.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] does parLapplyLB do load-balancing?

2014-12-05 Thread Ei-ji Nakama
Hello,

In such cases, try the Rhpc package.

The following is the result of the benchmark.
http://prs.ism.ac.jp/~nakama/Rhpc/#benchmark

# but tuning is not finished...


2014-12-06 10:36 GMT+09:00 Chris Paciorek :
> Looking at parLapplyLB, one sees that it takes in X and then passes
> splitList(X, length(cl)) to clusterApplyLB, which then calls
> dynamicClusterApply.  Thus while dynamicClusterApply does handle tasks
> in a load-balancing fashion, sending out individual tasks as previous
> tasks complete, parLapplyLB preempts that by splitting up the tasks in
> advance into as many groups of tasks as there are cluster processes.
> This seems to defeat the purpose of load-balancing and of the manner
> in which dynamicClusterApply is coded.
>
> This question basically repeats a question posed in 2013 -- see
> http://r.789695.n4.nabble.com/parLapplyLB-Load-balancing-tt4671848.html
>
> I'm reposting because there doesn't seem to have been any response to
> the previous posting, and it looks like the issue is still present in
> R 3.1 so it seems asking again if this is the intended behavior of
> parLapplyLB.
>
> I'm using R 3.1.1 and the 3.1.1 version of the parallel package under
> Ubuntu 14.04, but the code appears to be the same in R-devel.
>
>
> Chris
>
>
> --
> Chris Paciorek
>
> Statistical Computing Consultant
> Statistical Computing Facility, Econometrics Laboratory, Berkeley
> Research Computing
>
> Office: 495 Evans Hall  Email: pacio...@stat.berkeley.edu
> Mailing Address:Voice: 510-842-6670
> Department of StatisticsFax:   510-642-7892
> 367 Evans Hall  Skype: cjpaciorek
> University of California, Berkeley  WWW:
> www.stat.berkeley.edu/~paciorek
> Berkeley, CA 94720 USA  Permanent forward:
> pacio...@alumni.cmu.edu
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Best Regards,
--
Eiji NAKAMA 
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] View() crashy on Ubuntu 9.04

2009-05-13 Thread Ei-ji Nakama
Hi

2009/5/13 Dirk Eddelbuettel :

> #0  0xb70e685e in XmbLookupString () from /usr/lib/libX11.so.6
> #1  0xb73a9d48 in doSpreadKey (DE=0x8bfd040, key=, 
> event=0xbfed68d8) at dataentry.c:1828

It is generated by XmbLookupString and Xutf8LookupString because
this doesn't make Input context of X11 when dataeditor is View.

static char *GetCharP(DEEvent * event)
{
 
XmbLookupString(ioic, (XKeyEvent *)event, /* ioic at view
time is NULL*/
text, sizeof(text) - clength,
&iokey, &status);
 
}

I think that this only has to limit GetCharP to isEditor=TRUE.
moreover View() was strange operation of  "page down".


http://prs.ism.ac.jp/~nakama/working/dataentry.patch

I think that I improve the above-mentioned by this patch.

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] different results on linux and windows

2009-05-14 Thread Ei-ji Nakama
Hi

2009/5/12 Klaus Nordhausen :
> Our suspicion is that the reason is that some libraries are different
> implemented on linux and windows (XP) compilers.

If useful.

http://www.derkeiler.com/Newsgroups/sci.crypt/2004-10/1325.html

I think that you do not like to use rand and srand.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] sprintf() question

2009-05-17 Thread Ei-ji Nakama
Hi

The result of Windows is clearly strange.

 my Linux machine = good ===
> sessionInfo()
R version 2.9.0 (2009-04-17)
x86_64-pc-linux-gnu

locale:
LC_CTYPE=ja_JP.EUC-JP;LC_NUMERIC=C;LC_TIME=ja_JP.EUC-JP;LC_COLLATE=ja_JP.EUC-JP;
LC_MONETARY=C;LC_MESSAGES=ja_JP.EUC-JP;LC_PAPER=ja_JP.EUC-JP;LC_NAME=C;LC_ADDRES
S=C;LC_TELEPHONE=C;LC_MEASUREMENT=ja_JP.EUC-JP;LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
> sprintf("%a",1:8)
[1] "0x1p+0"   "0x1p+1"   "0x1.8p+1" "0x1p+2"   "0x1.4p+2" "0x1.8p+2" "0x1.cp+2"
[8] "0x1p+3"

 my Windows machine = OMG ==
> sessionInfo()
R version 2.9.0 (2009-04-17)
i386-pc-mingw32

locale:
LC_COLLATE=Japanese_Japan.932;LC_CTYPE=Japanese_Japan.932;LC_MONETARY=Japanese_Japan.932;LC_NUMERIC=C;LC_TIME=Japanese_Japan.932

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
> sprintf("%a",1:8)
[1] "0x1p+0""0x1"   "0x1.8"
"0x1p+4294967294"
[5] "0x1.4p+4294967294" "0x1.8p+4294967294" "0x1.cp+4294967294"
"0x1p+4294967293"

The result improved when I changed handling of uExponent as follows

http://prs.ism.ac.jp/~nakama/working/sprintf_format_a.patch



2009/5/18 Daniel Nordlund :
>> -Original Message-
>> From: Ted Harding [mailto:ted.hard...@manchester.ac.uk]
>> Sent: Sunday, May 17, 2009 3:32 PM
>> To: Daniel Nordlund
>> Cc: r-h...@r-project.org
>> Subject: RE: [R] sprintf() question
>>
>> On 17-May-09 22:03:19, Daniel Nordlund wrote:
>> > When I type the following, I get results different from what I
>> > expected.
>> >
>> >> sprintf('%a',3)
>> > [1] "0x1.8"
>> >
>> > Shouldn't the result be
>> >
>> > [1] "0x1.8p+2"
>>
>> Well, not "p+2" but "p+1"
>>   (0x1.8 = 1.1000[2] ; *2 = 11.000[2] = 3[10]) ;
>> however, I get:
>>
>>   sprintf('%a',3)
>>   # [1] "0x1.8p+1"
>>
>> which is indeed correct.
>>
>>   R version 2.9.0 (2009-04-17) ## Same as yours
>>   platform  i486-pc-linux-gnu  ## Different from yours ...
>>
>> which perhaps suggests that there may be a mis-compilation in the
>> Windows version.
>>
>> Ted.
>>
>> > I read through the help ?sprintf and didn't find anything
>> that changed
>> > my expectation.  What am I misunderstanding?  I am using
>> R-2.9.0 binary
>> > from CRAN on Windows XP Pro, and my session info is
>> >
>> >
>> >> sessionInfo()
>> > R version 2.9.0 (2009-04-17)
>> > i386-pc-mingw32
>> >
>> > locale:
>> > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>> > States.1252;LC_MONETARY=English_United
>> > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>> >
>> > attached base packages:
>> > [1] stats graphics  grDevices utils datasets
>> methods   base
>> >>
>> >
>> > Thanks for any enlightenment.
>> >
>
> Thanks Ted!
>
> Enlightenment is what I asked for, and it is what I got.  I was having a
> senior moment I guess.  I was picturing 8 as binary 0100, when obviously it
> is binary 1000.  So yes, the required power of 2 is 1, and it is fine with
> me that Windows implementation does not display it.  Thanks again.
>
> Dan
>
> Daniel Nordlund
> Bothell, WA  USA
>
> __
> r-h...@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Help on R-2.10.1 installation on AIX5.3

2010-01-25 Thread Ei-ji Nakama
2010/1/25 Jin Xu :
> Actually I successfully compiled R-2.8.1 on this machine wiht these
> parameters and a patch on http://prs.ism.ac.jp/~nakama/AIX/changefiles.
> Would you mind to tell me what I can do if I want to build R-2.10.1

I don't touch AIX from last year...
I asked for the use of AIX.
However, I get the word a request was forgotten well.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] small mistake of tcltk

2010-04-29 Thread Ei-ji Nakama
Hi,

All Japanese encoding was all right if fixed the following.

--- R-2.11.0.orig/src/library/tcltk/src/tcltk.c 2010-03-31
07:10:02.0 +0900
+++ R-2.11.0.work/src/library/tcltk/src/tcltk.c 2010-04-29
23:48:55.0 +0900
@@ -349,7 +349,7 @@
elem = Tcl_NewObj();
Tcl_DStringInit(&s_ds);
s = Tcl_ExternalToUtfDString(encoding,
-(Cchar *) 
translateChar(STRING_ELT(val, i)),
+(Cchar *) 
translateCharUTF8(STRING_ELT(val, i)),
 -1, &s_ds);
Tcl_SetStringObj(elem, s, -1);
Tcl_DStringFree(&s_ds);

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Failure to load the recommended package Matrix (Was: [R] Can one get a list of recommended packages?)

2010-06-14 Thread Ei-ji Nakama
> And if you look at the other R-help message posted by David Kirby you
> will find a link to the trouble ticket report in Sage as
> http://trac.sagemath.org/sage_trac/ticket/9201

>From the link,...
|  kir...@t2:[~] $ echo $LD_LIBRARY_PATH
| 
/usr/local/gcc-4.4.1-sun-linker/lib:/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9:/usr/local/lib

`/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9' is 64bit, it is unnecessary.
I think that this obstructs it.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Failure to load the recommended package Matrix (Was: [R] Can one get a list of recommended packages?)

2010-06-14 Thread Ei-ji Nakama
Sorry, my  bark up the wrong tree...

When LD_LIBRARY_PATH_32 is set, I think that I become it in such a state.

http://docs.sun.com/app/docs/doc/819-0690/chapter1-11192?a=view#chapter1-9

It is better when there is the following.
crle ; crle -64 ; env|grep "LD_"

2010/6/14 Ei-ji Nakama :
>> And if you look at the other R-help message posted by David Kirby you
>> will find a link to the trouble ticket report in Sage as
>> http://trac.sagemath.org/sage_trac/ticket/9201
>
> From the link,...
> |  kir...@t2:[~] $ echo $LD_
> | 
> /usr/local/gcc-4.4.1-sun-linker/lib:/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9:/usr/local/lib
>
> `/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9' is 64bit, it is unnecessary.
> I think that this obstructs it.
> --
> EI-JI Nakama  
> "\u4e2d\u9593\u6804\u6cbb"  
>



-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Failure to load the recommended package Matrix (Was: [R] Can one get a list of recommended packages?)

2010-06-15 Thread Ei-ji Nakama
I'm suffering from hay fever now...

from http://sage.math.washington.edu/home/mpatel/trac/8306/r-2.10.1.p2.log
| gcc -v
| Using built-in specs.
| Target: sparc-sun-solaris2.10
| Configured with: ../gcc-4.4.1/configure
--prefix=/usr/local/gcc-4.4.1-sun-linker/ --with-as=/usr/ccs/bin/as
| --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld
--enable-languages=c,c++,fortran --with-
| mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib
--with-gmp-include=/usr/local/include --with-
| gmp-lib=/usr/local/lib CC=/usr/sfw/bin/gcc CXX=/usr/sfw/bin/g++
| Thread model: posix
| gcc version 4.4.1 (GCC)

I think that this gcc is `/usr/local/gcc-4.4.1-sun-linker/bin/gcc'.
library when gcc compiled it is
`/usr/local/gcc-4.4.1-sun-linker/lib/libgcc_s.so'.

if it follows the instruction of FAQ(gcc).
http://gcc.gnu.org/faq.html#rpath

The build is done by using  run time directory in LD_RUN_PATH.
  LD_RUN_PATH=/usr/local/gcc-4.4.1-sun-linker/lib make
  or
You should enumerate the run time directory of gcc in LD_LIBRARY_PATH.
  LD_LIBRARY_PATH=/usr/local/gcc-4.4.1-sun-linker/lib:$LD_LIBRARY_PATH

I think that it is a policy of system administration. It is not a problem of R.
There is not the problem in R on Solaris10 which I use.

Sorry in advance if I'm wrong.

2010/6/15 Dr. David Kirkby :
> On 06/14/10 10:05 AM, Ei-ji Nakama wrote:
>>>
>>> And if you look at the other R-help message posted by David Kirby you
>>> will find a link to the trouble ticket report in Sage as
>>> http://trac.sagemath.org/sage_trac/ticket/9201
>>
>>> From the link,...
>>
>> |  kir...@t2:[~] $ echo $LD_LIBRARY_PATH
>> |
>> /usr/local/gcc-4.4.1-sun-linker/lib:/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9:/usr/local/lib
>>
>> `/usr/local/gcc-4.4.1-sun-linker/lib/sparcv9' is 64bit, it is unnecessary.
>> I think that this obstructs it.
>
> This is not the reason. If it picked up the wrong library, then there would
> be a message that there was the wrong ELF class, but no library whatever is
> being found.
>
> I've tried without the 'sparcv9' in LD_LIBRARY_PATH and it makes no
> difference whatsoever. I've tried on two SPARCs too, running different
> releases of Solaris 10.
>
> Using 'crle' might work, but that is not really a good answer, as it needs
> root access. It should be possible to install an application like R without
> being root. There is something wrong if LD_LIBRARY_PATH can't be used to
> locate libraries.
>
> I can build the whole of the Sage source code (around 300 MB) and don't see
> this failure elsewhere. Instead, there are a number of programs which link
> to libgcc_s.so.1.
>
> I stuck some further information at
>
> http://trac.sagemath.org/sage_trac/ticket/9201
>
> but it basically just confirms what I've written above.
>
>
>
>



-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] compile 2.4.1 for linux on power cpus

2007-03-15 Thread Ei-ji Nakama
2007/3/16, Andrew Ferris <[EMAIL PROTECTED]>:
> I'm closer but still not quite there. Here's the configure command I'm using:
>
>  ./configure 'CC=gcc -m64' 'CXX=g++ -m64 -mminimal-toc' 'FC=gfortran -mc64 
> -fno-optimize-sibling-calls' 'F77=gfortran -m64 -fno-optimize-sibling-calls' 
> 'LDFLAGS=-L/usr/lib64' R_PAPERSIZE='letter'

$ uname -a
Linux macg5 2.6.18-3-powerpc64 #1 SMP Mon Dec 4 15:40:16 CET 2006
ppc64 GNU/Linux

$ gcc -v
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --disable-softfloat
--enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32
--enable-checking=release powerpc-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

$ gcc -print-multi-lib
.;@[EMAIL PROTECTED]
64;@[EMAIL PROTECTED]@mstrict-align

$ ./configure CC="gcc -m64" \
   CXX="gxx -m64" \
   F77="gfortran -m64" \
   FC="gfortran -m64" \
   CFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" \
   FFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" \
   --without-x

$ file bin/exec/R
bin/exec/R: ELF 64-bit MSB executable, PowerPC 64-bit or cisco 7500,
version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared
libs), for GNU/Linux 2.6.0, not stripped

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] build 2.4.1 for AIX 5.2L

2007-03-19 Thread Ei-ji Nakama
nobody tested it in xlf.
but was able to build it in gcc.
when link as main, export is necessary by all means.

I put patch.
http://prs.ism.ac.jp/%7enakama/AIX/

I am happy if useful.
--
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Rmpi and OpenMPI ?

2007-03-29 Thread Ei-ji Nakama
Prof. Nakano(ism Japan) and I wrestled in Rmpi on HP-MPI.
Do not know a method to distinguish MPI well?
It is an ad-hoc patch at that time as follows.

diff -ruN Rmpi.orig/configure Rmpi/configure
--- Rmpi.orig/configure 2006-10-12 23:47:03.0 +0900
+++ Rmpi/configure  2007-01-10 21:24:55.0 +0900
@@ -1268,7 +1268,7 @@
 fi;

 if test -z "$MPI_ROOT"; then
-  for d in /opt/lib /usr/local/lib /usr/lib; do
+  for d in /opt /opt/lib /usr/local/lib /usr/lib; do
 if test -f $d/lam/include/mpi.h && test -f $d/lam/lib/libmpi.a; then
   echo "I am here $d/lam"
   MPI_ROOT=$d/lam
@@ -1281,6 +1281,10 @@
   echo "I am here $d/mpich"
   MPI_ROOT=$d/mpich
   break
+elif test -f $d/hpmpi/include/mpi.h; then
+  echo "I am here $d/hpmpi"
+  MPI_ROOT=$d/hpmpi
+  break
 fi
   done
 fi
@@ -2781,6 +2785,9 @@
 if test -f ${MPI_ROOT}/lib/libmpi.a; then
 echo "Found libmpi in ${MPI_ROOT}/lib"
 MPI_LIBS="-L${MPI_ROOT}/lib -lmpi"
+elif test -f ${MPI_ROOT}/lib/linux_amd64/libmpi.a; then
+echo "Found in ${MPI_ROOT}/lib/linux_amd64"
+MPI_LIBS="-L${MPI_ROOT}/lib/linux_amd64 -lmpi -lmpio
-Wl,-rpath=${MPI_ROOT}/lib/linux_amd64"
 elif test -f ${MPI_ROOT}/lib/libmpich.a; then
 echo "Found libmpich in ${MPI_ROOT}/lib"
 MPI_LIBS="-L${MPI_ROOT}/lib -lmpich"
@@ -2835,7 +2842,7 @@
 echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_main" >&5
 echo "${ECHO_T}$ac_cv_lib_mpi_main" >&6
 if test $ac_cv_lib_mpi_main = yes; then
- MPI_LIBS="-lmpi"
+ MPI_LIBS="-lmpi -lmpio"
 else
  echo "libmpi not found. exiting..."
exit 1
diff -ruN Rmpi.orig/R/Rcomm.R Rmpi/R/Rcomm.R
--- Rmpi.orig/R/Rcomm.R 2006-02-08 07:11:25.0 +0900
+++ Rmpi/R/Rcomm.R  2007-01-10 21:26:42.0 +0900
@@ -72,11 +72,11 @@

 if (!is.character(slave))
 stop("character argument (slave) expected")
-#if (nslaves > mpi.universe.size()){
-#tmp <- paste("Number of R slaves is over",
-#mpi.universe.size(),": maximum CPUs.")
-#warning(tmp)
-#}
+if (nslaves > mpi.universe.size()){
+tmp <- paste("Number of R slaves is over",
+mpi.universe.size(),": maximum CPUs.")
+warning(tmp)
+}
 else if (nslaves <= 0)
 stop("Choose a positive number of slaves.")
 .Call("mpi_comm_spawn",
diff -ruN Rmpi.orig/R/zzz.R Rmpi/R/zzz.R
--- Rmpi.orig/R/zzz.R   2005-11-24 04:19:26.0 +0900
+++ Rmpi/R/zzz.R2007-01-10 21:18:49.0 +0900
@@ -7,13 +7,13 @@
 #cat(vertxt)

 # Check if lam-mpi is running
-if (.Platform$OS=="unix"){
-   if (length(system("lamnodes",TRUE,ignore.stderr = TRUE)) == 0){
-   cat("\n\tLAM/MPI runtime environment is not operating.\n")
-   cat("\tStarting LAM/MPI runtime environment.\n")
-   system("lamboot -H",ignore.stderr = TRUE)
-   }
-}
+#if (.Platform$OS=="unix"){
+#  if (length(system("lamnodes",TRUE,ignore.stderr = TRUE)) == 0){
+#  cat("\n\tLAM/MPI runtime environment is not operating.\n")
+#  cat("\tStarting LAM/MPI runtime environment.\n")
+#  system("lamboot -H",ignore.stderr = TRUE)
+#  }
+#}

 library.dynam("Rmpi", pkg, lib)
 if (!TRUE)
diff -ruN Rmpi.orig/src/Rmpi.c Rmpi/src/Rmpi.c
--- Rmpi.orig/src/Rmpi.c2006-09-05 23:10:59.0 +0900
+++ Rmpi/src/Rmpi.c 2007-01-10 21:18:49.0 +0900
@@ -77,7 +77,7 @@
return AsInt(LENGTH(STRING_ELT(sexp_data,0)));
 }

-#ifdef MPI2
+#if defined(MPI2) || (defined(HP_MPI) && HP_MPI > 200)
 SEXP mpi_universe_size(){
int *MPI_Universe_Size;
int univ_flag;
@@ -857,7 +857,7 @@
return AsInt(flag);
 }

-#ifdef MPI2
+#if defined(MPI2) || (defined(HP_MPI) && HP_MPI > 200)
 SEXP mpi_comm_spawn (SEXP sexp_slave,
 SEXP sexp_argv,
 SEXP sexp_nslave,


2007/3/28, Dirk Eddelbuettel <[EMAIL PROTECTED]>:
>
> Has anybody tried to use Rmpi with the OpenMPI library instead of LAM/MPI?
>
> LAM appears to be somewhat hardcoded in the Rmpi setup. Before I start to
> experiment with changing this, has anybody else tried Rmpi with non-LAM MPI
> implementations?
>
> Dirk
>
> --
> Hell, there are no rules here - we're trying to accomplish something.
>   -- Thomas A. Edison
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX testers needed

2007-04-21 Thread Ei-ji Nakama
Hi,
Thank you for the test.
What did the compiler use?

I am making the  wrapper that uses iconv of AIX.
However, there is still an bug...


2007/4/20, Daniel Platt <[EMAIL PROTECTED]>:
> Hi,
>
> The build worked smoothly.
>
> 'install.packages("e1071")' worked correctly (this used to crash on the
> only version I had managed to build before).
>
> I have noticed that there are a lot of permissions that I had to check
> after I did a "make install" .
>
> "make check" failed with the following message:
>
> [EMAIL PROTECTED]:/geno4/watplatt/R/R-rc $ make check
> make[1]: Entering directory `/geno4/watplatt/R/R-rc/tests'
> make[2]: Entering directory `/geno4/watplatt/R/R-rc/tests'
> make[3]: Entering directory `/geno4/watplatt/R/R-rc/tests/Examples'
> make[4]: Entering directory `/geno4/watplatt/R/R-rc/tests/Examples'
> make[4]: `Makedeps' is up to date.
> make[4]: Leaving directory `/geno4/watplatt/R/R-rc/tests/Examples'
> make[4]: Entering directory `/geno4/watplatt/R/R-rc/tests/Examples'
> running code in 'base-Ex.R' ...make[4]: *** [base-Ex.Rout] Error 1
> make[4]: Leaving directory `/geno4/watplatt/R/R-rc/tests/Examples'
> make[3]: *** [test-Examples-Base] Error 2
> make[3]: Leaving directory `/geno4/watplatt/R/R-rc/tests/Examples'
> make[2]: *** [test-Examples] Error 2
> make[2]: Leaving directory `/geno4/watplatt/R/R-rc/tests'
> make[1]: *** [test-all-basics] Error 1
> make[1]: Leaving directory `/geno4/watplatt/R/R-rc/tests'
> make: *** [check] Error 2
> [EMAIL PROTECTED]:/geno4/watplatt/R/R-rc $
>
> The log file indicates the error is due to iconv not being available on
> the system.  (Specifically, configure would not run without the iconv flag
> being set to "no").
>
> Dan
>
> Daniel E. Platt
> Bioinformatics and Pattern Discovery
> IBM T. J. Watson Research Center
> Yorktown Hgts, NY 10598
> (914)945-1388
>
>
>
> Prof Brian Ripley <[EMAIL PROTECTED]>
> 03/29/2007 02:27 AM
>
> To
> R-devel@R-project.org
> cc
> Matthew Beason <[EMAIL PROTECTED]>, Tiong Lim <[EMAIL PROTECTED]>,
> "Sheth, Jagat K" <[EMAIL PROTECTED]>, kamil Marcinkowski
> <[EMAIL PROTECTED]>, Eric Harley <[EMAIL PROTECTED]>, Roy Heimbach
> <[EMAIL PROTECTED]>, Daniel Platt/Watson/[EMAIL PROTECTED]
> Subject
> AIX testers needed
>
>
>
>
>
>
> With much thanks to Ei-ji Nakama, R 2.5.0 alpha supports building on AIX
> (at least AIX 5.2 on one system).
>
> Would anyone able to test this please get the latest tarball from
>
> http://cran.r-project.org/src/base-prerelease/R-latest.tar.gz
>
> and try installing (after reading the AIX notes in R-admin.html section
> C.9).
>
> In particular it would be very helpful to know if
>
> 1) --enable-BLAS-shlib works (it is the default everywhere except AIX and
> Darwin)
>
> 2) if people succeed in installing GNU libiconv and building without
> needing --without-iconv.
>
> I am Cc:ing all the people I tracked down who reported attempted AIX
> installations in 2006 in the hope that they may still be interested.
>
> Please report success and any hints or problems in the R-devel list.
>
> --
> Brian D. Ripley,  [EMAIL PROTECTED]
> 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, UKFax:  +44 1865 272595
>
>
> [[alternative HTML version deleted]]
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX testers needed

2007-05-19 Thread Ei-ji Nakama
Hi.

system("ulimit") of AIX gives back file block size.
A limit of memory is `ulimit -m'.

I made gcc-4.1.2 and made R-2.5.0+patched, but the problem did not happen.

$ gcc-4.1 -v
Using built-in specs.
Target: powerpc-ibm-aix5.2.0.0
Configured with: ../configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --disable-nls --prefix=/usr/local1/gcc-4.1.2
--enable-threads --host=powerpc-ibm-aix5.2.0.0 --program-suffix=-4.1
--with-gmp=/usr/local1 --with-mpfr=/usr/local1
--enable-languages=c,c++,f95
Thread model: aix
gcc version 4.1.2

$ gcc-4.1 -print-multi-lib
.;
pthread;@pthread
ppc64;@maix64
pthread/ppc64;@[EMAIL PROTECTED]

$ export OBJECT_MODE=64
$ ./configure CC="gcc-4.1 -maix64" \
   F77="gfortran-4.1 -maix64" \
   CXX="g++-4.1 -maix64" \
   --enable-BLAS-shlib --without-iconv


2007/5/19, Jason Barnhart <[EMAIL PROTECTED]>:
> Per the request to test the latest tarball referenced below, I have
> built R on AIX 5.3. There is a memory issue, please see 3) below.
>
> 1) Build with --enable-BLAS-shlib option.  Builds and
> passes "make check".
>
> 2) GNU libiconv was installed; R configured *without*
> the --without-
> iconv option. Builds and passes "make check."
>
> 3) Memory issue:
> a) Although the server possesses 8GB of RAM and
> system("ulimit") returns "unlimited" as its value, R does not
> "have enough memory."
>
> b) This code works on R-2.4.0 on WinXP with 2GB of RAM, but
> fails on the AIX build.  Example code:
>
> > xx <- matrix(rep(1e+10,1e7),nrow=1e4,ncol=1e3)
> > tmp.df <- as.data.frame(cbind(xx,xx,xx))
> Error: cannot allocate vector of size 228.9 Mb
> > gc()
>used (Mb) gc trigger  (Mb) max used  (Mb)
> Ncells   233035  6.3 467875  12.5   35   9.4
> Vcells 10104141 77.1   31854441 243.1 30104289 229.7
>
> 4) Used gcc-4.1.2; I have not tried the native compiler.
>
> Questions:
>
> 1) Are there suggestions on how to diagnose and resolve the memory
> issue?  I'm still building my tool chain and I am in the midst of
> installing gdb.
>
> 2) Regarding the build process itself, is there more documentation
> or results that I should forward?
>
> Thanks,
> -jason
>
>
> > version   _
> platform   powerpc-ibm-aix5.3.0.0
> arch   powerpc
> os aix5.3.0.0
> system powerpc, aix5.3.0.0
> status RC
> major  2
> minor  5.0
> year   2007
> month  04
> day22
> svn rev41276
> language   R
> version.string R version 2.5.0 RC (2007-04-22 r41276)
>
>
> - Original Message -
> From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> To: 
> Cc: "Sheth, Jagat K" <[EMAIL PROTECTED]>; "kamil
> Marcinkowski" <[EMAIL PROTECTED]>; "Tiong Lim" <[EMAIL PROTECTED]>;
> "Eric Harley" <[EMAIL PROTECTED]>; "Matthew Beason"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2007 11:27 PM
> Subject: [Rd] AIX testers needed
>
>
> > With much thanks to Ei-ji Nakama, R 2.5.0 alpha supports building on
> > AIX
> > (at least AIX 5.2 on one system).
> >
> > Would anyone able to test this please get the latest tarball from
> >
> > http://cran.r-project.org/src/base-prerelease/R-latest.tar.gz
> >
> > and try installing (after reading the AIX notes in R-admin.html
> > section
> > C.9).
> >
> > In particular it would be very helpful to know if
> >
> > 1) --enable-BLAS-shlib works (it is the default everywhere except
> > AIX and
> > Darwin)
> >
> > 2) if people succeed in installing GNU libiconv and building without
> > needing --without-iconv.
> >
> > I am Cc:ing all the people I tracked down who reported attempted AIX
> > installations in 2006 in the hope that they may still be interested.
> >
> > Please report success and any hints or problems in the R-devel list.
> >
> > --
> > Brian D. Ripley,          [EMAIL PROTECTED]
> > 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, UKFax:  +44 1865 272595
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX testers needed

2007-05-21 Thread Ei-ji Nakama
Hi.

I was not careful to 32bit very much.
You can expand memory for data to 2G by LDR_CNTRL.
It is as follows.

LDR_CNTRL="MAXDATA=0x1000"  1 256 MB
LDR_CNTRL="MAXDATA=0x2000"  2 512 MB
LDR_CNTRL="MAXDATA=0x3000"  3 768 MB
LDR_CNTRL="MAXDATA=0x4000"  4   1024 MB
LDR_CNTRL="MAXDATA=0x5000"  5   1280 MB
LDR_CNTRL="MAXDATA=0x6000"  6   1536 MB
LDR_CNTRL="MAXDATA=0x7000"  7   1792 MB
LDR_CNTRL="MAXDATA=0x8000"  8   2048 MB

try.
$ export  LDR_CNTRL="MAXDATA=0x8000"
$ R -q
> xx <- matrix(rep(1e+10,1e7),nrow=1e4,ncol=1e3)
> tmp.df <- as.data.frame(cbind(xx,xx,xx))
>



2007/5/22, Jason Barnhart <[EMAIL PROTECTED]>:
> Thank you for responding.
>
> I should have added -a on my ulimit command.  Here are its results;
> which I believe are not the limiting factor.
>
> %/ > ulimit -a
> core file size(blocks, -c) 1048575
> data seg size (kbytes, -d) unlimited
> file size (blocks, -f) unlimited
> max memory size   (kbytes, -m) 32768
> open files(-n) 2000
> pipe size  (512 bytes, -p) 64
> stack size(kbytes, -s) hard
> cpu time (seconds, -t) unlimited
> max user processes(-u) 128
> virtual memory(kbytes, -v) unlimited
>
> Here are my gcc-v results.  They are very similiar.
>
> %/ > gcc -v
> Using built-in specs.
> Target: powerpc-ibm-aix5.3.0.0
> Configured with: ../gcc-4.1.2/configure
> --prefix=/opt/sas/msd/home/barnharj/usr/local
> --program-suffix=-4.1.2
> --enable-threads=aix
> --enable-languages=c,c++,fortran
> --disable-nls
> --with-mpfr=/opt/sas/msd/home/barnharj/usr/local
> --with-gmp=/opt/sas/msd/home/barnharj/usr/local
> Thread model: aix
> gcc version 4.1.2
>
> My results for gcc -print-multi-lib are indentical to yours.
>
> It should be noted that I did not attempt a 64 bit build.  My system
> is not configured properly for that just yet.
>
> Via private correspondence someone also suggested the following
> system("ulimit -d unlimited") during an R session.  That failed as did
> issuing the command before launching R.
>
> I'll keep investigating.
>
> My call to configure is listed below.
>
> /configure --prefix=$HOME/usr/local --program-suffix=rc --with-readline=no
>  --with-x=no --enable-memory-profiling
>
>
> - Original Message -
> From: "Ei-ji Nakama" <[EMAIL PROTECTED]>
> To: "Jason Barnhart" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, May 19, 2007 6:53 PM
> Subject: Re: [Rd] AIX testers needed
>
>
> > Hi.
> >
> > system("ulimit") of AIX gives back file block size.
> > A limit of memory is `ulimit -m'.
> >
> > I made gcc-4.1.2 and made R-2.5.0+patched, but the problem did not
> > happen.
> >
> > $ gcc-4.1 -v
> > Using built-in specs.
> > Target: powerpc-ibm-aix5.2.0.0
> > Configured with: ../configure --with-as=/usr/bin/as
> > --with-ld=/usr/bin/ld --disable-nls --prefix=/usr/local1/gcc-4.1.2
> > --enable-threads --host=powerpc-ibm-aix5.2.0.0 --program-suffix=-4.1
> > --with-gmp=/usr/local1 --with-mpfr=/usr/local1
> > --enable-languages=c,c++,f95
> > Thread model: aix
> > gcc version 4.1.2
> >
> > $ gcc-4.1 -print-multi-lib
> > .;
> > pthread;@pthread
> > ppc64;@maix64
> > pthread/ppc64;@[EMAIL PROTECTED]
> >
> > $ export OBJECT_MODE=64
> > $ ./configure CC="gcc-4.1 -maix64" \
> >   F77="gfortran-4.1 -maix64" \
> >   CXX="g++-4.1 -maix64" \
> >   --enable-BLAS-shlib --without-iconv
> >
> >
> > 2007/5/19, Jason Barnhart <[EMAIL PROTECTED]>:
> >> Per the request to test the latest tarball referenced below, I have
> >> built R on AIX 5.3. There is a memory issue, please see 3) below.
> >>
> >> 1) Build with --enable-BLAS-shlib option.  Builds and
> >> passes "make check".
> >>
> >> 2) GNU libiconv was installed; R configured *without*
> >> the --without-
> >> iconv option. Builds and passes "make check."
> >>
> >> 3) Memory issue:
> >> a) Although the server possesses 8GB of RAM and
> >> system("ulimit") returns "unlimited" as its value, R does
> >> not
> >> "have enough memory."
> >>
> >>   

[Rd] There was a problem by the use of snow.

2007-06-24 Thread Ei-ji Nakama
problem of the very large memory require by the Sign extension.

--- R-2.5.0.orig/src/main/serialize.c   2007-03-27 01:42:08.0 +0900
+++ R-2.5.0/src/main/serialize.c2007-06-25 00:48:58.0 +0900
@@ -1866,7 +1866,7 @@

 static void resize_buffer(membuf_t mb, int needed)
 {
-int newsize = 2 * needed;
+size_t newsize = 2 * needed;
 mb->buf = realloc(mb->buf, newsize);
 if (mb->buf == NULL)
error(_("cannot allocate buffer"));


The time-out of read and write was not set.

51:sendData.SOCKnode <- function(node, data) {
52: timeout <- getClusterOption("timeout")
53: old <- options(timeout = timeout);
54: on.exit(options(old))
55: serialize(data, node$con)
56: }
57:
58:recvData.SOCKnode <- function(node) {
59: timeout <- getClusterOption("timeout")
60: old <- options(timeout = timeout);
61: on.exit(options(old))
62: unserialize(node$con)
63: }



--- R-2.5.0.orig/src/modules/internet/sockconn.c2006-09-04
23:20:59.0 +0900
+++ R-2.5.0/src/modules/internet/sockconn.c 2007-06-25
00:51:38.0 +0900
@@ -155,14 +155,19 @@
 static size_t sock_read(void *ptr, size_t size, size_t nitems,
Rconnection con)
 {
+int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv));
+
+R_SockTimeout(timeout);
 return sock_read_helper(con, ptr, size * nitems)/size;
 }

 static size_t sock_write(const void *ptr, size_t size, size_t nitems,
 Rconnection con)
 {
+int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv));
 Rsockconn this = (Rsockconn)con->private;

+R_SockTimeout(timeout);
 return R_SockWrite(this->fd, ptr, size * nitems)/size;
 }

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] There was a problem by the use of snow.

2007-06-25 Thread Ei-ji Nakama
->buf == NULL)
error(_("cannot allocate buffer"));
@@ -1885,7 +1885,7 @@
 mb->buf[mb->count++] = c;
 }

-static void OutBytesMem(R_outpstream_t stream, void *buf, int length)
+static void OutBytesMem(R_outpstream_t stream, void *buf, size_t length)
 {
 membuf_t mb = stream->data;
 if (mb->count + length > mb->size)
@@ -1902,7 +1902,7 @@
 return mb->buf[mb->count++];
 }

-static void InBytesMem(R_inpstream_t stream, void *buf, int length)
+static void InBytesMem(R_inpstream_t stream, void *buf, size_t length)
 {
 membuf_t mb = stream->data;
 if (mb->count + length > mb->size)
@@ -1912,7 +1912,7 @@
 }

 static void InitMemInPStream(R_inpstream_t stream, membuf_t mb,
-void *buf, int length,
+void *buf, size_t length,
 SEXP (*phook)(SEXP, SEXP), SEXP pdata)
 {
 mb->count = 0;
diff -ruN R-devel.orig/src/modules/internet/sockconn.c
R-devel/src/modules/internet/sockconn.c
--- R-devel.orig/src/modules/internet/sockconn.c2007-06-03
00:50:32.0 +0900
+++ R-devel/src/modules/internet/sockconn.c 2007-06-25
19:41:32.0 +0900
@@ -155,14 +155,19 @@
 static size_t sock_read(void *ptr, size_t size, size_t nitems,
Rconnection con)
 {
+int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv));
+
+R_SockTimeout(timeout);
 return sock_read_helper(con, ptr, size * nitems)/size;
 }

 static size_t sock_write(const void *ptr, size_t size, size_t nitems,
 Rconnection con)
 {
+int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv));
 Rsockconn this = (Rsockconn)con->private;

+R_SockTimeout(timeout);
 return R_SockWrite(this->fd, ptr, size * nitems)/size;
 }



2007/6/25, Prof Brian Ripley <[EMAIL PROTECTED]>:
> On Mon, 25 Jun 2007, Ei-ji Nakama wrote:
>
> > problem of the very large memory require by the Sign extension.
> >
> > --- R-2.5.0.orig/src/main/serialize.c   2007-03-27 01:42:08.0 +0900
> > +++ R-2.5.0/src/main/serialize.c2007-06-25 00:48:58.0 +0900
> > @@ -1866,7 +1866,7 @@
> >
> > static void resize_buffer(membuf_t mb, int needed)
> > {
> > -int newsize = 2 * needed;
> > +size_t newsize = 2 * needed;
> > mb->buf = realloc(mb->buf, newsize);
> > if (mb->buf == NULL)
> >error(_("cannot allocate buffer"));
>
> Yes, thanks, but the structure also needs to be changed as the next line
> is
>
>  mb->size = newsize;
>
> and so this would set mb->size to a negative value.
>
> Could you please tell us where you encountered this?
>
> As far as I can see, this code is only used via R_serialize for
> serializing to a raw vector, in which case 'size' can safely be 'int' and
> the re-allocation should be up to 2^31-1 bytes at most (and allocating
> twice what you are asked for seems undesirable).  But there is potential
> overflow at
>
>  if (mb->count + length > mb->size)
>
> and possibly elsewhere.
>
>
> > The time-out of read and write was not set.
> >
> > 51:sendData.SOCKnode <- function(node, data) {
> > 52: timeout <- getClusterOption("timeout")
> > 53: old <- options(timeout = timeout);
> > 54: on.exit(options(old))
> > 55: serialize(data, node$con)
> > 56: }
> > 57:
> > 58:recvData.SOCKnode <- function(node) {
> > 59: timeout <- getClusterOption("timeout")
> > 60: old <- options(timeout = timeout);
> > 61: on.exit(options(old))
> > 62: unserialize(node$con)
> > 63: }
>
> I don't think sock_read/sock_write is the right place to make that
> setting.  Ideally it would be set when the option is set, but as this is
> in a module that needs an extension to the interface.
>
> Looking at the code, we read from a socket in blocks of 4096, but we write
> in a single block.  The latter is likely to be the problem, and I think
> some redesigning is necessary here.
>
> Perhaps you and Luke Tierney can comment on exactly what the problem is
> and how best to work around it.
>
> >
> > --- R-2.5.0.orig/src/modules/internet/sockconn.c 2006-09-04 
> > 23:20:59.0 +0900
> > +++ R-2.5.0/src/modules/internet/sockconn.c 2007-06-25
> > 00:51:38.0 +0900
> > @@ -155,14 +155,19 @@
> > static size_t sock_read(void *ptr, size_t size, size_t nitems,
> >Rconnection con)
> > {
> > +int timeout = asInteger(GetOption(install("timeout"), R_BaseEnv));
> > +
> &g

[Rd] chartr better

2007-09-13 Thread Ei-ji Nakama
For example, the following changes are necessary when i convert a
Japanese hiragana into katakana in chattr.

R code:
> chartr("\u3041-\u3093","\u30a1-\u30f3","\u3084\u3063\u305f\u30fc")

--- R-alpha.orig/src/main/character.c   2007-09-05 07:13:27.0 +0900
+++ R-alpha/src/main/character.c2007-09-13 16:10:21.0 +0900
@@ -2041,6 +2041,16 @@
 return(c);
 }

+typedef struct { wchar_t c_old, c_new; } xtable_t;
+static inline int xtable_comp(const xtable_t *a, const xtable_t *b)
+{
+return a->c_old - b->c_old;
+}
+static inline int xtable_key_comp(const wchar_t *a, const xtable_t *b)
+{
+return *a - b->c_old;
+}
+
 SEXP attribute_hidden do_chartr(SEXP call, SEXP op, SEXP args, SEXP env)
 {
 SEXP old, _new, x, y;
@@ -2064,14 +2074,18 @@
 #ifdef SUPPORT_MBCS
 if(mbcslocale) {
 int j, nb, nc;
-wchar_t xtable[65536 + 1], c_old, c_new, *wc;
+xtable_t *xtable;
+int   xtable_cnt;
+wchar_t c_old, c_new, *wc;
 const char *xi, *s;
 struct wtr_spec *trs_old, **trs_old_ptr;
 struct wtr_spec *trs_new, **trs_new_ptr;
-
-for(i = 0; i <= UCHAR_MAX; i++) xtable[i] = i;
+struct wtr_spec *trs_cnt, **trs_cnt_ptr;

 /* Initialize the old and new wtr_spec lists. */
+trs_cnt = Calloc(1, struct wtr_spec);
+trs_cnt->type = WTR_INIT;
+trs_cnt->next = NULL;
 trs_old = Calloc(1, struct wtr_spec);
 trs_old->type = WTR_INIT;
 trs_old->next = NULL;
@@ -2084,6 +2098,7 @@
 if(nc < 0) error(_("invalid multibyte string 'old'"));
 wc = (wchar_t *) R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
 mbstowcs(wc, s, nc + 1);
+wtr_build_spec(wc, trs_cnt); /* use count only */
 wtr_build_spec(wc, trs_old);

s = translateChar(STRING_ELT(_new, 0));
@@ -2096,38 +2111,54 @@
 /* Initialize the pointers for walking through the old and new
wtr_spec lists and retrieving the next chars from the lists.
 */
+trs_cnt_ptr = Calloc(1, struct wtr_spec *);
+*trs_cnt_ptr = trs_cnt->next;
+   for( xtable_cnt = 0 ; wtr_get_next_char_from_spec(trs_cnt_ptr)
;xtable_cnt++ );
+   Free(trs_cnt_ptr);
+   xtable = (xtable_t *)R_alloc(xtable_cnt+1,sizeof(xtable_t));
+
 trs_old_ptr = Calloc(1, struct wtr_spec *);
 *trs_old_ptr = trs_old->next;
 trs_new_ptr = Calloc(1, struct wtr_spec *);
 *trs_new_ptr = trs_new->next;
-for(;;) {
+for(i=0;;i++) {
 c_old = wtr_get_next_char_from_spec(trs_old_ptr);
 c_new = wtr_get_next_char_from_spec(trs_new_ptr);
 if(c_old == '\0')
 break;
 else if(c_new == '\0')
 error(_("'old' is longer than 'new'"));
-else
-xtable[c_old] = c_new;
+else{
+xtable[i].c_old=c_old;
+xtable[i].c_new=c_new;
+   }
 }
+
 /* Free the memory occupied by the wtr_spec lists. */
 wtr_free_spec(trs_old);
 wtr_free_spec(trs_new);
 Free(trs_old_ptr); Free(trs_new_ptr);

+qsort(xtable, xtable_cnt, sizeof(xtable_t),
+  (int(*)(const void *, const void *))xtable_comp);
+
 n = LENGTH(x);
 PROTECT(y = allocVector(STRSXP, n));
 for(i = 0; i < n; i++) {
 if (STRING_ELT(x,i) == NA_STRING)
 SET_STRING_ELT(y, i, NA_STRING);
 else {
+xtable_t *tbl;
 xi = translateChar(STRING_ELT(x, i));
 nc = mbstowcs(NULL, xi, 0);
 if(nc < 0)
 error(_("invalid input multibyte string %d"), i+1);
 wc = (wchar_t *)
R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
 mbstowcs(wc, xi, nc + 1);
-for(j = 0; j < nc; j++) wc[j] = xtable[wc[j]];
+for(j = 0; j < nc; j++)
+if (tbl = bsearch(&wc[j], xtable, xtable_cnt,
sizeof(xtable_t),
+  (int(*)(const void *, const
void *))xtable_key_comp))
+            wc[j]=tbl->c_new;
 nb = wcstombs(NULL, wc, 0);
 cbuf = CallocCharBuf(nb);
 wcstombs(cbuf, wc, nb + 1);

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem building R with Intel MKL v10 BLAS

2008-01-30 Thread Ei-ji Nakama
Hi.

2008/1/25, Michael Braun <[EMAIL PROTECTED]>:
> NO
>
> Hi.  I'm not sure if this is an R-help or R-devel problem, so I'm
> starting here in the hope that someone can help (and willing to go to
> the other list if it's more appropriate).  I think I am following all of
> the instructions in the various manuals, but clearly I am missing something.
>
> I have an Intel EM64T Dell with 2 dual-core Xeon processors running Red
> Hat EL5.  I would like to build R 2.6.1 with lots of debugging and
> profiling options, and link it to the processor-specific Intel MKL blas.
> The problem is that after I compile R, and do R CMD config BLAS_LIBS,
> the response is
> -L/usr/local/lib64/R/lib -lRblas.
>
> This tells me that R is not linked to the Intel BLAS at all.
>
> My config.site file for R is:
>
> #! /bin/sh
>
> R_PAPERSIZE=letter
> CFLAGS="-g -O2 -p -pg"
> CPPFLAGS="-I/opt/intel/mkl/10.0.1.014/include -I/usr/include
> -I/usr/local/include"
> LIBnn=lib64
> BLAS_LIBS="-L/opt/intel/mkl/10.0.1.014/lib/em64t -Wl,--start-group
> -lmkl_gf_lp64.so -lmkl_gnu_thread.so -lmkl_core.so -l -l -l -Wl,
> --end-group -lguide -lpthread -lm"

I have an AMD 64x2 Debian(etch)
$ gcc-4.2 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../gcc-4.2.2/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang
--prefix=/usr/local/gcc-4.2.2 --enable-shared --disable-multilib
--with-system-zlib --without-included-gettext --enable-threads=posix
--enable-nls --program-suffix=-4.2 --enable-__cxa_atexit
--enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
--enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.2.2

MKL_LIB_PATH=/opt/intel/mkl/10.0.1.014/lib/em64t
MKL="   -L${MKL_LIB_PATH}   \
-Wl,--start-group   \
${MKL_LIB_PATH}/libmkl_gf_lp64.a\
${MKL_LIB_PATH}/libmkl_gnu_thread.a \
${MKL_LIB_PATH}/libmkl_core.a   \
-Wl,--end-group \
-liomp5 -lguide -lpthread -lgomp"

./configure CC=gcc-4.2\
CXX=g++-4.2\
F77=gfortran-4.2\
FC=gfortran-4.2\
--with-lapack="$MKL" --with-blas="$MKL"

mkl_core seemed to want to cause libiomp5. dgemm gave a funny result
in matrix of 1000x1000 if I did not link with real libiomp5.

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem building R with Intel MKL v10 BLAS

2008-02-05 Thread Ei-ji Nakama
hi.

2008/2/5, M Redmond <[EMAIL PROTECTED]>:
> --with-blas="-L/.../intel/mkl/10.0.1.014/lib/em64t -lRblas -lmkl_intel_thread
> -lguide -lmkl_lapack -lmkl_core -lpthread" \
> --with-lapack="-L/.../intel/mkl/10.0.1.014/lib/em64t -lRlapack
> -lmkl_intel_thread -lguide -lmkl_lapack -lmkl_core -lpthread" \

Did libRblas and libRlapack make it with manual operation?

I see.../opt/intel/mkl/10.0.1.014/doc/userguide.pdf(Building Custom
Shared Objects)

awk '/F77_SYMBOL\([a-z]+\)\(\)/{FS="[()\t]";if(length($2)){print $2
"_"}}' m4/R.m4 > blas_list
MKL_ROOT=/opt/intel/mkl/10.0.1.014
make -f ${MKL_ROOT}/tools/builder/makefile \
em64t export=blas_list xerbra=xerbla.o \
name=/usr/local/lib/libmkl_myblas MKL_ROOT=${MKL_ROOT}

However, zdotu did not move even if I linked at this point in time

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem building R with Intel MKL v10 BLAS

2008-02-05 Thread Ei-ji Nakama
hi.

2008/2/5, M Redmond <[EMAIL PROTECTED]>:
> --with-blas="-L/.../intel/mkl/10.0.1.014/lib/em64t -lRblas -lmkl_intel_thread
> -lguide -lmkl_lapack -lmkl_core -lpthread" \
> --with-lapack="-L/.../intel/mkl/10.0.1.014/lib/em64t -lRlapack
> -lmkl_intel_thread -lguide -lmkl_lapack -lmkl_core -lpthread" \

Did libRblas and libRlapack make it with manual operation?

I see.../opt/intel/mkl/10.0.1.014/doc/userguide.pdf(Building Custom
Shared Objects)

awk '/F77_SYMBOL\([a-z]+\)\(\)/{FS="[()\t]";if(length($2)){print $2
"_"}}' m4/R.m4 > blas_list
MKL_ROOT=/opt/intel/mkl/10.0.1.014
make -f ${MKL_ROOT}/tools/builder/makefile \
em64t export=blas_list xerbra=xerbla.o \
name=/usr/local/lib/libmkl_myblas MKL_ROOT=${MKL_ROOT}

However, zdotu did not move even if I linked at this point in time

-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] A problem about the Japanese font of OSX

2008-05-22 Thread Ei-ji Nakama
Many Japanese were troubled with the setting of the font.

I added the following to .Rprofile first.

setHook(packageEvent("grDevices", "onLoad"),
 function(...){
   grDevices::quartzFonts(sans=grDevices::quartzFont(
 c("Hiragino Kaku Gothic Pro W3",
   "Hiragino Kaku Gothic Pro W6",
   "Hiragino Kaku Gothic Pro W3",
   "Hiragino Kaku Gothic Pro W6")))
   grDevices::quartz.options(family="sans")
)

However, it was not reflected in family of the default.
If I appoint it with `quartz(family="sans")', which was able to use Japanese.
Therefore I added hook.

attach(NULL, name = "MacJapanEnv")
assign("familyset_hook",
function() { if(names(dev.cur())=="quartz") par(family="sans")},
pos="MacJapanEnv")
setHook("plot.new", get("familyset_hook", pos="MacJapanEnv"))

However, the following practice caused a problem.

> plot(1:5,1:5)
> legend("bottomright",legend=c("a","b"),lwd=1,col=1:2)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0014
0x900031c8 in strlen ()
(gdb) bt
#0  0x900031c8 in strlen ()
#1  0x907bf19c in CFStringCreateWithCString ()
#2  0x0221bc58 in RQuartz_FindFont (fontface=-2147483648,
fontfamily=0xbfffc3c0 "sans") at devQuartz.c:533
#3  0x0221bd0c in RQuartz_Font (gc=0xbfffc378, dd=0x17) at devQuartz.c:548
#4  0x0221c184 in RQuartz_Set (ctx=0x2155eb0, gc=0xbfffc378, flags=8)
at devQuartz.c:623
#5  0x0221cc3c in RQuartz_StrWidth (text=0x1ff7e20 "a", gc=0xbfffc378,
dd=0x212cd60) at devQuartz.c:736

Reference of fontface seems to watch the thing which R must not sometimes watch.

--- R-patched.orig/src/library/grDevices/src/devQuartz.c
2008-05-01 00:45:39.0 +0900
+++ R-patched/src/library/grDevices/src/devQuartz.c 2008-05-22
13:16:46.0 +0900
@@ -529,7 +529,7 @@
 int i;
 for(i = 0; i < length(names); i++)
 if(0 == strcmp(fontfamily, CHAR(STRING_ELT(names, i break;
-if(i < length(names))
+if(i < length(names) && fontface > 0)
 fontName = CFStringCreateWithCString(kCFAllocatorDefault,

CHAR(STRING_ELT(VECTOR_ELT(db, i), fontface - 1)),
 kCFStringEncodingUTF8);

There was not the problem in the Japanese environment if this added a change.

-- 
EI-JI Nakama <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb" <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX 5.3 --enable-R-shlib make error with R-2.7.1

2008-07-01 Thread Ei-ji Nakama
Hi

Perhaps I think that there is a possibility that success of former link
was my hallucination...

Please try this patch if you like.
http://prs.ism.ac.jp/~nakama/AIX/aix_R-2.7.1_Rshlib_include_configure.patch

Some problems are left in gcc, but think that the make is possible.

If you want to eat iconv, please cook the following.
http://prs.ism.ac.jp/~nakama/AIX/AIX_iconv_CookBook.txt

However, a problem occurred in checkFF and nls when I built it in gcc.

Because nls and checkFF do not have any problem with a commercial
compiler, I think that there is a problem in recent gcc side

2008/7/1  <[EMAIL PROTECTED]>:
> Using AIX 5.3 and gcc-4.2.1 for building R-2.7.1 with the following
> configure flags
>
> OBJECT_MODE=64
> CC="gcc -maix64"
> CXX="g++ -maix64"
> F77="gfortran -maix64"
> FC="gfortran -maix64"
> CFLAGS="-g -O3"
> CXXFLAGS="-g -O3"
> FFLAGS="-g -O3"
> FCFLAGS="-g -O3"
> LDFLAGS="-L/$HOME/usr/local/lib/ppc64 -L/$HOME/usr/local/lib"
> CPPFLAGS="-I/$HOME/usr/include"
> ./configure --disable-nls --without-iconv --prefix=$HOME/usr/local
> --enable-R-shlib
>
> After a successful configuration, the make stops with the following
> error on this system
>
> make[3]: Entering directory
> `/home/apps/crm_cm/n731661x/src/R-2.7.1/src/main'
> gcc -maix64 -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2
> -I../../src/extra/pcre  -I. -I../../src/include -I../../src/include
> -I//users/apps/crm_cm/n731661x/usr/include -DHAVE_CONFIG_H
> -mminimal-toc   -g -O3 -c Rmain.c -o Rmain.o
> gcc -maix64 -std=gnu99 -Wl,-brtl -Wl,-bexpall -Wl,-bpT:0x1
> -Wl,-bpD:0x11000 -lc
> -L//users/apps/crm_cm/n731661x/usr/local/lib/ppc64
> -L//users/apps/crm_cm/n731661x/usr/local/lib -o R.bin Rmain.o
> -L../../lib -lR
> ld: 0711-317 ERROR: Undefined symbol: R_running_as_main_program
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: ld returned 8 exit status
> make[3]: *** [R.bin] Error 1
> make[3]: Leaving directory
> `/home/apps/crm_cm/n731661x/src/R-2.7.1/src/main'
> make[2]: *** [R] Error 2
> make[2]: Leaving directory
> `/home/apps/crm_cm/n731661x/src/R-2.7.1/src/main'
> make[1]: *** [R] Error 1
> make[1]: Leaving directory `/home/apps/crm_cm/n731661x/src/R-2.7.1/src'
> make: *** [R] Error 1
>
> On the other hand, no problems on this system with the above
> configuration building R<=2.6.2. Can also successfully build R-2.7.1
> here without --enable-R-shlib.
>
> Will be glad to experiment or provide more details if needed anytime.
>
> Thanks,
> Jagat
>
>
> --
> Jagat K. Sheth
> Prepayment Modeling and Economics
> Wells Fargo Home Mortgage
> 7911 Forsyth Boulevard
> Suite 500, M5001-061
> Clayton, MO 63105
>
> Tel: (314)-726-4496
> Fax: (314)-726-4483
> [EMAIL PROTECTED]
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>



-- 
EI-JI Nakama <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb" <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX 5.3 --enable-R-shlib --with-x ---with-iconv make error with R-2.7.0 and R-2.7.1

2008-07-17 Thread Ei-ji Nakama
Hi, sorry buggy English.

Did you cook this patch?
http://prs.ism.ac.jp/~nakama/AIX/aix_R-2.7.1_Rshlib_include_configure.patch

However, cooking of this patch is bad on AIX.
Therefore I put the thing which was finished with cooking.

http://prs.ism.ac.jp/~nakama/AIX/R-2.7.1.aix080701.tar.gz

I do a wish of tasting to you.

2008/7/17 Fán Lóng <[EMAIL PROTECTED]>:
> --
> ./configure \
>   CC="xlc_r -q64" \
>   CFLAGS="-O -qstrict" \
>   CXX="xlC_r -q64" \
>   CXXFLAGS="-O -qstrict" \
>   F77="xlf_r -q64" \
>   AR="ar -X64" \
>   CPPFLAGS="-I/my_libiconv_dir/include -I/usr/lpp/X11/include/X11" \
>   LDFLAGS="-L/my_libiconv_dir/lib -L/usr/lib -L/usr/X11R6/lib
> -L/my_buildR_dir/R-2.7.0/lib" \
>   --prefix=/my_R_dir \
>   --enable-R-shlib \
>   --enable-BLAS-shlib \
>   --with-x \
>   --with-readline=no \
>   --with-libiconv-prefix="/my_libiconv_dir"

``export OBJECT_MODE=64'' had better set it.
--with-libiconv-prefix are not reflected.

>  Options enabled:   shared BLAS, R profiling, Java

libjpeg and libjpeg-6b of java do conflict in my environment.
I remove PATH of the JAVA at the time of the construction.

> You see the symbols d1mach, interv, TYPEOF, R_CHAR and Rf_isString,
> were not found. As for the library dependence, I add
> /my_libiconv_dir/lib to my LIBPATH to make sure libR.so etc. can find
> the libiconv. Thus, stats.so and tools.so could have be loaded. I
> don't know where I made a mistake. After looking up the R manual and
> diving into Google for help, I've got no usable answer.

I had the sense that GC of ld turned into recently.
Probably former specifications may be bugs.

> Below environment variables may associated:
> LIBPATH="/my_libiconv_dir/lib:.:/rnd/homes/my/rdir/AIX/R-2.7.0/lib/R/lib:.:/usr/lib:/lib"
 
> R_HOME="/rnd/homes/my/rdir/AIX/R-2.7.0"

Because R add it in a shell of ``bin/R'', let's add LIBPATH when it
was said that there is not it.

best,
-- 
EI-JI Nakama 
"\u4e2d\u9593\u6804\u6cbb" 

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX 5.3 --enable-R-shlib --with-x ---with-iconv make error with R-2.7.0 and R-2.7.1

2008-07-31 Thread Ei-ji Nakama
Hi.

Fán Lóng - san seems to have been able to build it in xlc,xlf.
http://prs.ism.ac.jp/~nakama/AIX/
It is only gcc for AIX which is a buggy that I cannot build it well.

--- Fán Lóng - san report -

export OBJECT_MODE=64
export LIBICONV=/where/libiconv/installed

./configure \
  CC="xlc_r -q64" \
  CFLAGS="-O -qstrict" \
  CXX="xlC_r -q64" \
  CXXFLAGS="-O -qstrict" \
  F77="xlf_r -q64" \
  AR="ar -X64" \
  CPPFLAGS="-I$LIBICONV/include -I/usr/lpp/X11/include/X11" \
  LDFLAGS="-L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib" \
  --enable-R-shlib \
  --enable-BLAS-shlib \
  --with-x --with-readline=no

 make
 make install
 LANG=C make check-all

success!!
-- 
EI-JI Nakama 
"\u4e2d\u9593\u6804\u6cbb" 

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] Building with MKL on Ubuntu

2008-11-06 Thread Ei-ji Nakama
Hi

2008/11/6 Anand Patil <[EMAIL PROTECTED]>:
> I tried that earlier, and it doesn't encounter the zdotu error (maybe it was
> fixed in 10.0.5?) but I got a different error:

no, see MKL manual.
Because fortran do not have compatibility, You appoint ABI of your
Fortran in a link of MKL.

> /opt/intel/fce/10.1.018/lib/libiomp5.so: undefined reference to
> `pthread_atfork'

MKL 10.0.1.x that libiomp5 was necessary.
Hmm, but not need libiomp5 with MKL 10.0.5.x.
I do not understand which version MKL were recovered in, but libiomp5
seems to be unnecessary in the latest edition.

MKL_LIB_PATH=/opt/intel/mkl/10.0.5.025/lib/em64t
MKL="   -L${MKL_LIB_PATH}   \
-Wl,--start-group   \
${MKL_LIB_PATH}/libmkl_gf_lp64.a\
${MKL_LIB_PATH}/libmkl_gnu_thread.a \
${MKL_LIB_PATH}/libmkl_core.a   \
-Wl,--end-group  -lgomp"
LDFLAGS="-L$MKL_LIB_PATH" ./configure --with-lapack="$MKL" --with-blas="$MKL"

-liomp5 -lguide -lpthread  You omit three library, and please link

Please check the result of the big %*% just to make sure.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] A small miss of PostScript of CJK in current R-devel

2008-12-24 Thread Ei-ji Nakama
Dear all.

I'm sorry.  I neglected test on CJK.

http://prs.ism.ac.jp/~nakama/working/CIDHexText.patch

now:
103.58 65.52 <302e36> .5 0 0 t

After an patch:
103.58 65.52 <302e36> .5 0 t

Best regards,
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] R with MKL

2009-03-16 Thread Ei-ji Nakama
Hi

> I have seen a lot of problems from people trying to compile R with
> MKL. So I am writing my experience in case it helps and to ask one
> question. I installed R-2.8.1.patched in Ubuntu 9.04 (gcc 4.3.3) using
> MKL 10.1.1.019.

Do you use gcc and gfortran?

> I configured correctly (following MKL userguide) with :
>
> sudo ./configure --with-blas="-I/opt/intel/mkl/10.1.1.019/include
> -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64
> -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
> --with-lapack="-I/opt/intel/mkl/10.1.1.019/include
> -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64
> -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"

cited reference https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi
| You are strongly encouraged to read the MKL User's Guide
| 
| @example
| MKL="   -...@{mkl_lib_path@}   \
| -Wl,--start-group   \
| $...@{mkl_lib_path@}/libmkl_gf_lp64.a\
| $...@{mkl_lib_path@}/libmkl_gnu_thread.a \
| $...@{mkl_lib_path@}/libmkl_core.a   \
| -Wl,--end-group \
| -liomp5 -lpthread"
| @end example

However, It is a little different.( -lgomp and configure line)

MKL="   -...@{mkl_lib_path@}   \
-Wl,--start-group   \
$...@{mkl_lib_path@}/libmkl_gf_lp64.a\
$...@{mkl_lib_path@}/libmkl_gnu_thread.a \
$...@{mkl_lib_path@}/libmkl_core.a   \
-Wl,--end-group \
-lgomp -lpthread"
./configure --with-blas="$MKL" --with-lapack="$MKL"

> But in order to compile had to edit src/modules/lapack/vecLibg95c.c
> and comment out the include. Weird, since I am not building for Mac.

Please note the thing that ABI of fortran is different with Intel compiler
and GNU compiler.
difficult to detect the mistake.
-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] R with MKL

2009-03-18 Thread Ei-ji Nakama
bug of MKL 11.0...

_gfortran_internal_malloc64 and _gfortran_internal_free is needed by [cz]labrad
in libmkl_gnu_thread.
There is it in libgfortran of gfortran-4.1 as an outside symbol, but
there is not it for
gfortran-4.2 or latter.
Many people pushed forward old gfortran, but there was not the problem
in gfortran-4.2
or latter.
if I did it as follows in my environment because the contents were
malloc and free either.

  # my copy for editing
  MKL_LIB_PATH=/usr/local/mkl
  ORIG_MKL_LIB_PATH=/opt/intel/Compiler/11.0/*/mkl/lib/em64t/
  mkdir $MKL_LIB_PATH
  cp $ORIG_MKL_LIB_PATH/{libmkl_gf_lp64,libmkl_core}.a $MKL_LIB_PATH
  cp $ORIG_MKL_LIB_PATH/libmkl_gnu_thread.a $MKL_LIB_PATH

  # add of _gfortran_internal_malloc64 and _gfortran_internal_free to
libmkl_gnu_thread.a
  wget http://prs.ism.ac.jp/~nakama/mkl/mkl_gf.c
  gcc -O3 -fPIC -g -c mkl_gf.c
  ar r $MKL_LIB_PATH/libmkl_gnu_thread.a mkl_gf.o

Because I may be recovered in the newer version, this work is unnecessary for
outside symbol if _gfortran_internal_free disappears.

 $ nm -A libmkl_gnu_thread.a |grep _gfortran_internal   # MKL11.0 now
libmkl_gnu_thread.a:zlabrd_omp.o: U _gfortran_internal_free
libmkl_gnu_thread.a:zlabrd_omp.o: U _gfortran_internal_malloc64
libmkl_gnu_thread.a:clabrd_omp.o: U _gfortran_internal_free
libmkl_gnu_thread.a:clabrd_omp.o: U _gfortran_internal_malloc64

Welcome to Hell of MKL.;-)

2009/3/18 Ei-ji Nakama :
> Hi Cristián.
>
>>> However, It is a little different.( -lgomp and configure line)
>>>
>>> MKL="   -...@{mkl_lib_path@}                               \
>>>        -Wl,--start-group                               \
>>>               �...@{mkl_lib_path@}/libmkl_gf_lp64.a        \
>>>               �...@{mkl_lib_path@}/libmkl_gnu_thread.a     \
>>>               �...@{mkl_lib_path@}/libmkl_core.a           \
>>>        -Wl,--end-group                                 \
>>>        -lgomp -lpthread"
>>> ./configure --with-blas="$MKL" --with-lapack="$MKL"
>>>
>> ...
>>
>> Thanks for all your answers. I read carefully the userguide and the
>> admin guide. I now understand that with gfortran I need to use
>> libmkl_gf_lp64 and libmkl_gnu_thread, either shared or static.
>> Unfortunately for MKL version 10.1.1.019, libmkl_gnu_thread links
>> against the symbol "_gfortran_internal_malloc64" which was present in
>> gcc-4.1 and is not present anymore in gcc-4.3.
>
> However, the support  of openmp is gcc-4.2 or latter.
>
>> So my alternatives are installing an older compiler, waiting for a
>> newer MKL version, building R with Intel compiler or switching away
>> from MKL.
>
> Please download the following files, and test the procedure to which
> the file is written first.
>
>      http://prs.ism.ac.jp/~nakama/mkl/mkl_gf.c
>

-- 
EI-JI Nakama  
"\u4e2d\u9593\u6804\u6cbb"  

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] UTF8 letters are imaged incorrectly (PR#8770)

2006-04-14 Thread Ei-ji Nakama
try.
 $ xlsfonts -fn '*-koi8-r'
or
 $ xlsfonts -fn '*-iso8859-5'
Is there a font of iso8859-5 and koi8?
Please install it in search of a font if nothing comes out.

Next should use xfontsel to choose an appropriate font.

 $ xfontsel  -pattern "-*-*-*-*-*--24-*-*-*-*-*-iso8859-5"

1.Let's choose fmly from a bar
2.If the family is beautiful, does wgth include medium and boldface?
3.And please choose fndry.

UTF-8 environment of X11 is another name of most case en_US.UTF-8.
In UTF8 environment of X11, as for the appointment of rgstry-encdng, a
font of iso10646 will be given priority to at reference value degree.
# look in XLC_LOCALE

Please try to the following if you can choose a font.

> options(X11fonts=c("-cronyx-helvetica-%s-%s-*--%d-*-*-*-*-*-*-*",
+  "-adobe-symbol-medium-r-*-*-%d-*-*-*-*-*-*-*"))
> plot(1:20,main="russian string.")

Kiril font is not included in adobe of a default.
xlsfonts -lll -fn -adobe-helvetica-bold-o-normal--10-100-75-75-p-60-iso10646-1
However, there is not glif of the letter.

2006/4/14, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Full_Name: Mikhail Bocharov
> Version: 2.2.1
> OS: Linux
> Submission from: (NULL) (62.148.130.28)
>
>
> Cyrillic UTF8 letters are imaged incorrectly
>
> Sorry, but English is not my native language
>
> My operating system is Gentoo-linux. Now i want get the gparhics with russian
> title
> for example: plot(1:20, type='l',
> main='Утечка')
> instead of russian letters in title i have this - '5'd'V'i'\'Q , but must be
> 'утечка'
>
>
> my locale:
>
> $locale
> LANG=ru_RU.UTF-8
> LC_CTYPE="ru_RU.UTF-8"
> LC_NUMERIC="ru_RU.UTF-8"
> LC_TIME="ru_RU.UTF-8"
> LC_COLLATE="ru_RU.UTF-8"
> LC_MONETARY="ru_RU.UTF-8"
> LC_MESSAGES="ru_RU.UTF-8"
> LC_PAPER="ru_RU.UTF-8"
> LC_NAME="ru_RU.UTF-8"
> LC_ADDRESS="ru_RU.UTF-8"
> LC_TELEPHONE="ru_RU.UTF-8"
> LC_MEASUREMENT="ru_RU.UTF-8"
> LC_IDENTIFICATION="ru_RU.UTF-8"
> LC_ALL=
>
> PS 'утечка' in english 'leakаge'
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


--
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] UTF8 letters are imaged incorrectly (PR#8770)

2006-04-14 Thread Ei-ji Nakama
 If an error is not given by a locale command, I think that local
setting of glibc does not have any problem.
 I think that there is not problem if  add encoding of koi8-r to
XLC_LOCALE file.

I am not readable, but probably the following URL is useful.
http://ru.gentoo-wiki.com/HOWTO_ru_RU.utf8_Gentoo_way

2006/4/15, Mike Bocharov <[EMAIL PROTECTED]>:
> Thank you for you answer, but your example not work for me...
> > Please try to the following if you can choose a font.
> > > options(X11fonts=c("-cronyx-helvetica-%s-%s-*--%d-*-*-*-*-*-*-*",
> > +
> > "-adobe-symbol-medium-r-*-*-%d-*-*-*-*-*-*-*"))
> > > plot(1:20,main="russian string.")
>
> I not specialist in locales and fonts, maybe reason in my locale?
> In my linux locale is UTF-8:
> LANG=ru_RU.UTF-8
> LC_CTYPE="ru_RU.UTF-8"
> LC_NUMERIC="ru_RU.UTF-8"
> LC_TIME="ru_RU.UTF-8"
> LC_COLLATE="ru_RU.UTF-8"
> LC_MONETARY="ru_RU.UTF-8"
> LC_MESSAGES="ru_RU.UTF-8"
> LC_PAPER="ru_RU.UTF-8"
> LC_NAME="ru_RU.UTF-8"
> LC_ADDRESS="ru_RU.UTF-8"
> LC_TELEPHONE="ru_RU.UTF-8"
> LC_MEASUREMENT="ru_RU.UTF-8"
> LC_IDENTIFICATION="ru_RU.UTF-8"
> LC_ALL=
>
> ,but  fonts in xfontsel is koi8-r(in rgstry)
>


--
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] UTF8 letters are imaged incorrectly (PR#8770)

2006-04-14 Thread Ei-ji Nakama
This was not a bug.

2006/4/15, Mike Bocharov <[EMAIL PROTECTED]>:
> It work, thanks for your help!
>
> >  If an error is not given by a locale command, I think that local
> > setting of glibc does not have any problem.
> >  I think that there is not problem if  add encoding of koi8-r to
> > XLC_LOCALE file.
> >
> > I am not readable, but probably the following URL is useful.
> > http://ru.gentoo-wiki.com/HOWTO_ru_RU.utf8_Gentoo_way
>


--
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] AIX libjpeg still looms

2006-04-19 Thread Ei-ji Nakama
Hi.

If I remove a java-related pass from PATH before configure and build
it, I am successful.

try

# Cut Java Path . java library(libjpeg...etc.) probrem.
export PATH=`echo $PATH|tr ':' '\n'|sed -e '/^.*java.*$/d'|tr '\n' ':'`
./configure options...
make

For a point to confirm.
 dump -H modules/R_X11.so
JAVA-related PATH should not be included in here.

my environment `/opt/freeware/lib/libjpeg.a' used.

2006/4/20, Matthew Beason <[EMAIL PROTECTED]>:
> Simon,
>
> Did you get a chance to review your AIX configuration? I'd be
> curious to know the differences with my own as while I have R installed,
> I still get the error related to libjpeg.a.
>
> Error in get(getOption("device"))() : X11 module cannot be loaded
> In addition: Warning message:
> unable to load shared library '/usr/local/R/lib/R/modules/R_X11.so':
>   Could not load module /usr/local/R/lib/R/modules/R_X11.so.
> Dependent module /usr/java14/jre/bin/libjpeg.a(libjpeg.so.62)
> could not be loaded.
> File /usr/java14/jre/bin/libjpeg.a is not an
>   archive or the file could not be read properly.
> System error: Exec format error
> System error: Exec format error
> Could not load module /usr/java14/jre/bin/libjpeg.a.
> Dependent module /usr/java14/jre/bin/libjpeg.a could not be
> loaded.
>
> Another user had suggested re-compiling the jpeg library based
> on the "Running Linux Applications on AIX" redbook. However, I haven't
> had any luck with that as of yet.
>
> Matthew Beason
> Analyst - Capacity Planning
> Harrah's Entertainment, Inc.
> One Harrah's Court, Las Vegas, NV 89119-4312
> Office: 702-494-4097
> Mobile: 702-622-6902
> [EMAIL PROTECTED]
> The information contained in this email may be legally privileged and
> confidential. It is intended to be read only by the person to whom it is
> addressed. If you have received this in error or are not the intended
> recipient, please immediately notify the sender and delete all copies of
> this message. Thank you.
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


--
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Sys.setlocale upsets windows graphics device (PR#8887)

2006-05-22 Thread Ei-ji Nakama
 If a return value of locale does not have a period, a function of libmingwex
gives back NULL in strchr and refers to NULL pointer in atoi.

But it will be right to fix mingw...

--- locales.R.orig  Mon Apr 10 07:19:19 2006
+++ locales.R   Mon May 22 22:55:21 2006
@@ -10,6 +10,7 @@
 {
 category <- match(category, c("LC_ALL", "LC_COLLATE", "LC_CTYPE",
   "LC_MONETARY", "LC_NUMERIC", "LC_TIME"))
+if(locale == "C") locale = "English_United States.1252");
 if(is.na(category)) stop("invalid 'category' argument")
 .Internal(setlocale(category, locale))
 }


2006/5/22, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> On Mon, 22 May 2006, Edward wrote:
>
> > Hi,
> > We tried it on 3 separate windows XP computers using version 2.3.0.
> > The original locale is set for Thailand on all 3.
> > So how do we fix it? Is there another patch?
>
> Don't try to do graphics in the C locale on your computer?
>
> I suspect this is a font problem in Windows, in that your fonts may be
> specific to the Thai localization.  But without a means of reproducing
> this, I can only guess.
>
> If you can set up a debugger (see the rw-FAQ), you may be able to give us
> some additional clues as the where the crash is occuring.
>
> > And why does the crash not happen with earlier R versions (eg. 2.2.1) on the
> > same computer?
>
> Because of the issue mentioned in the CHANGES file, the change to the C
> locale was reverted by opening a graphics window.
>
> >
> > ---
> >> Sys.getlocale()
> > [1]
> > "LC_COLLATE=Thai_Thailand.874;LC_CTYPE=Thai_Thailand.874;LC_MONETARY=Thai_Thailand.874;LC_NUMERIC=C;LC_TIME=Thai_Thailand.874"
> > ---
> >
> > Thanks
> > Edward
> >
> > - Original Message - From: "Prof Brian Ripley"
> > <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, May 22, 2006 2:32 PM
> > Subject: Re: [Rd] Sys.setlocale upsets windows graphics device (PR#8887)
> >
> >
> >> Works perfectly for me.  There was a bug in 2.2.1, but it was fixed in
> >> 2.2.1 patched (see CHANGES).
> >>
> >> What locale were you changing from?  (This might be a Windows problem
> >> specific to your locale.)
> >>
> >> On Mon, 22 May 2006, [EMAIL PROTECTED] wrote:
> >>
> >>> Full_Name: Edward McNeil
> >>> Version: 2.3.0
> >>> OS: Widows XP
> >>> Submission from: (NULL) (203.170.234.5)
> >>>
> >>>
> >>> Type the following:
> >>>
> >>>> Sys.setlocale("LC_ALL","C")
> >>>> hist(1:10)
> >>>
> >>> CRASH
> >>>
> >>> __
> >>> R-devel@r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-devel
> >>>
> >>>
> >>
> >> --
> >> Brian D. Ripley,  [EMAIL PROTECTED]
> >> 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, UKFax:  +44 1865 272595
> >
> >
>
> --
> Brian D. Ripley,  [EMAIL PROTECTED]
> 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, UKFax:  +44 1865 272595
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Sys.setlocale upsets windows graphics device (PR#8887)

2006-05-23 Thread Ei-ji Nakama
It clash similarly in the Japanese locale.

localeCP!= GetACP() .
It dies from msvcrt (mb*) the case where NULL is specified.

diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/buttons.c
R-2.3.0/src/gnuwin32/graphapp/buttons.c
--- R-2.3.0.orig/src/gnuwin32/graphapp/buttons.cMon Apr 10 07:20:00 2006
+++ R-2.3.0/src/gnuwin32/graphapp/buttons.c Tue May 23 16:26:51 2006
@@ -132,9 +132,16 @@

if(is_NT && (localeCP != GetACP())) {
wchar_t wkind[100], wc[1000];
-   mbstowcs(wkind, kind, 100);
-   mbstowcs(wc, text, 1000);
-   hwnd = CreateWindowW(wkind, wc,
+   wchar_t *wkindp=wkind, *wcp=wc;
+   if(kind)
+   mbstowcs(wkindp, kind, 100);
+   else
+   wkindp=NULL;
+   if(text)
+   mbstowcs(wcp, text, 1000);
+   else
+   wcp=NULL;
+   hwnd = CreateWindowW(wkindp, wcp,
 (WS_CHILD | WS_VISIBLE) | style,
 r.x, r.y, r.width, r.height,
 current_window->handle,
diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/menus.c
R-2.3.0/src/gnuwin32/graphapp/menus.c
--- R-2.3.0.orig/src/gnuwin32/graphapp/menus.c  Mon Apr 10 07:20:00 2006
+++ R-2.3.0/src/gnuwin32/graphapp/menus.c   Tue May 23 15:36:14 2006
@@ -302,9 +302,12 @@
 BOOL myAppendMenu(HMENU h, UINT flags, UINT id, LPCTSTR name)
 {
 if(is_NT && (localeCP != GetACP())) {
-   wchar_t wc[100];
-   mbstowcs(wc, name, 100);
-   return AppendMenuW(h, flags, id, wc);
+   wchar_t wc[100], *wcp=wc;
+   if (name)
+ mbstowcs(wcp, name, 100);
+   else
+ wcp=NULL;
+   return AppendMenuW(h, flags, id, wcp);
 } else
return AppendMenuA(h, flags, id, name);
 }
diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/windows.c
R-2.3.0/src/gnuwin32/graphapp/windows.c
--- R-2.3.0.orig/src/gnuwin32/graphapp/windows.cMon Apr 10 07:20:00 2006
+++ R-2.3.0/src/gnuwin32/graphapp/windows.c Tue May 23 16:39:23 2006
@@ -455,13 +455,21 @@

if(is_NT && (localeCP != GetACP())) {
wchar_t wkind[100], wc[1000];
-   mbstowcs(wkind, (flags & Workspace) ? work_class_name
-: win_class_name, 100);
-   mbstowcs(wc, name, 1000);
+   wchar_t *wkindp=wkind, *wcp=wc;
+   if((flags & Workspace) ? work_class_name
+  : win_class_name)
+   mbstowcs(wkindp, (flags & Workspace) ? work_class_name
+: win_class_name, 100);
+   else
+ wkindp=NULL;
+   if(name)
+   mbstowcs(wcp, name, 1000);
+   else
+   wcp=NULL;
hwnd = CreateWindowExW(
ex_style,
-   wkind,
-   wc, win_style,
+   wkindp,
+   wcp, win_style,
r.x, r.y, r.width, r.height,
(HWND) ((flags & ChildWindow) ?
current_window->handle : 0),


2006/5/23, Prof Brian Ripley <[EMAIL PROTECTED]>:
> On Mon, 22 May 2006, Ei-ji Nakama wrote:
>
> > If a return value of locale does not have a period, a function of libmingwex
> > gives back NULL in strchr and refers to NULL pointer in atoi.
> >
> > But it will be right to fix mingw...
> >
> > --- locales.R.orig  Mon Apr 10 07:19:19 2006
> > +++ locales.R   Mon May 22 22:55:21 2006
> > @@ -10,6 +10,7 @@
> > {
> > category <- match(category, c("LC_ALL", "LC_COLLATE", "LC_CTYPE",
> >   "LC_MONETARY", "LC_NUMERIC", "LC_TIME"))
> > +if(locale == "C") locale = "English_United States.1252");
> > if(is.na(category)) stop("invalid 'category' argument")
> > .Internal(setlocale(category, locale))
> > }
>
> Unfortunately that does not affect e.g. 'Rgui LC_ALL=C' so a more
> comprehensive C-level fix would be needed.
>
> I did wonder if mingwex was the problem, but in theory at least it knows
> about the C locale (cp = 0), and the crash was coming from MSVCRT.dll, in
> the conversion of an ASCII string to wchar.  Since it works in other
> Windows base locales it did seem specific to Thai (which is still a
> single-byte locale).
>
>
> > 2006/5/22, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> >> On Mon, 22 May 2006, Edward wrote:
> >>
> >>> Hi,
> >>> We tried it on 3 separate windows XP computers using version 2.3.0.
> >>> The original locale is se

Re: [Rd] Sys.setlocale upsets windows graphics device (PR#8887)

2006-05-23 Thread Ei-ji Nakama
 Yes, if this processing does not exist on japanese locale
will fall.

2006/5/23, Prof Brian Ripley <[EMAIL PROTECTED]>:
> Is this necessary to avoid LC_CTYPE="C"?  If so, I stopped that at C level
> yesterday (it was already disallowed when starting R).
>
> On Tue, 23 May 2006, Ei-ji Nakama wrote:
>
> > It clash similarly in the Japanese locale.
> >
> > localeCP!= GetACP() .
> > It dies from msvcrt (mb*) the case where NULL is specified.
> >
> > diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/buttons.c
> > R-2.3.0/src/gnuwin32/graphapp/buttons.c
> > --- R-2.3.0.orig/src/gnuwin32/graphapp/buttons.cMon Apr 10 07:20:00 
> > 2006
> > +++ R-2.3.0/src/gnuwin32/graphapp/buttons.c Tue May 23 16:26:51 2006
> > @@ -132,9 +132,16 @@
> >
> >if(is_NT && (localeCP != GetACP())) {
> >wchar_t wkind[100], wc[1000];
> > -   mbstowcs(wkind, kind, 100);
> > -   mbstowcs(wc, text, 1000);
> > -   hwnd = CreateWindowW(wkind, wc,
> > +   wchar_t *wkindp=wkind, *wcp=wc;
> > +   if(kind)
> > +   mbstowcs(wkindp, kind, 100);
> > +   else
> > +   wkindp=NULL;
> > +   if(text)
> > +   mbstowcs(wcp, text, 1000);
> > +   else
> > +   wcp=NULL;
> > +   hwnd = CreateWindowW(wkindp, wcp,
> > (WS_CHILD | WS_VISIBLE) | style,
> > r.x, r.y, r.width, r.height,
> > current_window->handle,
> > diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/menus.c
> > R-2.3.0/src/gnuwin32/graphapp/menus.c
> > --- R-2.3.0.orig/src/gnuwin32/graphapp/menus.c  Mon Apr 10 07:20:00 2006
> > +++ R-2.3.0/src/gnuwin32/graphapp/menus.c   Tue May 23 15:36:14 2006
> > @@ -302,9 +302,12 @@
> > BOOL myAppendMenu(HMENU h, UINT flags, UINT id, LPCTSTR name)
> > {
> > if(is_NT && (localeCP != GetACP())) {
> > -   wchar_t wc[100];
> > -   mbstowcs(wc, name, 100);
> > -   return AppendMenuW(h, flags, id, wc);
> > +   wchar_t wc[100], *wcp=wc;
> > +   if (name)
> > + mbstowcs(wcp, name, 100);
> > +   else
> > + wcp=NULL;
> > +   return AppendMenuW(h, flags, id, wcp);
> > } else
> >return AppendMenuA(h, flags, id, name);
> > }
> > diff -ruN R-2.3.0.orig/src/gnuwin32/graphapp/windows.c
> > R-2.3.0/src/gnuwin32/graphapp/windows.c
> > --- R-2.3.0.orig/src/gnuwin32/graphapp/windows.cMon Apr 10 07:20:00 
> > 2006
> > +++ R-2.3.0/src/gnuwin32/graphapp/windows.c Tue May 23 16:39:23 2006
> > @@ -455,13 +455,21 @@
> >
> >if(is_NT && (localeCP != GetACP())) {
> >wchar_t wkind[100], wc[1000];
> > -   mbstowcs(wkind, (flags & Workspace) ? work_class_name
> > -: win_class_name, 100);
> > -   mbstowcs(wc, name, 1000);
> > +   wchar_t *wkindp=wkind, *wcp=wc;
> > +   if((flags & Workspace) ? work_class_name
> > +  : win_class_name)
> > +   mbstowcs(wkindp, (flags & Workspace) ? 
> > work_class_name
> > +: win_class_name, 100);
> > +   else
> > + wkindp=NULL;
> > +   if(name)
> > +   mbstowcs(wcp, name, 1000);
> > +   else
> > +   wcp=NULL;
> >hwnd = CreateWindowExW(
> >ex_style,
> > -   wkind,
> > -   wc, win_style,
> > +   wkindp,
> > +   wcp, win_style,
> >r.x, r.y, r.width, r.height,
> >(HWND) ((flags & ChildWindow) ?
> >current_window->handle : 0),
> >
> >
> > 2006/5/23, Prof Brian Ripley <[EMAIL PROTECTED]>:
> >> On Mon, 22 May 2006, Ei-ji Nakama wrote:
> >>
> >>> If a return value of locale does not have a period, a function of 
> >>> libmingwex
> >>> gives back NULL in strchr and refers to NULL pointer in atoi.
> >>>
> >>> But it will be right to fix mingw...
> >>>
> >>> --- locales.R.orig  Mon Apr 10 07:19:19 2006
> >>> +++ locales.R   Mon May 22 22:55:21 2006
> >

Re: [Rd] Thai locale not working on Mac OSX (PR#9175)

2006-09-01 Thread Ei-ji Nakama
th_TH does not exist at locale of OSX.

I should be able to handle Thai character string in UTF-8
locale such as en_US.UTF-8.

There is also a method of preparing th_TH local with localedef.

2006/8/27, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Full_Name: Hutcha Sriplung
> Version: R-2.3.1
> OS: Mac OSX
> Submission from: (NULL) (61.90.155.1)
>
>
> I am using Mac OSX 10.4.7 and find that locale setting is not working 
> properly.
>
>
> > Sys.getlocale()
> [1] "C"
> > Sys.setlocale(category="LC_ALL",locale="th_TH")
> [1] "C"
>
> When I change locale to some other languages such as french, chinese, and
> japanese, it works fine but not with some other languages such as Bahasa
> Indonesia and Bahasa Malaysia. Thai locale is OK on Windows and Linux.
>
> __________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Using \u2030 in plot axis label -> stack smashing

2006-09-18 Thread Ei-ji Nakama
This seems to be the mine which I contrived. m(_|_)m

--- R-alpha.orig/src/main/gram.y2006-09-04 23:41:33.0 +0900
+++ R-alpha/src/main/gram.y 2006-09-19 13:01:41.0 +0900
@@ -99,11 +99,12 @@
 # endif
 #endif
 #include 
+#define MB_BUF 16

 static size_t ucstomb(char *s, wchar_t wc, mbstate_t *ps)
 {
 char tocode[128];
-char buf[16];
+char buf[MB_BUF];
 void*cd = NULL ;
 wchar_t  wcs[2];
 char*inbuf = (char *) wcs;
@@ -1709,7 +1710,7 @@
error(_("\\u sequences not supported"));
 #else
wint_t val = 0; int i, ext; size_t res;
-   char buff[5]; Rboolean delim = FALSE;
+   char buff[MB_BUF]; Rboolean delim = FALSE;
if((c = xxgetc()) == '{') delim = TRUE; else xxungetc(c);
for(i = 0; i < 4; i++) {
c = xxgetc();
@@ -1743,7 +1744,7 @@
 #ifdef SUPPORT_MBCS
else {
wint_t val = 0; int i, ext; size_t res;
-   char buff[9]; Rboolean delim = FALSE;
+   char buff[MB_BUF]; Rboolean delim = FALSE;
if((c = xxgetc()) == '{') delim = TRUE; else xxungetc(c);
for(i = 0; i < 8; i++) {
c = xxgetc();


2006/9/19, Gregor Gorjanc <[EMAIL PROTECTED]>:
> Gavin Simpson wrote:
> > On Mon, 2006-09-18 at 19:02 +, Gregor Gorjanc wrote:
> >> Gavin Simpson  ucl.ac.uk> writes:
> >>> Dear List
> >>>
> >>> I just noticed the following behaviour in R 2.3.1 Patched (2006-06-13
> >>> r38342) and confirmed similar behaviour in R 2.4.0 alpha (2006-09-18
> >>> r39383) & R 2.5.0 (2006-09-18 r39383) - which may actually be the same
> >>> thing?, that trying to plot the unicode character \u2030 (which should
> >>> be in a ‰ [per mille] sign) in an axis label leads to the following
> >>> error:
> >>>
> >>> *** stack smashing detected ***: /home/gavin/R/R-devel/build/bin/exec/R
> >>> terminated
> >>> Aborted
> >>>
> >>> The simplest, reproducible example I have tried is:
> >>>
> >>> plot(1:10, ylab = "\u2030")
> >>>
> >> I can not reproduce this on my Debian GNU/Linux. I get something like "S
> >> for y label under 2.3.1 2006-06-01 and 2.5.0 2006-09-13 r39292 with the
> >> following locale
> >>
> >> [1] "LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;
> >> LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;
> >> LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;
> >> LC_IDENTIFICATION=C"
> >>
> >> It does not change if I set everything into en_GB.UTF-8. Is this valid
> >> unicode code?
> >>
> >> Gregor
> >
> > Cheers for the follow up Gregor,
> >
> > I was following advice given by Prof. Ripley in a posting on R-Help
> > about how to get the per mille character:
> >
> > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48709.html
> >
> > It should look like a "%" character but with two circles at the bottom.
>
> Perhaps I do not have appropriate font for this character.
>
> Gregor
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Bug in 2.4.0 Windows menu setup (PR#9277)

2006-10-05 Thread Ei-ji Nakama
I do not understand Chinese, but recognize kanji.
RGui-zh_CN.po is written in utf-8, but charset=CP936 wrote.

  perl -p -i -e 's#charset=CP936#charset=utf-8#' RGui-zh_CN.po
  msgfmt -o RGui.mo RGui-zh_CN.po

2006/10/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> I've tracked down where this is occurring, but I don't know how to fix
> it.  Here's a summary:
>
> If the language in Windows is set to simplified Chinese (i.e. Chinese
> (PRC)) and message translations are installed, then on startup Rgui
> crashes when it tries to install the console popup menu.  The crash
> comes when it gets an error trying to do a conversion using mbrtowc, and
> tries to report it using error(); but the R symbol table is needed for
> that, and it hasn't been set up yet.
>
> I'm not sure which menu entry causes the crash, but I think it's not the
> first, so conceivably this is caused by an error in one of the
> translation files.  Indeed, setting the language to Chinese (Taiwan) works.
>
> I don't know how to debug the translation files, so I'm going to have to
> leave this one for now.  I think Brian Ripley is the only one who
> understands all the details of what goes on in the translations, and
> he's away until Oct 9.
>
> Duncan Murdoch
>
> On 10/3/2006 9:00 PM, ronggui wrote:
> > This morning I downloaded R-2.4.0 and install in under Windows. I customized
> > the installation and choose "Message translations",but I could not launch
> > Rgui.exe successfully( Rterm.exe worked fine). If I did't choose "Message
> > translations", Rgui.exe worked fine.
> >
> > "Message translations" is Simplified Chinese.
> >
> >> version
> >_
> > platform   i386-pc-mingw32
> > arch   i386
> > os mingw32
> > system i386, mingw32
> > status
> > major  2
> > minor  4.0
> > year   2006
> > month  10
> > day03
> > svn rev39566
> > language   R
> > version.string R version 2.4.0 (2006-10-03)
> >
> >
> >
> >
> > 
> >
> > __
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Bug in 2.4.0 Windows menu setup (PR#9277)

2006-10-06 Thread Ei-ji Nakama
 iconv  -f  utf-8 -t cp936 RGui-zh_CN.po > RGui-zh_CN.po.cp936
 iconv: illegal input sequence at position 19303

 iconv -c -f  utf-8 -t cp936 RGui-zh_CN.po > RGui-zh_CN.po.cp936
  ^^
 iconv -f cp936 -t utf-8 RGui-zh_CN.po.cp936 > RGui-zh_CN.po.cp936utf8
 diff -uN  RGui-zh_CN.po   RGui-zh_CN.po.cp936utf8
@@ -852,7 +852,7 @@

 #: rui.c:1283 rui.c:1404
 msgid "menu + item is limited to 1000 bytes"
-msgstr "xxx"
+msgstr "xxx"

 grep -C1 "menu + item is limited to 1000 bytes" RGui-zh_CN.po

This should ask a translator for text of a part for a difference.
BTW, there is not a problem in GB18030.

2006/10/7, Duncan Murdoch <[EMAIL PROTECTED]>:
> On 10/6/2006 1:35 PM, Hin-Tak Leung wrote:
> > Duncan Murdoch wrote:
> >> On 2006-10-5 8:06, Ei-ji Nakama wrote:
> >>> I do not understand Chinese, but recognize kanji.
> >>> RGui-zh_CN.po is written in utf-8, but charset=CP936 wrote.
> >>>
> >>>   perl -p -i -e 's#charset=CP936#charset=utf-8#' RGui-zh_CN.po
> >>>   msgfmt -o RGui.mo RGui-zh_CN.po
> >>
> >> Thanks!!  That does fix the error, at least on my system.  I'll commit
> >> the change to R-devel and R-patched.
> >
> > Hmm, I do understand Chinese, and I can confirm that the content
> > of RGui-zh_CN.po in R 2.4 is in utf-8 rather than CP936.
> >
> > I can also confirm that CP950(big5) for RGui-zh_TW.po is correct, and
> > CP932(shift-JIS) for  RGui-ja.po is also correct. (so you'll need to
> > find some korean to verify CP949 for RGui-ko.po).
> >
> > However, the fix is slightly "asymmetric". Out of ru, zh_CN, zh_TW,
> > ja, ko, only ru in R-2.4.0/po/*.po is in localised encoding,
> > (the others 4 in UTF-8), whereas RGui-*.po, after the fix, all
> > are in localised encoding except RGui-zh_CN.po .
> >
> > I would propose correcting the encoding of the *content*, rather
> > than the charset tag, so that Rgui-* all uses localised ones (CP932,
> > CP936, CP949, CP950). That should be better for older windows...
>
> I did try that, but iconv didn't want to convert the file from UTF-8 to
> CP936.  I've no idea why not.
>
> In any case, those files only need to be readable by the translation
> teams, not by end-users, so I don't think the asymmetry matters:  if a
> translator finds it easy to work in UTF-8 that's fine for R, as long as
> it is correctly recorded.
>
> Duncan Murdoch
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] crush in edit()

2006-10-17 Thread Ei-ji Nakama
b/R/library/methods/libs/methods.so
> 00c4d000-00c4e000 rwxp 5000 fd:00 16944203
> /usr/lib/R/library/methods/libs/methods.so
> 00eb6000-00f31000 r-xp  fd:00 15242987
> /usr/lib/libgfortran.so.1.0.0
> 00f31000-00f32000 rwxp 0007b000 fd:00 15242987
> /usr/lib/libgfortran.so.1.0.0
> 00f44000-00f45000 r-xp  fd:00 15303344   /usr/lib/gconv/ISO8859-1.so
> 00f45000-00f47000 rwxp  fd:00 15303344   /usr/lib/gconv/ISO8859-1.so
> 08048000-08049000 r-xp  fd:00 15796032   /usr/lib/R/bin/exec/R
> 08049000-0804a000 rwxp  fd:00 15796032   /usr/lib/R/bin/exec/R
> 09ef7000-0af9f000 rwxp 09ef7000 00:00 0  [heap]
> 49c08000-49c09000 r-xp 49c08000 00:00 0  [vdso]
> 49c09000-49c22000 r-xp  fd:00 15206828   /lib/ld-2.4.so
> 49c22000-49c23000 r-xp 00018000 fd:00 15206828   /lib/ld-2.4.so
> 49c23000-49c24000 rwxp 00019000 fd:00 15206828   /lib/ld-2.4.so
> 49c26000-49d53000 r-xp  fd:00 15206829   /lib/libc-2.4.so
> 49d53000-49d55000 r-xp 0012d000 fd:00 15206829   /lib/libc-2.4.so
> 49d55000-49d56000 rwxp 0012f000 fd:00 15206829   /lib/libc-2.4.so
> 49d56000-49d59000 rwxp 49d56000 00:00 0
> 49d5b000-49d7e000 r-xp  fd:00 15206830   /lib/libm-2.4.so
> 49d7e000-49d7f000 r-xp 00022000 fd:00 15206830   /lib/libm-2.4.so
> 49d7f000-49d8 rwxp 00023000 fd:00 15206830   /lib/libm-2.4.so
> 49d82000-49d84000 r-xp  fd:00 15206831   /lib/libdl-2.4.so
> 49d84000-49d85000 r-xp 1000 fd:00 15206831   /Aborted
>
> I am using R 2.4.0 i386 on Fedora core 5, any one please help me on this?
>
> Thank you very much.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>


-- 
EI-JI Nakama  <[EMAIL PROTECTED]>
"\u4e2d\u9593\u6804\u6cbb"  <[EMAIL PROTECTED]>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel