parsec icon indicating copy to clipboard operation
parsec copied to clipboard

Handle kernels where [type=CPU]

Open cflinto opened this issue 2 years ago • 0 comments

Description

In a jdf file, you can specify the type of kernel you want by adding [type=ARCH]. If you declare [type=CPU], the generated program will crash with very little available info. I.e. in __parsec_execute(scheduling.c:179) because the chore is declared as so:

static const __parsec_chore_t __TP_MyTask_chores[] ={
#if defined(PARSEC_HAVE_CPU)
    { .type     = PARSEC_DEV_CPU,
      .dyld     = NULL,
      .evaluate = NULL,
      .hook     = (parsec_hook_t*)hook_of_LBM_WriteBack_CPU },
#endif  /* defined(PARSEC_HAVE_CPU) */
    { .type     = PARSEC_DEV_NONE,
      .evaluate = NULL,
      .hook     = (parsec_hook_t*)NULL },  /* End marker */
};

And PARSEC_HAVE_CPU is not defined. The main problem is that it is very natural for new users to declare [type=CPU], yet they have very few clues to help them understand the cause of the error.

Describe the solution you'd like

We should define PARSEC_HAVE_CPU or have some special case in parsec-ptgpp. There should be an error of no chore has been declared.

cflinto avatar Nov 11 '22 20:11 cflinto