Re: [Rd] .Call with C and Fortran together (PR#8122)

2005-09-06 Thread Ricardo Luiz Andrade Abrantes
You're right! Thanks to everybody here, and I am sorry for that "non-sense" bug report! Ricardo On 9/5/05, Thomas Lumley <[EMAIL PROTECTED]> wrote: > > > > > > In some machines I don't get the segmentation fault problem, but I don't > get the > > message "Just a simple test" either (when us

Re: [Rd] .Call and Segmentation Fault

2005-09-04 Thread Ricardo Luiz Andrade Abrantes
Thanks, Ricardo On 04 Sep 2005 21:54:20 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > Ricardo Luiz Andrade Abrantes <[EMAIL PROTECTED]> writes: > > > Hello there! > > I almost don't deal with SEXPs. The function's name is main() it returns

Re: [Rd] .Call and Segmentation Fault

2005-09-04 Thread Ricardo Luiz Andrade Abrantes
Fortran routine > requires. > > I don't understand how you can call the "same" function from C. How do you > deal with SEXPs? > > Reid Huntsinger > > Reid Huntsinger > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >

Re: [Rd] .Call and Segmentation Fault

2005-08-30 Thread Ricardo Luiz Andrade Abrantes
/05, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > On Sat, 27 Aug 2005, Ricardo Luiz Andrade Abrantes wrote: > > > Hi! > > Yes, I am returning a SEXP from the functions called from R, and the > > problem occurs before (thousands of iterations before) the return

[Rd] .Call and Segmentation Fault

2005-08-30 Thread Ricardo Luiz Andrade Abrantes
I forgot to put the folowing includes in my last post: #include #include Thanks, Ricardo -- Forwarded message -- From: Ricardo Luiz Andrade Abrantes <[EMAIL PROTECTED]> Date: Aug 30, 2005 1:37 PM Subject: Re: [Rd] .Call and Segmentation Fault To: Simon Urbanek &

Re: [Rd] .Call and Segmentation Fault

2005-08-30 Thread Ricardo Luiz Andrade Abrantes
Hi Simon! You are right! Ok, here it is (a little resumed): #include #include #include #include #include "interface.h" SEXP main() { int gtype, inform, m, n, maxoutit, maxtotit, maxtotfc, outiter, totcgcnt, totfcnt, totgcnt, totiter, iprint, ncomp, i; double f,nalpsupn,epsfeas,epsopt,snorm;

Re: [Rd] .Call and Segmentation Fault

2005-08-28 Thread Ricardo Luiz Andrade Abrantes
> It cannot be .Call: your .Call passed no parameters so there was nothing > to be uninitialized. I did ask you why you were doing that. This .Call without parameters is just for a test. I am constructing an interface to this C/Fortran optimization package, and because this segmentation fault pr

Re: [Rd] .Call and Segmentation Fault

2005-08-27 Thread Ricardo Luiz Andrade Abrantes
that when it tries to use the address as a SEXP. > > On Aug 26, 2005, at 3:19 PM, Ricardo Luiz Andrade Abrantes wrote: > > > Hello to everyone! > > I use .Call to call a C function without arguments wich calls a > > fortran optimization package. My C function uses others C a

[Rd] .Call and Segmentation Fault

2005-08-26 Thread Ricardo Luiz Andrade Abrantes
Hello to everyone! I use .Call to call a C function without arguments wich calls a fortran optimization package. My C function uses others C and Fortran functions and it works fine when I call it from a main() in a C program. But when I call it from R with .Call("name_of_the_c_function"), R gives m

[Rd] .Call and Segmentation Fault

2005-08-26 Thread Ricardo Luiz Andrade Abrantes
Hello to everyone! I use .Call to call a C function without arguments wich calls a fortran optimization package. My C function uses others C and Fortran functions and it works fine when I call it from a main() in a C program. But when I call it from R with .Call("name_of_the_c_function"), R gives m