diff --git a/examples/test_fmm.c b/examples/test_fmm.c index 1e65935fe20f2be2d5b7d3e93dbd07d9e0aebbc0..5aa7e191883b8e7e7dac2bb4ccb2c357c01ade7e 100644 --- a/examples/test_fmm.c +++ b/examples/test_fmm.c @@ -635,6 +635,7 @@ static inline int are_neighbours(struct cell *ci, struct cell *cj) { static inline void iact_pair_pc(struct cell *ci, struct cell *cj) { make_interact_pc(ci->parts, ci->count, ci->loc, cj); + make_interact_pc(cj->parts, cj->count, cj->loc, ci); } @@ -773,7 +774,6 @@ void iact_pair(struct cell *ci, struct cell *cj) { } else { /* Otherwise do cell-mulitpole interactions */ iact_pair_pc(cp, cps); - iact_pair_pc(cps, cp); } } } @@ -945,26 +945,28 @@ void create_tasks(struct qsched *s, struct cell *ci, struct cell *cj) { data[0] = ci; data[1] = cj; tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, - sizeof(struct cell *) * 2, ci->count); + sizeof(struct cell *) * 2, ci->count + cj->count); /* Add the resource and dependance */ qsched_addlock(s, tid, ci->res); + qsched_addlock(s, tid, cj->res); #ifdef COM_AS_TASK qsched_addunlock(s, cj->com_tid, tid); + qsched_addunlock(s, ci->com_tid, tid); #endif - /* Create the other task. */ - data[1] = ci; - data[0] = cj; - tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, - sizeof(struct cell *) * 2, cj->count); +/* /\* Create the other task. *\/ */ +/* data[1] = ci; */ +/* data[0] = cj; */ +/* tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, */ +/* sizeof(struct cell *) * 2, cj->count); */ - /* Add the resource and dependance */ - qsched_addlock(s, tid, cj->res); -#ifdef COM_AS_TASK - qsched_addunlock(s, ci->com_tid, tid); -#endif +/* /\* Add the resource and dependance *\/ */ +/* qsched_addlock(s, tid, cj->res); */ +/* #ifdef COM_AS_TASK */ +/* qsched_addunlock(s, ci->com_tid, tid); */ +/* #endif */ } else {/* Cells are direct neighbours */