ecmwf-ifs / field_api

Apache License 2.0
3 stars 8 forks source link

Add proper constructor for array owner #43

Closed pmarguinaud closed 4 months ago

pmarguinaud commented 4 months ago

Array owner constructor is not available. This PR tries to fix this.

I have not been able to set up a proper GENERIC INIT interface for both owner/wrapper. Instead, I rely on the presence of the P argument. It would be good, if someone could look into this.

awnawab commented 4 months ago

Hi @pmarguinaud. I filed a PR against your branch to add a generic constructor: https://github.com/pmarguinaud/field_api/pull/2. Either solution is fine with me, you can decide which one to merge.

pmarguinaud commented 4 months ago

Hello Ahmad,

Thank you for looking into this.

I have also looked at this and found that making PERSISTENT the second argument of the owner constructor solves the issue (both Intel & NVHPC).

Do you think it is okay ?

awnawab commented 4 months ago

That confirms that it is indeed a bug. I have tested your fix on GNU 13 and it also solves the problem there 👍

pmarguinaud commented 4 months ago

Thank you Ahmad