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

capgen host model DDT problem #589

Open
gold2718 opened this issue Sep 16, 2024 · 2 comments
Open

capgen host model DDT problem #589

gold2718 opened this issue Sep 16, 2024 · 2 comments
Assignees
Labels

Comments

@gold2718
Copy link
Collaborator

Description

The host CCPP metadata table type should be able to accept DDT items.
However, the error variables are somewhat special and they are not handled correctly when inside a DDT.

Steps to Reproduce

  1. Create a DDT
  2. Add the ccpp_error_message and/or ccpp_error_code variables to the DDT
  3. Add a variable of this DDT type to the host table type = host metadata table
  4. Run capgen

Output

Please include any relevant log files, screenshots or other output here.

-- Traceback (most recent call last):
  File "/home/goldy/Projects/CAMDEN/ccpp_framework/scripts/ccpp_capgen.py", line 777, in <module>
    _main_func()
  File "/home/goldy/Projects/CAMDEN/ccpp_framework/scripts/ccpp_capgen.py", line 770, in _main_func
    _ = capgen(framework_env)
  File "/home/goldy/Projects/CAMDEN/ccpp_framework/scripts/ccpp_capgen.py", line 730, in capgen
    host_files = [write_host_cap(host_model, ccpp_api, cap_module,
  File "/home/goldy/Projects/CAMDEN/ccpp_framework/scripts/host_cap.py", line 679, in write_host_cap
    ConstituentVarDict.write_host_routines(cap, host_model, reg_name, init_name,
  File "/home/goldy/Projects/CAMDEN/ccpp_framework/scripts/constituents.py", line 494, in write_host_routines
    evar.write_def(cap, 2, host, dummy=True, add_intent="out")
TypeError: VarDDT.write_def() got an unexpected keyword argument 'add_intent'
@gold2718 gold2718 added the bug label Sep 16, 2024
@gold2718 gold2718 added this to the capgen unification milestone Sep 16, 2024
@gold2718 gold2718 self-assigned this Sep 16, 2024
@dustinswales
Copy link
Collaborator

@gold2718 I ran into a possibly related issue wrt to the ccpp error handling variables.
When porting the framework ccpp_t type to the SCM, I had to remove the ccpp error handling variables from this DDT and provide them to the host as flat variables.
Also, as the caps are written now, it is mandatory for you to supply ccpp error handling variables (If you don't the caps will try to initialize them, but they aren't declared).

@gold2718
Copy link
Collaborator Author

@dustinswales, this is exactly the issue. I am working on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do
Development

No branches or pull requests

2 participants