Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external group (generic I/O of arrays beyond the trexio format) #117

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

q-posev
Copy link
Member

@q-posev q-posev commented May 8, 2023

This PR will partially address the following:

I have implemented trexio_[write|read|has]_external_[int32|int64|float32|float64]_array family of functions in C and Python APIs. Fortran front end is not supported yet.

Only TREXIO_HDF5 back end is supported, attempt to use TREXIO_TEXT should raise TREXIO_NOT_SUPPORTED error.

The list of arguments is different from conventional TREXIO functions due to the absense of explicit dimensions and data types as in TREXIO format.

One important difference is that we have to provide name string to all aforementioned functions, which defines the name of the array in the TREXIO file. This argument is key to accessing the data correctly.

@scemama
Copy link
Member

scemama commented May 12, 2023

Nice!
Can you please add a section at the end of the trex.org file for documentation? It would be nice to briefly explain that this feature exists, and give a few examples.

Also, it would be interesting to have a function that returns the number of external arrays, and an array with the names of the arrays.

For the text back-end, I think we can create an "external" text file that contains the external arrays.
I would prefer to merge when the text backend also has this feature, otherwise I am afraid that these two will diverge. If you want, can help with that.

@q-posev
Copy link
Member Author

q-posev commented May 12, 2023

Can you please add a section at the end of the trex.org file for documentation? It would be nice to briefly explain that this feature exists, and give a few examples.

OK, will do. I think examples should go in the front end org file since they involve API calls. What do you think?

Also, it would be interesting to have a function that returns the number of external arrays, and an array with the names of the arrays.

Maybe. It might be useful to have a function, which returns dimensions and ranks of external arrays in order to allocate the memory accordingly.

For the text back-end, I think we can create an "external" text file that contains the external arrays.

As we discussed in #112 , it's easier to have one text file per external array, rather than one external file with all arrays. I will not have time for that in the nearest future though. The PR is not urgent, still experimental.

@q-posev q-posev marked this pull request as draft June 21, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants