mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-24 22:21:43 +02:00
Fix CMake
This commit is contained in:
parent
fe526ef8b9
commit
cc447a4933
@ -8,7 +8,7 @@
|
||||
#+INFOJS_OPT: toc:t mouse:underline path:org-info.js
|
||||
#+HTML_HEAD: <link rel="stylesheet" title="Standard" href="trexio.css" type="text/css" />
|
||||
|
||||
#+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
|
||||
#+STARTUP: align nodlcheck hidestars oddeven lognotestate
|
||||
#+AUTHOR: TREX-CoE
|
||||
#+LANGUAGE: en
|
||||
|
||||
|
@ -864,19 +864,17 @@ trexio_open(const char* file_name, const char mode,
|
||||
/* Try to determine the applicable backend if the back_end argument is TREXIO_AUTO */
|
||||
if (back_end == TREXIO_AUTO && mode == 'r') {
|
||||
#ifdef HAVE_HDF5
|
||||
trexio_exit_code rc_text, rc_hdf5;
|
||||
/* Check if the TREXIO file exists and if it is a directory */
|
||||
rc_text = trexio_text_inquire(file_name);
|
||||
trexio_exit_code rc_text = trexio_text_inquire(file_name);
|
||||
if (rc_text == TREXIO_SUCCESS) {
|
||||
back_end_local = TREXIO_TEXT;
|
||||
} else {
|
||||
/* If not, check if it is an HDF5 file */
|
||||
rc_hdf5 = trexio_hdf5_inquire(file_name);
|
||||
trexio_exit_code rc_hdf5 = trexio_hdf5_inquire(file_name);
|
||||
if (rc_hdf5 == TREXIO_SUCCESS) {
|
||||
back_end_local = TREXIO_HDF5;
|
||||
} else {
|
||||
/* File is neither a directory nor an HDF5 file -> return an error */
|
||||
back_end_local = -1;
|
||||
if (rc_open != NULL) *rc_open = TREXIO_FILE_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ trexio_hdf5_write_$group_dset$ (trexio_t* const file,
|
||||
trexio_hdf5_t* f = (trexio_hdf5_t*) file;
|
||||
|
||||
hid_t index_dtype;
|
||||
void* index_p = NULL;
|
||||
const void* index_p;
|
||||
uint64_t size_ranked = (uint64_t) size * $group_dset_rank$;
|
||||
/* Determine the optimal type for storing indices depending on the size_max (usually mo_num or ao_num) */
|
||||
if (size_max < UINT8_MAX) {
|
||||
@ -459,7 +459,7 @@ trexio_hdf5_write_$group_dset$ (trexio_t* const file,
|
||||
index_p = index;
|
||||
index_dtype = H5T_NATIVE_UINT16;
|
||||
} else {
|
||||
index_p = (int32_t*) index_sparse;
|
||||
index_p = (const int32_t*) index_sparse;
|
||||
index_dtype = H5T_NATIVE_INT32;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ set(Tests_text
|
||||
io_str_text
|
||||
delete_group_text
|
||||
overwrite_all_text
|
||||
pre_close.c
|
||||
pre_close
|
||||
)
|
||||
|
||||
if(ENABLE_HDF5)
|
||||
@ -29,7 +29,6 @@ if(ENABLE_HDF5)
|
||||
io_str_hdf5
|
||||
delete_group_hdf5
|
||||
overwrite_all_hdf5
|
||||
pre_close
|
||||
)
|
||||
|
||||
# Set ${Tests} variable to the complete list of tests.
|
||||
|
Loading…
Reference in New Issue
Block a user