2
#include <libciomr/libciomr.h>
5
int dpd_file4_mat_irrep_wrt_block(dpdfile4 *File, int irrep, int start_pq,
8
int rowtot, coltot, my_irrep;
10
psio_address irrep_ptr, next_address;
14
dpd_file4_cache_dirty(File); /* Flag this cache entry for writing */
15
return 0; /* We're keeping this data in core */
18
my_irrep = File->my_irrep;
19
irrep_ptr = File->lfiles[irrep];
21
coltot = File->params->coltot[irrep^my_irrep];
22
size = ((long) rowtot) * ((long) coltot);
24
/* Advance file pointer to current row */
26
seek_block = DPD_BIGNUM/(coltot * sizeof(double)); /* no. of rows for which we can compute the address */
28
fprintf(stderr, "\nLIBDPD Error: each row of %s is too long to compute an address.\n",File->label);
29
dpd_error("dpd_file4_mat_irrep_rd_block", stderr);
31
for(; start_pq > seek_block; start_pq -= seek_block)
32
irrep_ptr = psio_get_address(irrep_ptr, seek_block*coltot*sizeof(double));
33
irrep_ptr = psio_get_address(irrep_ptr, start_pq*coltot*sizeof(double));
38
psio_write(File->filenum, File->label, (char *) File->matrix[irrep][0],
39
size*((long) sizeof(double)), irrep_ptr, &next_address);