Search:

Type: Posts; User: smartfish

Search: Search took 0.00 seconds.

  1. How to set seeds for random number generators in parallel code?

    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...
  2. anyone have any idea?

    anyone have any idea?
  3. How to debug "segmentation fault" in a parallel code?

    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...
  4. Replies
    3
    Views
    1,099

    I got the code figured out myself. case closed:D

    I got the code figured out myself. case closed:D
  5. Replies
    3
    Views
    1,099

    sorry, the code was directly copied from the...

    sorry, the code was directly copied from the book, didn't notice that.
  6. Replies
    3
    Views
    1,099

    Question from the NR

    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...
  7. Error message when I run my code, what can possibly go wrong?

    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...
  8. OK, my code is working now. Thanks for all the...

    OK, my code is working now. Thanks for all the replies!
  9. And now I'm getting an error message as follows ...

    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...
  10. Thanks for the suggestion. I got rid of the...

    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?
  11. Yes, I know there's should have something to do...

    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...
  12. Beginner has problem。Can anyone have a look at my code?

    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...
Results 1 to 12 of 12