Error while using C_CENTROID
Hey,
I´m trying to order my cells inside each thread by coordinates. Therefore I have Code:
cell_t cIDs_t0[50], cIDs_t1[50]; // Cell ID arrays of each thread These arrays contain the IDs in a sorted order (e.g. 0,5,4,3,2,1,6,7,...). Now I have a problem using C_CENTROID function: Code:
const int Nt = 2; // Number of threads The problem is, if I use my function like this, the program crashes with segmentation fault error but if I use the commented out lines with the c_loop and if statement (if statement is only for a reduced message output, also works without the if), than the program works and give me my expected output. Confusing for me is that my C_CENTROID and my message lines do not contain c in any case. Does anybody know, whats the problem here? The code is inside a DEFINE_ON_LOADING function. Here is my error file: Code:
Node 999999 Fatal signal raised sig = Segmentation fault Chris |
Quote:
Code:
cell_t *cIDs[Nt] = {cIDs_t0, cIDs_t1}; // Pointer to all cell IDs of all threads thread (t) is not integer, so you are not able to use %d to plot it |
All times are GMT -4. The time now is 23:51. |