I want a random number generator that has different random number sequence for every nodes and for every time I start the program. I tried to use the machine time as seeds, but all nodes outputs the...
Type: Posts; User: smartfish
I want a random number generator that has different random number sequence for every nodes and for every time I start the program. I tried to use the machine time as seeds, but all nodes outputs the...
anyone have any idea?
I have a serial code that works with no problems.
But when I was trying to make it parallel (I have the MPI_init and MPI_Comm_rank in the beginning and the MPI_Finalize at the back of the...
I got the code figured out myself. case closed:D
sorry, the code was directly copied from the book, didn't notice that.
I'm trying to solve Ax=b using linbcg.c (p.86 NR in c, 2nd version), A is sparse. All my bs are 0s. The final solution x are suppose to be all 0s, too. But this leads to the problem that when initial...
Well, I'm using code block. When I click the build button the log says " 0 errors, 0 warnings". However, when I click the run button, an error report pops up. I tried it in Dev C the same thing...
OK, my code is working now. Thanks for all the replies!
And now I'm getting an error message as follows
In function 'main':
|error: incompatible type for argument 2 of 'initial'|
|note: expected 'double (*)[<Uc630> + 1u]' but argument is of type...
Thanks for the suggestion. I got rid of the pointer. But still don't get the right result? I think the matrix is not passed from the initial function to the main function?
Yes, I know there's should have something to do with the printer. My point is I need to pass the matrix from the initial function to the main function. Pointer should be the way of doing that (I...
I'm trying to get the coordinates of a 9x9 flat grid. The first point start at the origin. The current code has output but is apparently wrong.
#include<math.h>
#include<stdio.h>
#define pi...