Changeset 96
- Timestamp:
- 03/18/07 03:20:04
- Files:
-
- guts.sh (modified) (4 diffs)
- src/io_fread_shared_ind.upc (modified) (3 diffs)
- src/read_int.test (added)
- src/units (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
guts.sh
r95 r96 79 79 80 80 FILE=read.test 81 FILE_INT=read_int.test 81 82 touch write_test.txt 82 83 … … 155 156 fi 156 157 157 RUN_int0=`eval echo "upcrun -qn ${NP} ${SUNIT}.int0 ${FILE }"`158 RUN_int0=`eval echo "upcrun -qn ${NP} ${SUNIT}.int0 ${FILE_INT}"` 158 159 echo ${RUN_int0} 159 160 exe_output=`${RUN_int0}` … … 170 171 fi 171 172 172 RUN_int1=`eval echo "upcrun -qn ${NP} ${SUNIT}.int1 ${FILE }"`173 RUN_int1=`eval echo "upcrun -qn ${NP} ${SUNIT}.int1 ${FILE_INT}"` 173 174 echo ${RUN_int1} 174 175 exe_output=`${RUN_int1}` … … 185 186 fi 186 187 187 RUN_int4=`eval echo "upcrun -qn ${NP} ${SUNIT}.int4 ${FILE }"`188 RUN_int4=`eval echo "upcrun -qn ${NP} ${SUNIT}.int4 ${FILE_INT}"` 188 189 echo ${RUN_int4} 189 190 exe_output=`${RUN_int4}` src/io_fread_shared_ind.upc
r93 r96 49 49 upc_barrier; 50 50 51 upc_all_fseek(fd, offsets[MYTHREAD]*sizeof( int), UPC_SEEK_SET);51 upc_all_fseek(fd, offsets[MYTHREAD]*sizeof(TYPE), UPC_SEEK_SET); 52 52 ssize_t bytes = upc_all_fread_shared(fd, buffer+offset, blocksize, sizeof(TYPE), nmemb, UPC_IN_NOSYNC | UPC_OUT_NOSYNC); 53 53 … … 62 62 upc_barrier; 63 63 } 64 65 /* Validation for data integrity */ 66 for (i = 0; i < nmemb; i++) { 67 if (buffer[offset + i] != (offsets[MYTHREAD] + i) % 0x80) 68 GULA_FAIL("Data integrity is violated!"); 69 } 70 71 64 72 offset = upc_all_fseek(fd, 0, UPC_SEEK_CUR); 65 fprintf(stderr, "TH%d: origin = %d, read %d bytes, cur =%d \n", MYTHREAD, sizeof(TYPE)*offsets[MYTHREAD], bytes, offset); 66 /* TODO: Add check for return value and offset */ 73 if (offset != (offsets[MYTHREAD] + nmemb) * sizeof(TYPE)) 74 GULA_FAIL("Fail to setup the file pointer"); 75 67 76 68 77 #if BLOCKSIZE != 0 … … 72 81 return 0; 73 82 } 74 src/units
r81 r96 1 1 io_rw_compound 2 io_fopen3 io_fclose4 io_fseek5 io_fset_size6 io_fget_size7 io_fpreallocate8 io_fcntl9 io_fread_local10 io_fwrite_local11 io_rw_compound12 io_fread_list_local13 io_fwrite_list_local14 io_fwrite_local_async15 io_rw_compound16 io_fread_local_async17 io_rw_compound18 io_fread_list_local_async19 io_fwrite_list_local_async20 io_fwait_async21 io_ftest_async
