diff --git a/dvm/fdvm/trunk/fdvm/acc.cpp b/dvm/fdvm/trunk/fdvm/acc.cpp index c04a35f..557d1c1 100644 --- a/dvm/fdvm/trunk/fdvm/acc.cpp +++ b/dvm/fdvm/trunk/fdvm/acc.cpp @@ -7645,14 +7645,14 @@ SgExpression *CalculateArrayBound(SgExpression *edim, SgSymbol *ar, int flag_pri SgExpression *low; if (!edim && flag_private) { - Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); + // Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); return (edim); } if ((sbe = isSgSubscriptExp(edim)) != NULL){ //DDOT if (!sbe->ubound() && flag_private) { - Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); + // Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); return(edim); } @@ -7675,8 +7675,8 @@ SgExpression *CalculateArrayBound(SgExpression *edim, SgSymbol *ar, int flag_pri else { edim = Calculate(edim); - if (edim->variant() != INT_VAL && flag_private ) - Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); + // if (edim->variant() != INT_VAL && flag_private ) + // Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir); return (edim); } } @@ -11095,10 +11095,13 @@ SgExpression *BlockDimsProduct() return &(*new SgRecordRefExp(*s_blockdim, "x") * *new SgRecordRefExp(*s_blockdim, "y") * *new SgRecordRefExp(*s_blockdim, "z")); } -SgExpression *LowerShiftForArrays (SgSymbol *ar, int i) +SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type) { SgExpression *e = isConstantBound(ar, i, 1); - if(!e) + if(e) return e; + if(type==0) //private array + e = new SgValueExp(1); + else // reduction array e = &(((SgExprListExp *)red_struct_list->lowBound_arg)->elem(i)->copy()); return e; } diff --git a/dvm/fdvm/trunk/fdvm/acc_f2c.cpp b/dvm/fdvm/trunk/fdvm/acc_f2c.cpp index fca9818..53267c1 100644 --- a/dvm/fdvm/trunk/fdvm/acc_f2c.cpp +++ b/dvm/fdvm/trunk/fdvm/acc_f2c.cpp @@ -208,7 +208,7 @@ static void addInListIfNeed(SgSymbol *tmp, int type, reduction_operation_list *t while (dimList) { allArraySub.push(dimList->lhs()); - allArraySubConv.push(make_pair(LowerShiftForArrays(tmp, rank), UpperShiftForArrays(tmp, rank))); + allArraySubConv.push(make_pair(LowerShiftForArrays(tmp, rank, type), UpperShiftForArrays(tmp, rank))); ++rank; dimList = dimList->rhs(); } @@ -222,7 +222,7 @@ static void addInListIfNeed(SgSymbol *tmp, int type, reduction_operation_list *t bool ddot = false; if (ex->variant() == DDOT && ex->lhs() || IS_ALLOCATABLE(tmp)) ddot = true; - t.correctExp.push_back(LowerShiftForArrays(tmp, rank)); + t.correctExp.push_back(LowerShiftForArrays(tmp, rank, type)); // swap array's dimentionss if (inNewVars(tmp->identifier())) diff --git a/dvm/fdvm/trunk/include/dvm.h b/dvm/fdvm/trunk/include/dvm.h index 8c1bb4c..43fc21f 100644 --- a/dvm/fdvm/trunk/include/dvm.h +++ b/dvm/fdvm/trunk/include/dvm.h @@ -1390,7 +1390,7 @@ void RefInImplicitLoop(SgExpression *eim, int mode); SgSymbol *dvm000SymbolForHost(int host_dvm, SgStatement *hedr); SgExpression *Red_grid_index(SgSymbol *sind); SgExpression *BlockDimsProduct(); -SgExpression *LowerShiftForArrays (SgSymbol *ar, int i); +SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type); SgExpression *UpperShiftForArrays (SgSymbol *ar, int i); SgExpression *coefProd(int i, SgExpression *ec); SgExpression *LinearFormForRedArray (SgSymbol *ar, SgExpression *el, reduction_operation_list *rsl); diff --git a/sapfor/experts/Sapfor_2017/_src/Utils/version.h b/sapfor/experts/Sapfor_2017/_src/Utils/version.h index 7e2ea41..71c3851 100644 --- a/sapfor/experts/Sapfor_2017/_src/Utils/version.h +++ b/sapfor/experts/Sapfor_2017/_src/Utils/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_SPF "2228" +#define VERSION_SPF "2229"