Giter Club home page Giter Club logo

Comments (2)

jackbaker1001 avatar jackbaker1001 commented on May 23, 2024 1

@wjcunningham7 I think the issue we were discussing yesterday is either related to or is this one.

The plan is:

(1) two new constructor inputs for keepalive_interval and reconnect_retries (different from retries which are triggered when a task fails).

(2) Add reconnect attempts in the polling loop.

Looking at lines 511-535 in ~/covalent_slurm_plugin/slurm.py we have

 async def _poll_slurm(self, job_id: int, conn: asyncssh.SSHClientConnection) -> None:
        """Poll a Slurm job until completion.

        Args:
            job_id: Slurm job ID.
            conn: SSH connection object.

        Returns:
            None
        """

        # Poll status every `poll_freq` seconds
        status = await self.get_status({"job_id": str(job_id)}, conn)

        while (
            "PENDING" in status
            or "RUNNING" in status
            or "COMPLETING" in status
            or "CONFIGURING" in status
        ):
            await asyncio.sleep(self.poll_freq)
            status = await self.get_status({"job_id": str(job_id)}, conn)

        if "COMPLETED" not in status:
            raise RuntimeError("Job failed with status:\n", status)

I assume there is something we can take from conn to check if it has gone stale in some way. This should be checked every keepalive_interval for a maximum of reconnect_retries times. If it has gone stale, we just re-run lines 201-333: the method:

async def _client_connect(self) -> asyncssh.SSHClientConnection:`

from covalent-slurm-plugin.

jackbaker1001 avatar jackbaker1001 commented on May 23, 2024

Further to the above, the thing to track is the output of conn.is_closing()

from covalent-slurm-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.