Displaying 20 results from an estimated 30 matches for "setup_rmainloop".
2013 Nov 21
2
Running R embedded in an mpiexec spawned process - Fatal error: you must specify '--save', '--no-save' or '--vanilla'
...Verbose = false,
LoadInitFile = true,
LoadSiteFile = true,
RestoreAction = StartupRestoreAction.NoRestore,
NoRenviron = false
};
rEngine.Initialize(rStartParams); // calls the R API R_SetParams, then setup_Rmainloop
I gather that the following is hit in src/R-3.0.2/src/unix/system.c, in the function Rf_initialize_R:
if (!R_Interactive && Rp->SaveAction != SA_SAVE &&
Rp->SaveAction != SA_NOSAVE)
R_Suicide(_("you must specify '--save', '--no-save' or '--van...
2010 Aug 20
2
segfault in embedded r after call to repldlldo1
Dear R developers,
i've got a question concerning an embedded R instance. I called the
initialization routines as seen in the "writing extensions" guide
(Rf_initialize, setup_Rmainloop and R_ReplDLLinit). I also changed the
function callback pointer of readconsole and writeconsoleex to my local
functions.
when i call mainloop there is no problem and the commands are evaluated
as expected. because i don't want R to run in an own thread and my app
should keep the control i...
2012 Feb 01
3
Crash in R using embedded.
...initialize:
putenv("R_HOME=/apps/R/install/lib64/R");
const char *R_argv[]= {"RInterfaceTest", "--gui=none", "--no-save",
"--no-readline", "--silent"};
Rf_initialize_R(sizeof(R_argv)/sizeof(R_argv[0]), const_cast<char
**>(R_argv));
setup_Rmainloop();
ParseStatus status;
SEXP cmdSexp, cmdexpr = R_NilValue;
int error;
string rcommand = "f<-file(paste(tempdir(), \"/Routput.txt\", sep = \"\"),
open=\"wt+\")\nsink(f)\n";
PROTECT(cmdSexp = allocVector(STRSXP, 1));
SET_STRING_ELT(cmdSexp, 0, mkChar(rcomma...
2013 May 25
0
segfault when using browser() in Rprofile.site
...ration (main.c:222)
==31314== by 0x4D4047: R_ReplConsole (main.c:307)
==31314== by 0x4D4353: do_browser (main.c:1137)
==31314== by 0x4B1E86: Rf_eval (eval.c:639)
==31314== by 0x4D22F0: R_ReplFile (main.c:101)
==31314== by 0x4D23FF: R_LoadProfile (main.c:663)
==31314== by 0x4D2965: setup_Rmainloop (main.c:892)
==31314== by 0x4D4558: Rf_mainloop (main.c:992)
==31314== by 0x41A4D7: main (Rmain.c:32)
==31314== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==31314==
*** caught segfault ***
address (nil), cause 'memory not mapped'
And here is the gdb back...
2013 Nov 10
1
Embedded R Fails When Run on LSF Queue System
...must specify '--save', '--no-save' or '--vanilla'
This is confusing becasue I believe I have set this by changing the startup parameters so that the no-save option is in use. I initialize R with the following collection of function calls:
1-Rf_initialize_R
2-R_SetParams
3-setup_Rmainloop
At step 2 I pass in a structure that specifies the no-save option (as well as interactive=true, verbose=false), so I would expect it to be okay, but I still receive this error. Again, not at the terminal but only when run as a separate process.
I gathered from this thread that someone else has ex...
2006 Aug 31
2
stop R mainloop without calling exit(1)
Hello,
I'm trying to make my Java application work with R, which involves
sending and retrieving data and to run R functions from within the
Java application. I also need to have "live interaction" with R, to
show the R console output (e.g. warnings and print) and to enable the
user to enter input when a function asks for it.
Therefore I created a simple R console in Java using JRI
2015 Aug 25
0
Child thread libR.so
...Rf_initialize_R(sizeof (init_argv) / sizeof (init_argv[0]),
(char**) init_argv);
/* Disable stack limit checking since it is incompatible being
loaded on a child thread
*/
R_CStackLimit = (uintptr_t)-1;
R_Interactive = TRUE; /* Rf_initialize_R set this based on isatty */
setup_Rmainloop();
/* end of Rf_initEmbeddedR */
/*
* transposeVector above uses the R builtin function aperm instead of
* looking it up every time we need deal with transposing a multidimensional
* intput/output look it up once here and save it off
*/
aperm_function = findFun(inst...
2015 Dec 17
3
Assistance much appreciated
...This shouldn't happen. In a previous post you listed a long list of
warnings about packages not being loaded; that's likely a serious
problem, but I don't know if it is the cause or a consequence of this
one. Something is seriously wrong with the startup. You could try
debugging setup_Rmainloop in <src/main/main.c>. to see if any warnings
are being generated there. There shouldn't be any.
Duncan Murdoch
> >
>
>
> On 17-Dec-15 18:02, Michael Felt wrote:
>> I have been struggling with this error message - and think I finally
>> understand it's...
2017 Oct 06
1
SIGSEGV during startup
...x6b5284 in Rf_allocVector3 ../../../R-svn/src/main/memory.c:2514
#4 0x654a49 in Rf_allocVector ../../../R-svn/src/include/Rinlinedfuns.h:514
#5 0x654a49 in Rf_mkTrue ../../../R-svn/src/main/gram.c:4164
#6 0x6b616c in Rf_InitMemory ../../../R-svn/src/main/memory.c:2137
#7 0x69186a in setup_Rmainloop ../../../R-svn/src/main/main.c:842
#8 0x694488 in Rf_mainloop ../../../R-svn/src/main/main.c:1088
#9 0x41e398 in main ../../../R-svn/src/main/Rmain.c:29
#10 0x7f9d71f4182f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#11 0x41fbe8 in _start (/home/josh/R/R-build/bin...
2009 Jan 08
1
Callbacks seems to get GCed.
...uot;,"/usr/lib/R",0);
structRstart rp;
Rstart Rp = &rp;
R_setStartTime();
R_DefParams(Rp);
Rp->R_Quiet = TRUE;
Rp->RestoreAction = SA_RESTORE;
Rp->SaveAction = SA_NOSAVE;
R_SetParams(Rp);
R_Interactive = TRUE;
Rf_initialize_R(argc, argv);
setup_Rmainloop();
R_ReplDLLinit();
info = R_getEmbeddingDllInfo();
R_registerRoutines(info, cMethods, callMethods, NULL, NULL);
}
int main (int argc, char** argv)
{
int i;
initR();
r_exec("x <- function (f) { .Call(\"set_callback1\",f); }");
r_exec("y <- funct...
2009 Sep 03
1
Running an expression 1MN times using embedded R
...solefile = NULL;
R_Interactive = (Rboolean)1;
// ptr_R_ShowMessage = Re_ShowMessage;
// ptr_R_WriteConsoleEx =Re_WriteConsoleEx;
// ptr_R_WriteConsole = NULL;
// ptr_R_ReadConsole = NULL;
return(0);
}
int main(int argc, char **argv){
if (embedR(argc,argv))
exit(1);
setup_Rmainloop();
DllInfo *info = R_getEmbeddingDllInfo();
R_registerRoutines(info, NULL, callMethods, NULL, NULL);
SEXP runner1,runner2;
PROTECT(runner1=rexpress("expression({ for(x in 1:5)
{ .Call('rh_status','x') }})"));
if (runner1 == R_NilValue){
UNPROTECT(1...
2006 Nov 27
1
R.DLL mapping by P/Invoke
...s);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void readconsolecfg();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void setup_Rmainloop();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void R_ReplDLLinit();
//- R SEXP management
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = Char...
2008 Feb 15
0
R crashes with debug()
I know this may be a pathological case, but I found it while debugging
PopCon:
Invoking a debugged function prior to the conclusion of
setup_Rmainloop() will cause R to crash because R_ConsoleIob is not
initialized until run_Rmainloop().
Tested in R-2-6-branch and trunk on Linux.
Crash it like this from a shell command line:
$ cat >> ~/.Rprofile <<EOF
foo <- function() x<-1
debug(foo)
foo()
EOF
$ $R
R version 2.7.0 Under d...
2012 Aug 20
0
Problem with initializiing R main loop under Windows (R.dll-version: 2.15.1)
...ve"), qstrdup
("--no-restore") };
// redirect the BREAK signal to own handler
signal(SIGBREAK, pi_onintr);
// set the arguments in R
R_set_command_line_arguments (argc, argv);
// Here, the main initialization of R is performed
setup_Rmainloop ();
// Init the IO buffer and the global context
R_ReplDLLinit();
// if I use the following instead, no problem occurs on error
in evaluation:
// run_Rmainloop ();
while ((_state== Connected || _state == Running) &&
R_ReplDLLdo1() > 0) {...
2015 Aug 20
2
Child thread libR.so
So I'm working on a custom front end to R, in one mode of the front
end I dynamically load libR.so into a child worker thread. I'm very
careful to make sure it is loaded by a single thread and loaded only
once, but since it is a child thread it violates assumptions made by
the stack size checking inside of R and I get innumerable errors along
the lines of
Error: C stack usage
2007 Oct 17
0
Using R.dll in .NET IPC
...s);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void readconsolecfg();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void setup_Rmainloop();
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void R_ReplDLLinit();
//- R SEXP management
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = Char...
2015 Dec 17
0
Assistance much appreciated
...> This shouldn't happen. In a previous post you listed a long list of warnings about packages not being loaded; that's likely a serious problem, but I don't know if it is the cause or a consequence of this one. Something is seriously wrong with the startup. You could try debugging setup_Rmainloop in <src/main/main.c>. to see if any warnings are being generated there. There shouldn't be any.
>
> Duncan Murdoch
>
>> >
>>
>>
>> On 17-Dec-15 18:02, Michael Felt wrote:
>>> I have been struggling with this error message - and think I fi...
2015 Aug 24
0
Child thread libR.so
...over the
broken stack checking.
Stack trace:
#0 R_SignalCStackOverflow (usage=140732197147604) at errors.c:81
#1 0x00002aaaab0625b7 in Rf_eval (e=0x1b7592a8, rho=0x1b753960) at eval.c:545
#2 0x00002aaaab0871ca in R_ReplFile (fp=0x1b69a830, rho=0x1b753960)
at main.c:98
#3 0x00002aaaab087a27 in setup_Rmainloop () at main.c:861
#4 0x00002aaaab14a98b in Rf_initEmbeddedR (argc=<value optimized
out>, argv=<value optimized out>) at Rembedded.c:63
On Thu, Aug 20, 2015 at 1:21 PM, Ryan C Metzger <metzger.rc at gmail.com> wrote:
> So I'm working on a custom front end to R, in one mode...
2004 Apr 18
0
[patch] R-1.9.0: compile error without nl_langinfo(CODESET) (PR#6789)
...got the following compile error in R-1.9.0 on NetBSD 1.5:
<-- snip -->
...
gcc -I../../src/extra/zlib -I../../src/extra/bzip2
-I../../src/extra/pcre -I. -I../../src/include -I../../src/include -I/usr/local/include
-DHAVE_CONFIG_H -O2 -mcpu=v8 -c main.c -o main.o
main.c: In function `setup_Rmainloop':
main.c:463: `CODESET' undeclared (first use in this function)
main.c:463: (Each undeclared identifier is reported only once
main.c:463: for each function it appears in.)
make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/aux/adrian/build/R-1.9.0/src/main'
<-- snip -->...
2003 Mar 17
1
R-devel on Darwin
...eval (eval.c:418)
#53 0x0005832c in do_for (eval.c:950)
#54 0x00056fcc in Rf_eval (eval.c:418)
#55 0x00058810 in do_begin (eval.c:1055)
#56 0x00056fcc in Rf_eval (eval.c:418)
#57 0x00057614 in Rf_applyClosure (eval.c:609)
#58 0x00057200 in Rf_eval (eval.c:453)
#59 0x000736e4 in setup_Rmainloop (main.c:577)
#60 0x00073850 in Rf_mainloop (main.c:622)
#61 0x000dc520 in main (system.c:102)
#62 0x00001a40 in _start (crt.c:267)
#63 0x000018c0 in start
PPC Thread State:
srr0: 0x0149995c srr1: 0x0200f030 vrsave: 0x00000000
xer: 0x00000000 lr: 0x0149990c ctr:...