| 128 | | upc_barrier; |
|---|
| 129 | | #if 1 |
|---|
| 130 | | /* To check that this function only works for the file handle that is open for reading */ |
|---|
| 131 | | fd = upc_all_fopen( fname, flags_write, 0, NULL); |
|---|
| 132 | | if( fd == NULL ) |
|---|
| 133 | | GULA_FAIL("failed to open the write file"); |
|---|
| 134 | | |
|---|
| 135 | | printf("@4"); |
|---|
| 136 | | upc_barrier; |
|---|
| 137 | | |
|---|
| 138 | | /* Now, we are going to launch upc_fread */ |
|---|
| 139 | | upc_all_fread_list_local_async(fd, 1, &mv, 1, &fv, sync); |
|---|
| 140 | | upc_barrier; |
|---|
| 141 | | |
|---|
| 142 | | printf("@5"); |
|---|
| 143 | | ret = upc_all_fwait_async(fd); |
|---|
| 144 | | if( ret != -1 ) |
|---|
| 145 | | GULA_FAIL("failed to prevent to read from WRONLY file using upc_all_fread_list_local_async"); |
|---|
| 146 | | if( upc_all_fclose(fd) != 0 ) |
|---|
| 147 | | GULA_FAIL("failed to close the file"); |
|---|
| 148 | | |
|---|
| 149 | | upc_barrier; |
|---|
| 150 | | #endif |
|---|
| 151 | | |
|---|