mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
working write_num [fortran]
This commit is contained in:
parent
ac44fc29a6
commit
d680120efe
@ -314,7 +314,10 @@ DEBUG
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint64_t size_$group_dset$ = 1;
|
||||
// workaround for the case of missing blocks in the file
|
||||
uint64_t size_$group_dset$ = 0;
|
||||
if ($group$->rank_$group_dset$ != 0) size_$group_dset$ = 1;
|
||||
|
||||
for (unsigned int i=0; i<$group$->rank_$group_dset$; i++){
|
||||
|
||||
unsigned int j=-1;
|
||||
@ -462,7 +465,10 @@ trexio_exit_code trexio_text_flush_$group$(const trexio_text_t* file) {
|
||||
|
||||
fprintf(f, "rank_$group_dset$ %d\n", $group$->rank_$group_dset$);
|
||||
|
||||
uint64_t size_$group_dset$ = 1;
|
||||
// workaround for the case of missing blocks in the file
|
||||
uint64_t size_$group_dset$ = 0;
|
||||
if ($group$->rank_$group_dset$ != 0) size_$group_dset$ = 1;
|
||||
|
||||
for (unsigned int i=0; i<$group$->rank_$group_dset$; i++){
|
||||
fprintf(f, "dims_$group_dset$ %d %ld\n", i, $group$->dims_$group_dset$[i]);
|
||||
size_$group_dset$ *= $group$->dims_$group_dset$[i];
|
||||
|
@ -12,7 +12,7 @@ program test_trexio
|
||||
rc = 0
|
||||
num = 10
|
||||
|
||||
file1 = trexio_open('test_fort' // c_null_char, 'w', 1)
|
||||
file1 = trexio_open('trexio_test' // c_null_char, 'w', 1)
|
||||
! file1 = trexio_open('test_fort.h5' // c_null_char, 'w', 0)
|
||||
|
||||
rc = trexio_write_nucleus_num(file1, num)
|
||||
|
Loading…
Reference in New Issue
Block a user