The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Machine tolerance function in curve fitting routin

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ddecotiis Posted - 09/01/2009 : 5:30:40 PM
Origin Ver. 8 and Service Release 6(Select Help-->About Origin):
Operating System: Xp

I'm trying to use the NAG x01ajc function via. the X01AJC constant in the code of a curve fitting routine. When I try to compile the code I get the following error:
"Error, Function x02ajc@LAAAAAAA was called, but its body could not be located during linking."
I presume that I need to add the .c or .dll file containing the function body to the workspace, but I'm not sure which file to add. Can anyone shed some light on the problem?
-Thanks
10   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 09/25/2009 : 02:02:26 AM
Hi,

Send email to your mailbox, please check.

Iris
ddecotiis Posted - 09/22/2009 : 8:32:49 PM
All,
I think there is a bigger problem with my function.
1. Compiling the function in the demo version of origin still results in the following error:
Function x02ajc@LAAAAAAA was called, but its body could not be located during linking.
I wrote a smaller example copying the NAG documentation code to demonstrate my point. The sample test.c code (shown below) will generate this error if the comment line is removed.

2. Any call to the NAG function for finding the root of system of transcendental functions (thread safe), nag_zero_nonlin_eqns_1 (C05tbc) generates the following error "External call execution error". I reproduced the sample code from the NAG documentation as test.c below. I am unable to reproduce the program output shown in the NAG documentation because of the repeated error.

test.c/
#include <Origin.h>
#include <OC_nag8.h>
#define NMAX 9

static void f(Integer n, double x[], double fvec[], Integer *userFlag, Nag_User *comm)
{
Integer k;
for (k=0; k<n; ++k)
{
fvec[k]=(3.0-x[k]*2.0)*x[k]+1.0;
if (k>0)
fvec[k] -= x[k-1];
if (k<n-1)
fvec[k] -= x[k+1]*2.0;
}
}

main()
{
double ffvec[NMAX];
double fx[NMAX];
Integer i,j;
double xtol;
static NagError fail;
Nag_User comm;

Integer n= NMAX;

printf("Program Results:\n");
for (j=0;j<n;j++)
x[j]=-1.0;
//xtol= sqrt(X02AJC); Commented till I can fix this problem
xtol = 0.00001;
c05tbc(n,x,fvec,f,xtol,&comm,&fail);
if (fail.code == NE_NOERROR)
{
printf("Final Approximate Solutions\n\n");
for(j=0;j<n;j++)
printf("%12.4f%s",x[j], (j%3==2 || j==n-1) ? "\n" : " ");
}else
{
printf("error occured: %s", fail.message);
}
}

/test.c

Any input would be great

Thanks
larry_lan Posted - 09/16/2009 : 11:42:51 PM
Hi:

We cannot reproduce your compiling error in UPDATED_Ligand_Binding_MR_Solver_.FDF. I wonder if you updated to SR6 from other patches? Say from SR5 to SR6? If you keep your licence, how about download the demo installation file and repair Origin with your licence? Please let us know whether it works after repair.

Thanks
Larry
ddecotiis Posted - 09/16/2009 : 3:52:20 PM
Iris,
There was some issue with the code. I've uploaded a file with correct syntax to UPDATED_Ligand_Binding_MR_Solver_.FDF.

Thanks
ddecotiis Posted - 09/16/2009 : 2:03:47 PM
Iris,
Sorry about the delay. Thanks again for agreeing to take a look at this. I've uploaded the function .FDF file to the originlab /incoming directory. The filename is Ligand_Binding_MR_Solver_.FDF. I'm still getting the same error on compilation. Let me know what you think.

Thanks again,
Iris_Bai Posted - 09/02/2009 : 10:33:32 PM
Please send me your FDF file according to the intruction in this page http://www.originlab.com/index.aspx?s=1&lm=123&pid=752

Iris
ddecotiis Posted - 09/02/2009 : 4:50:25 PM
Iris,
I've already got that include in my .c source file. Any other ideas?

Thanks
Iris_Bai Posted - 09/02/2009 : 01:50:20 AM
Sorry, should include this one:
#include <OC_nag8.h>
OC_nag8.h is a header file including all nag header files.

By the way there are many useful NAG function calling examples under http://ocwiki.originlab.com/index.php?title=Category:Calling_NAG_Functions%28Examples%29.
ddecotiis Posted - 09/01/2009 : 10:44:29 PM
Iris,
Thanks for the quick response. I'm getting a new crops of errors:

"C:\Program Files\OriginLab\Origin8\OriginC\system\NAG8\nagx02.h(113) :Error, illegal function argument type"
"C:\Program Files\OriginLab\Origin8\OriginC\system\NAG8\nagx02.h(113) :Error, syntax error in variable declaration."
"C:\Documents and Settings\Dan\My Documents\OriginLab\Origin8\User Files\OriginC\NLSF\_nlfLigand_Binding_MR_Solver.fit(4) :Error, include file compilation error"

Any other ideas?

Thanks again
Iris_Bai Posted - 09/01/2009 : 10:33:19 PM
Please include header file and compile again.
#include <\NAG8\nagx02.h>

Iris

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000