| | 833 | |
| | 834 | static void check_recsize_too_big(NC *ncp) |
| | 835 | { |
| | 836 | /* assertion: because recsize will be used to set up the file |
| | 837 | * view, we must ensure there is no overflow when specifying |
| | 838 | * how big a stride there is between items (think interleaved |
| | 839 | * records). |
| | 840 | * |
| | 841 | * note: 'recsize' is the sum of the record size of all record |
| | 842 | * variables in this dataset */ |
| | 843 | if (ncp->recsize != (MPI_Aint)ncp->recsize) { |
| | 844 | fprintf(stderr, "Type overflow: unable to read/write multiple records in this dataset\non this platform. Please either access records of this record variable\none-at-a-time or run on a 64 bit platform\n"); |
| | 845 | } |
| | 846 | /* the assert here might harsh, but without it, users will get corrupt |
| | 847 | * data. */ |
| | 848 | assert (ncp->recsize == (MPI_Aint)ncp->recsize); |
| | 849 | } |
| | 850 | |
| 1161 | | /* assertion: because recsize will be used to set up the file |
| 1162 | | * view, we must ensure there is no overflow when specifying |
| 1163 | | * how big a stride there is between items (think interleaved |
| 1164 | | * records). |
| 1165 | | * |
| 1166 | | * note: 'recsize' is the sum of the record size of all record |
| 1167 | | * variables in this dataset */ |
| 1168 | | if (ncp->recsize != (MPI_Aint)ncp->recsize) { |
| 1169 | | fprintf(stderr, "Type overflow: unable to read/write multiple records in this dataset\non this platform. Please either access records of this record variable\none-at-a-time or run on a 64 bit platform\n"); |
| 1170 | | } |
| 1171 | | assert (ncp->recsize == (MPI_Aint)ncp->recsize); |
| 1172 | | |
| | 1183 | check_recsize_too_big(ncp); |