SIGSEGV is an error received when the code request a piece of information from the memory that does not exist. nBy looking at your function, you requested thread that was not input to the function. So, you would get this error. But this should be an error when you start simulations, not at loading. So probably, there is another error. Anyway, To help you debug the function, please let me know where do you hookup this profile? is it only at inlet?nFirst, replace nint zone_ID = THREAD_ID(thread);nwithnint zone_ID = THREAD_ID (DT_THREAD (thread));nnSecond, if you hookup the profile to the inlet, you must recall other threads as they are not an input to the function. i.e. thread is always the inlet in your function (or whatever you hooked the function to)nCan you explain what do you intend to do with this function?n