Changeset 31


Ignore:
Timestamp:
07/09/12 18:11:33 (7 years ago)
Author:
lalibert
Message:

Fixed parallel dimension bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CDB/trunk/driver/diag_driver_comp.py

    r30 r31  
    263263                        out.writei('STRIDE=`expr $DIM_LENGTH / '+str(self.dim_async)+' + 1`\n') 
    264264                    out.writei('NUM_DIM=0\n') 
    265                     out.writei('while [ "$NUM_DIM" -le "$DIM_LENGTH" ]; do if [ "`expr ${NUM_DIM} + ${STRIDE} -1`" -ge "$DIM_LENGTH" ]; then \\\n') 
    266                     out.writei('echo ${NUM_DIM},${DIM_LENGTH}; else echo ${NUM_DIM},`expr ${NUM_DIM} + ${STRIDE} - 1`; fi; \\\n') 
     265                    out.writei('while [ "$NUM_DIM" -le "$DIM_LENGTH" ]; do if [ "$((${NUM_DIM} + ${STRIDE} - 1))" -ge "$DIM_LENGTH" ]; then \\\n') 
     266                    out.writei('echo ${NUM_DIM},${DIM_LENGTH}; else echo ${NUM_DIM},$((${NUM_DIM} + ${STRIDE} - 1)); fi; \\\n') 
    267267                    out.writei('let "NUM_DIM += ${STRIDE}"; done |\\\n') 
    268268                    out.writei('parallel -j'+str(self.dim_async)+' -k "bash ${CDB_TEMP_DIR}/'+parallel_dimension+'_function'+str(parallel_dimension_number)+'.sh {}"\n') 
Note: See TracChangeset for help on using the changeset viewer.