-
Notifications
You must be signed in to change notification settings - Fork 427
Update package modules w.r.t. public uses of SysCTypes #14599
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
Update package modules w.r.t. public uses of SysCTypes #14599
Conversation
This PR updates the set of package modules whose interfaces require C types as defined in SysCTypes to include a `public use SysCTypes` so that clients of the modules will not have to use SysCTypes in order to make calls into them. Ideally, it would be nice if any Chapel-facing code in these modules did not require C types and that any conversion to C took place under the hood if need be, but that was a bigger change than I was able to take on here. And arguably, since they're just package modules, it's not so big of a deal. But we might consider making this an expectation for a given module before it transition to the standard modules directory.
@daviditen, @mppf, @ben-albrecht / @npadmana: If you have time today, would you give a quick look to the modules you've worked within in this PR to make sure the change seems appropriate? (and if not today, maybe after this merges?) |
Thinking about this PR more over lunch, I wanted to give @daviditen credit for creating an HDF5 module where (unless I missed something) all the Chapel-facing functions use Chapel types and the only C types are in the C_HDF5 module. |
This should've been part of chapel-lang#14599, but it escaped me there. Here, I'm making the `use` of SysCTypes public since the MPI package's interface includes C types. Better would be to rewrite the package to avoid the need for C types from the Chapel user and convert under the covers before calling the external C routines, but that was more than I was able to take on today.
Add public use SysCTypes to MPI module [trivial, not reviewed] This should've been part of #14599, but it escaped me there. Here, I'm making the `use` of SysCTypes public since the MPI package's interface includes C types. Better would be to rewrite the package to avoid the need for C types from the Chapel user and convert under the covers before calling the external C routines, but that was more than I was able to take on today.
This PR updates the set of package modules whose interfaces require
C types as defined in SysCTypes to include a
public use SysCTypes
so that clients of the modules will not have to use SysCTypes in
order to make calls into them.
Ideally, it would be nice if any Chapel-facing code in these modules
did not require C types and that any conversion to C took place under
the hood if need be, but that was a bigger change than I was able to take
on here. And arguably, since they're just package modules, it's not so big
of a deal. But we might consider making this an expectation for a given
module before it transition to the standard modules directory. The
HDF5 module was a nice example of this in that the top-level HDF5
module only needed a
private use SysCTypes;
while the C_HDF5sub-module needed a
public use SysCTypes;
for its clients.These updates were missed in PR #14524 since these modules are not
tested for vanilla linux64 runs. As a separate effort, I may look into
making some .noexec tests that run on linux64 to make sure we get to
the codegen stage for each of these libraries to catch such issues
ealier.