#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#define Min(a, b) ((a) < (b) ? (a) : (b))

#ifndef _DVMH
#define dvmh_get_num_procs(X) 1
#endif

static void distr31();
static void distr32();
static void distr33();
static void distr34();
static void distr35();
static void distr36();
static void distr37();
static void distr38();
static void distr39();
static void distr310();
static void distr311();
static void distr312();
static void distr313();
static void distr314();
static void distr315();
static void distr316();
static void distr317();
static void distr318();
static void distr319();
static void distr320();
static void distr321();
static void distr322();
static void distr323();
static void distr324();
static void distr325();
static void distr326();
static void distr327();
static void distr328();
static void distr329();
static void distr330();
static void distr331();
static void distr332();
static void distr333();
static void distr334();
static void distr335();
static void distr336();
static void distr337();
static void distr338();
static void distr339();
static void distr340();
static void distr341();
static void distr342();
static void distr343();
static void distr344();
static void distr345();
static void distr346();
static void distr347();
static void distr348();
static void distr349();
static void distr350();
static void distr351();
static void distr352();
static void distr353();
static void distr354();
static void distr355();
static void distr356();
static void distr357();
static void distr358();
static void distr359();
static void distr360();
static void distr361();
static void distr362();
static void distr363();
static void distr364();
static void distr365();
static void ansyes(const char tname[]);
static void ansno(const char tname[]);
static int ER = 10000;
static int erri, i, j, k;

int main(int an, char **as) {
    printf("=== START OF DELDISTR3 ===================\n");
    distr31();
    distr32();
    distr33();
    distr34();
    distr35();
    distr36();
    distr37();
    distr38();
    distr39();
    distr310();
    distr311();
    distr312();
    distr313();
    distr314();
    distr315();
    distr316();
    distr317();
    distr318();
    distr319();
    distr320();
    distr321();
    distr322();
    distr323();
    distr324();
    distr325();
    distr326();
    distr327();
    distr328();
    distr329();
    distr330();
    distr331();
    distr332();
    distr333();
    distr334();
    distr335();
    distr336();
    distr337();
    distr338();
    distr339();
    distr340();
    distr341();
    distr342();
    distr343();
    distr344();
    distr345();
    distr346();
    distr347();
    distr348();
    distr349();
    distr350();
    distr351();
    distr352();
    distr353();
    distr354();
    distr355();
    distr356();
    distr357();
    distr358();
    distr359();
    distr360();
    distr361();
    distr362();
    distr363();
    distr364();
    distr365();
    printf("=== END OF DELDISTR3 ===================\n");
    return 0;
}

static int myRand() {
    const unsigned a = 1103515245U;
    const unsigned c = 12345U;
    const unsigned m = ((unsigned)RAND_MAX) + 1U;
    static unsigned prev = 5;
    prev = (a * prev + c) % m;
    return prev;
}

static void genBlocksAxis(const int procCount, const int weight, const int withoutZero, int **blocks) {
    *blocks = (int *)malloc(procCount * sizeof(int));
    int restWeight = weight, i, zeroind = -1;
    if (!withoutZero && procCount != 1)
        zeroind = myRand() % (procCount - 1);
    for (i = 0; i < (procCount - 1); i++) {
        if (i == zeroind)
            (*blocks)[i] = 0;
        else
            (*blocks)[i] = 1 * withoutZero + myRand() % (restWeight - (procCount - (i + 1)));
        restWeight -= (*blocks)[i];
    }
    (*blocks)[i] = restWeight;
}

void distr31()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr31";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][*][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr32()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr32";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][block][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr33()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int* BS2;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS2);
    int* BS3;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS3);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr33";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][genblock(BS2)][genblock(BS3)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(BS2);
    free(BS3);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr34()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    double wb2[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    double wb3[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr34";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][wgtblock(wb2, 8)][wgtblock(wb3, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr35()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int m2 = 4;
    int m3 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr35";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][multblock(m2)][multblock(m3)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr36()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr36";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][block][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr37()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr37";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][block][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr38()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr38";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][block][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr39()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr39";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][genblock(BS1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr310()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr310";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][genblock(BS1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr311()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr311";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][genblock(BS1)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr312()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr312";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][wgtblock(wb1, 8)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr313()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr313";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][wgtblock(wb1, 8)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr314()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr314";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][wgtblock(wb1, 8)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr315()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr315";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][multblock(m1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr316()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr316";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][multblock(m1)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr317()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr317";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[*][multblock(m1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr318()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr318";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][*][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr319()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr319";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][*][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr320()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr320";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][*][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr321()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr321";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][genblock(BS1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr322()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr322";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][genblock(BS1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr323()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr323";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][genblock(BS1)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr324()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr324";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][wgtblock(wb1, 8)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr325()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr325";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][wgtblock(wb1, 8)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr326()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr326";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][wgtblock(wb1, 8)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr327()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr327";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][multblock(m1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr328()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr328";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][multblock(m1)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr329()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr329";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[block][multblock(m1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr330()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr330";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][*][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr331()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr331";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][*][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr332()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr332";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][*][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr333()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr333";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][block][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr334()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr334";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][block][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr335()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr335";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][block][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr336()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr336";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][wgtblock(wb1, 8)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr337()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr337";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][wgtblock(wb1, 8)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr338()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr338";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][wgtblock(wb1, 8)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr339()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr339";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][multblock(m1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr340()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr340";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][multblock(m1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr341()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(1), AN1, 1, &BS1);
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr341";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[genblock(BS1)][multblock(m1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr342()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr342";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][*][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr343()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr343";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][*][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr344()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr344";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][*][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr345()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr345";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][block][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr346()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr346";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][block][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr347()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr347";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][block][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr348()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr348";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][genblock(BS1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr349()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr349";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][genblock(BS1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr350()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr350";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][genblock(BS1)][multblock(m1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr351()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr351";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][multblock(m1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr352()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr352";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][multblock(m1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr353()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr353";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[wgtblock(wb1, 8)][multblock(m1)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr354()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr354";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][*][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr355()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr355";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][*][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr356()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr356";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][*][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr357()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr357";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][block][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr358()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr358";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][block][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr359()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr359";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][block][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr360()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr360";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][genblock(BS1)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr361()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr361";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][genblock(BS1)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr362()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(2), AN2, 1, &BS1);
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr362";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][genblock(BS1)][wgtblock(wb1, 8)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr363()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr363";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][wgtblock(wb1, 8)][*])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr364()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr364";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][wgtblock(wb1, 8)][block])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void distr365()
{
    #define AN1 8
    #define AN2 8
    #define AN3 8
    int m1 = 4;
    double wb1[8] = {1.0, 2., 2., 3.0, 1., 1., 1.5, 2.};
    int* BS1;
    genBlocksAxis(dvmh_get_num_procs(3), AN3, 1, &BS1);
    #pragma dvm array
    int (*A3)[AN2][AN3];
    char tname[] = "distr365";
    erri = ER;
    A3 = malloc(AN1 * AN2 * AN3 * sizeof(int));
    #pragma dvm redistribute(A3[multblock(m1)][wgtblock(wb1, 8)][genblock(BS1)])
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    A3[i][j][k] = i * 100 + j * 10 + k;
    }
    #pragma dvm region
    {
        #pragma dvm parallel([i][j][k] on A3[i][j][k]) reduction(min(erri)), cuda_block(256)
        for (i = 0; i < AN1; i++)
            for (j = 0; j < AN2; j++)
                for (k = 0; k < AN3; k++)
                    if (A3[i][j][k] != i * 100 + j * 10 + k)
                        erri = Min(erri, i * 100 + j * 10 + k);
    }
    #pragma dvm get_actual(erri)
    if (erri == ER)
        ansyes(tname);
    else
        ansno(tname);
    free(BS1);
    free(A3);
    #undef AN1
    #undef AN2
    #undef AN3
}
void ansyes(const char name[]) {
    printf("%s  -  complete\n", name);
}
void ansno(const char name[]) {
    printf("%s  -  ***error\n", name);
}
