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

feature request: app level scheduling #3108

Open
andre-merzky opened this issue Dec 15, 2023 · 1 comment
Open

feature request: app level scheduling #3108

andre-merzky opened this issue Dec 15, 2023 · 1 comment

Comments

@andre-merzky
Copy link
Member

This requirement comes from Muscle3 integration (see https://github.com/radical-cybertools/other_activities/issues/89). This requires:

  • exposing pilot resources via rp.Pilot instances (after PMGR_ACTIVE)
  • add rp.TaskDescriptions.slots attribute (bypassing the agent scheduler)
@andre-merzky andre-merzky self-assigned this Dec 15, 2023
@andre-merzky andre-merzky changed the title fetaure request: app level scheduling feature request: app level scheduling Dec 18, 2023
@andre-merzky
Copy link
Member Author

andre-merzky commented Jan 15, 2024

The following code is now possible (in branch feature/pilot_resources):

#!/usr/bin/env python3

import pprint
import radical.pilot as rp

if __name__ == '__main__':

    session = rp.Session()
    try:
        pmgr  = rp.PilotManager(session=session)
        tmgr  = rp.TaskManager(session=session)
        pdesc = rp.PilotDescription({'resource': 'local.localhost',
                                     'runtime' : 15,
                                     'cores'   : 256})
        pilot = pmgr.submit_pilots([pdesc])[0]
        pilot.wait(rp.PMGR_ACTIVE)

        nodes = pilot.nodes
        pprint.pprint(nodes)
        tmgr.add_pilots(pilot)

        td1 = rp.TaskDescription({'executable': 'hostname'})
        td2 = rp.TaskDescription({
            'executable': 'hostname',
            'ranks'     : 2,
            'slots'     : [rp.Slot.from_node(nodes[0], core_ids=[1,3]),
                           rp.Slot.from_node(nodes[1], core_ids=[2,4])]
        })

        tmgr.submit_tasks([td1, td2])
        tmgr.wait_tasks()

    finally:
      session.close(download=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant