Nohup command doesn't stop an Optistruct Job from receiving SIGHUP

Fadi Chamoun_21158
Fadi Chamoun_21158 Altair Community Member
edited December 2023 in Community Q&A

Hello, I have access to a linux compute server that I connect to using ssh.

When I launch an optistruct job, I want to be able to exit the command line or turn off the laptop without killing the job on the server.

I tried "nohup" with "&" but the job still ends up receiving SIGHUP.

Also tried running it as usual then pausing it with Ctrl+Z then putting it in the background with "bg" then disowning it with "disown -h". And it still ends up stopping (eventhough with this method it just stops without printing SIGHUP in the out file).

 

Any ideas on how to solve this ? Thank you

Answers

  • loistf
    loistf Altair Community Member
    edited November 2023

    I have used nohup via putty succesfully in the past. Not sure what might be happening in your case. Maybe something in your ssh client settings? Not sure that with that information it is possible to get to the bottom of it, unless you are able to provide details on how to reproduce, sorry. 

  • Fadi Chamoun_21158
    Fadi Chamoun_21158 Altair Community Member
    edited November 2023
    loistf said:

    I have used nohup via putty succesfully in the past. Not sure what might be happening in your case. Maybe something in your ssh client settings? Not sure that with that information it is possible to get to the bottom of it, unless you are able to provide details on how to reproduce, sorry. 

    After some investigations, i noticed that multiple processes are created, and only one is protected from SIGHUP.

    image

    Haven't figured out yet how to protect the others yet.

  • loistf
    loistf Altair Community Member
    edited November 2023

    After some investigations, i noticed that multiple processes are created, and only one is protected from SIGHUP.

    image

    Haven't figured out yet how to protect the others yet.

    what is the command that you execute, if i may ask?
  • Fadi Chamoun_21158
    Fadi Chamoun_21158 Altair Community Member
    edited December 2023
    loistf said:

    what is the command that you execute, if i may ask?

    yes it's:

    nohup /data/environnement/altair/2022/altair/scripts/optistruct -core in -nt 16 Model.fem &

  • loistf
    loistf Altair Community Member
    edited December 2023

    yes it's:

    nohup /data/environnement/altair/2022/altair/scripts/optistruct -core in -nt 16 Model.fem &

    Seems similar to what I remember using in the past. There is something said about child processes in this link, but I am not sure how it applies to your case. 

    linux - What's the difference between nohup and ampersand - Stack Overflow

    If it is only for this it might be an overkill, but you might be interested in PBS (commercial or open source)

    Industry-leading Workload Manager and Job Scheduler for HPC | Altair PBS Professional

    OpenPBS Open Source Project

    What do you see in your OptiStruct out file?