 // This file must be compiled with nvcc
+#include <unistd.h>
 #include <signal.h>
 #include <stdio.h>
 #include <assert.h>

    error = cudaGetLastError();                                                                                    \
    if (error != cudaSuccess)                                                                                      \
    {                                                                                                              \
        printf("Error in %s at line %i of file %s: %s\n", #func__, __LINE__, __FILE__, cudaGetErrorString(error)); \
        raise(SIGTERM);                                                                                            \
        exit(-100);                                                                                                \

{                                                                                   \
    cublasStatus_t status;                                                          \
    if ((status = func__ args__) != CUBLAS_STATUS_SUCCESS)                          \
    {                                                                               \
        cublas_error_message(status);                                               \
        char nm[1024];                                                              \
        gethostname(nm, 1024);                                                      \
        printf("hostname: %s\n", nm);                                               \
        printf("Error in %s at line %i of file %s\n", #func__, __LINE__, __FILE__); \
        exit(-100);                                                                 \
    }                                                                               \
