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

Fortran routine for update #421

Closed
orso82 opened this issue Jun 18, 2019 · 8 comments
Closed

Fortran routine for update #421

orso82 opened this issue Jun 18, 2019 · 8 comments
Labels
Milestone

Comments

@orso82
Copy link

orso82 commented Jun 18, 2019

I was able to make some progress writing a small test program that uses the fortran conduit API. However, I could not find anything for updating a node with the data from another node.

Am I missing something, or is it just that the fortran API is lagging behind the C++?
https://llnl-conduit.readthedocs.io/en/latest/tutorial_cpp_update.html

Following is a minimal example that reproduces the problem:

program fortran_test
  use conduit_obj
  type(node) n,n2
  n = conduit_node_obj_create()
  n2 = conduit_node_obj_create()
  n2%update(n) !<-- fails
end program fortran_test
@cyrush
Copy link
Member

cyrush commented Jun 18, 2019

@orso82, yes - it does lag -- I'd be happy to add this and to take a further pass at more support if there are other things you want to try.

@orso82
Copy link
Author

orso82 commented Jun 18, 2019

Thank you @cyrush that would be great! 👍 At this point I am really in an exploratory phase, but this was a bit of a stopper at this point, and your offer would help me testing the library further.

I guess the FORTRAN interface is not yet actively used in your any of your LLNL projects?

It is not necessary at this point, but have you considered writing up something that automatically generates the FORTRAN interface starting from the C++ one? Just a thought!

@cyrush
Copy link
Member

cyrush commented Jun 18, 2019

@orso82 we have focused on a subset of conduit features that allow us to get data in from simulation codes -- particularly in the context of the https://github.com/alpine-DAV/ascent project. So we are exercising it but only a small subset.

We do actually have a good tool for C++ to fortran bindings: https://github.com/llnl/shroud

The conduit fortran wrappers pre-date this tool, perhaps I am a bit crazy to continue to hand wrap, but there is a finite (but maybe large) surface area to cover :-).

I'll take a pass later this week to expose more to fortran.

@orso82
Copy link
Author

orso82 commented Jun 18, 2019

Great! Thank you! I look forward for the updates!

@cyrush
Copy link
Member

cyrush commented Jun 21, 2019

@orso82 I made it pretty far with exposing more functions, but I still want to write several more tests.
I expect to have a PR merged sometime next week.

@orso82
Copy link
Author

orso82 commented Jun 24, 2019

Thank you @cyrush ! I appreciate you taking the time. The PR will also be a good example for me to follow, in case in the future I find myself needing to expose more functions ;)

@cyrush
Copy link
Member

cyrush commented Jun 25, 2019

@orso82, I just merged #426 into conduit master.

It adds several methods to the fortran api (both the non-obj and obj cases)
The set of update methods (update, update_external, etc) are in there.

If you get a chance to try, let me know if you hit any issues.

@cyrush cyrush added the feature label Jun 25, 2019
@cyrush cyrush added this to the 0.5.0 milestone Jun 25, 2019
@cyrush cyrush closed this as completed Jun 25, 2019
@orso82
Copy link
Author

orso82 commented Jun 25, 2019

Great! Thank you @cyrush 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants