- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, beginner problem, I try to solve A x = b with A = 0.2 and b=0.1 so x should become 0.5. In the fgmres_full_funct_c.c example I did this:
#define N 1
int ia[2] = {1, 2};
int ja[1] = { 1 };
double A[1] = { 0.2 };
double expected_solution = { 0.5 };
when I compile and run the fgmres_full_funct_c.out I get a 'nan' in the computed solution in stead of 0.5 I use mkl version 9.0.018.
thanks, Dennis
#define N 1
int ia[2] = {1, 2};
int ja[1] = { 1 };
double A[1] = { 0.2 };
double expected_solution
when I compile and run the fgmres_full_funct_c.out I get a 'nan' in the computed solution in stead of 0.5 I use mkl version 9.0.018.
thanks, Dennis
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, reply to myself for those who try the same,
1. I found that the declaration of the tmp array: tmp[N*(2N+1)+(N*(N+9))/2+1] is less general then it looks. For N=1 this generates a too small tmp array, since the code actually uses a longer array. Thus for small N do not use that declaration, but add something extra, eg tmp[100+N*(2N+1)+(N*(N+9))/2+1].
2. Also notice that RCI_request==3 contains code dependend on the size N.
1. I found that the declaration of the tmp array: tmp[N*(2N+1)+(N*(N+9))/2+1] is less general then it looks. For N=1 this generates a too small tmp array, since the code actually uses a longer array. Thus for small N do not use that declaration, but add something extra, eg tmp[100+N*(2N+1)+(N*(N+9))/2+1].
2. Also notice that RCI_request==3 contains code dependend on the size N.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page