Skip to content

Commit

Permalink
Closes Bears-R-Us#3425: Improve Msg Function Registration for Module …
Browse files Browse the repository at this point in the history
…Tracking (Bears-R-Us#3424)

* Only register Msg functions with a module name
With the `saveUsedModules` flag, we only want to be tracking
modules that can actually be included/excluded to avoid duplicating
function headers for those functions that are always included by
default.

By explicitly checking if the module name includes "Msg", we can
skip this for cases like `GenSymIO` which are always included and
was causing build issues with the module generation script.

* Add registration without module name
  • Loading branch information
bmcdonald3 authored Jul 10, 2024
1 parent 277e226 commit 5be20f0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/parseServerConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ def getModuleFiles(mods, src_dir):

def ndStamp(nd_msg_handler_name, cmd_prefix, d, mod_name):
msg_proc_name = f"arkouda_nd_stamp_{nd_msg_handler_name}{d}D"
return \
f"\nproc {msg_proc_name}(cmd: string, msgArgs: borrowed MessageArgs, st: borrowed SymTab): MsgTuple throws\n" + \
f" do return {nd_msg_handler_name}(cmd, msgArgs, st, {d});\n" + \
f"registerFunction(\"{cmd_prefix}{d}D\", {msg_proc_name}, \"{mod_name}\");\n"
ret_string = f"\nproc {msg_proc_name}(cmd: string, msgArgs: borrowed MessageArgs, st: borrowed SymTab): MsgTuple throws\n" + \
f" do return {nd_msg_handler_name}(cmd, msgArgs, st, {d});\n"
if "Msg" in mod_name:
ret_string += f"registerFunction(\"{cmd_prefix}{d}D\", {msg_proc_name}, \"{mod_name}\");\n"
else:
ret_string += f"registerFunction(\"{cmd_prefix}{d}D\", {msg_proc_name});\n"
return ret_string


def ndStampMultiRank(nd_msg_handler_name, cmd_prefix, d1, d2, mod_name):
Expand Down

0 comments on commit 5be20f0

Please sign in to comment.