Skip to content

--saveUsedModules should only save modules that are not compiled by default #4836

Closed

Description

@e-kayrakli

Otherwise the same module is included by the registration framework twice causing errors (#4835).

Even if that issue is resolved, I think it'd be good for that flag to not save modules that are deemed "standard".

Activity

  1. 1RyanK commented on Sep 17, 2025

    @1RyanK
    Contributor

    From here:

    Using the Modular Build System

    This is the single biggest way to save on compilation time, but is a bit more involved than the others. For reference, a full build on my machine takes ~500 seconds, but with minimal modules, it only takes ~30 seconds.

    If you are looking to speed up build times, this section contains information for using the modular build system. This system can significantly decrease compilation times by reducing the number of features built into the server, focusing on just the crucial ones. In general, developers should always be using the modular build system when working on server-side development.

    If you already have a full-server build:

    1. ./arkouda_server --saveUsedModules - run server with used module tracking
      ...

    This seems to suggest that the point of --saveUsedModules is to create a list of minimal modules to compile to save on compile time while debugging. I'm inclined to find a fix to #4835 that doesn't alter the behavior of --saveUsedModules in the way you're suggesting.

  2. self-assigned this
    on Sep 17, 2025
  3. e-kayrakli commented on Sep 17, 2025

    @e-kayrakli
    ContributorAuthor

    I am not following how the documentation implies we shouldn't fix the issue. That being said, I should have provided a full-er reproducer to begin with. Here's the full reproducer of the issue:

    Launch the server:

    > ./arkouda_server --saveUsedModules
    

    Run something like the following:

    import arkouda as ak
    ak.connect(...)
    ak.array([1,2,3])
    ak.shutdown()
    

    will end up with UsedModules.cfg:

    GenSymIO
    

    (where the key is to use something in the Client API where the server function is implemented in a module that's not included in the default ServerModules.cfg, because it is seen as "default". Your attempt at here uses non-default modules. All the commands you run there are coming from modules that are listed in ServerModules.cfg.)

    combined with #4835, using UsedModules.cfg results in:

    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:37: In module 'Commands':
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:56: error: cannot capture routine with name 'ark_deepcopy_int_1' because it is overloaded
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:54: note: declared here
    /home/engin/code/arkouda-clones/arkouda/src/registry/Commands.chpl:120: note: declared here
    

    Both #4835 and #4836 are separate bugs in my view. This one concerns about --saveUsedModules generating list of modules that may look like different than what the registration mechanism expects. I think this issue needs to be reopened.

  4. e-kayrakli commented on Sep 17, 2025

    @e-kayrakli
    ContributorAuthor

    I think the duo of bugs probably implies that there should be ServerModules.cfg and the like should be separated into two where one lists default modules whereas the others list non-default ones.

  5. reopened this on Sep 17, 2025
  6. 1RyanK commented on Sep 17, 2025

    @1RyanK
    Contributor

    Sorry, I think I misunderstood. So ideally, this should be a subset of the things currently in ServerModules.cfg?

  7. added a commit that references this issue on Sep 17, 2025
    2ca597c
  8. e-kayrakli commented on Sep 17, 2025

    @e-kayrakli
    ContributorAuthor

    That's correct.

  9. added 3 commits that reference this issue on Sep 18, 2025
    9ba307d
    e2eb416
    0b97017
  10. added a commit that references this issue on Sep 22, 2025
    46524b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions