signal for exit of a process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • antoniosk
    New Member
    • Apr 2007
    • 9

    signal for exit of a process

    I have a program which runs a simulation for my PhD. When it ends, I want to change some parameters and run it again.

    How can I create a program which will determine that a simulation has ended and will run a new one?

    which signal is that? I am running my simulations in bash shell.


    thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by antoniosk
    I have a program which runs a simulation for my PhD. When it ends, I want to change some parameters and run it again.

    How can I create a program which will determine that a simulation has ended and will run a new one?

    which signal is that? I am running my simulations in bash shell.


    thanks
    Can a next run start the moment a previous run has terminated? Or do you
    want to play with some parameter values (manually) before you start a next run?

    kind regards,

    Jos

    Comment

    • antoniosk
      New Member
      • Apr 2007
      • 9

      #3
      currently I change manually my parameters. However, once I find how I can make the program aware that a simulation has ended I will arrange that these parameters change automatically.

      I think that using unix signals is the best way

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by antoniosk
        currently I change manually my parameters. However, once I find how I can make the program aware that a simulation has ended I will arrange that these parameters change automatically.

        I think that using unix signals is the best way
        Does your process/program knows that another iteration needs to be run?
        If so you could tell your shell so by exit(<non-zero-value>) indicating that
        another run is needed.

        kind regards,

        Jos

        Comment

        • antoniosk
          New Member
          • Apr 2007
          • 9

          #5
          I think that I haven't posed the nature of my problem well....


          The situation is that I need to make say 11 consecutive simulations. However, all those have to run separately... This is why I have to be looking in the processes to see when my simulation has ended.

          If I knew when they would end, then I would be able tell my program to run those simulations sequentially without my presence in front of the computer needed...

          I really appreciate your interest.

          Comment

          • Ganon11
            Recognized Expert Specialist
            • Oct 2006
            • 3651

            #6
            Could you possibly have a 'container' program? It can call the program 11 times, each time submitting different vaues for your settings/parameters, to get the 11 different simulations. Each time it calls the other program, it should wait until it finishes before moving onto the next statement...I think...

            Comment

            • weaknessforcats
              Recognized Expert Expert
              • Mar 2007
              • 9214

              #7
              What controls the running of the 11 simulations?? A script file??

              Perhaps you just use a .bat file and start your program 11 times.

              Comment

              • antoniosk
                New Member
                • Apr 2007
                • 9

                #8
                it should wait until it finishes before moving onto the next statement...I think...


                this is the essence of my question... How can I make my program wait until the first simulation is over?

                Comment

                • JosAH
                  Recognized Expert MVP
                  • Mar 2007
                  • 11453

                  #9
                  Originally posted by antoniosk
                  I think that I haven't posed the nature of my problem well....


                  The situation is that I need to make say 11 consecutive simulations. However, all those have to run separately... This is why I have to be looking in the processes to see when my simulation has ended.

                  If I knew when they would end, then I would be able tell my program to run those simulations sequentially without my presence in front of the computer needed...

                  I really appreciate your interest.
                  From what I understand from your description now is that you want/need to
                  run a couple of those simulations/processes parallel, right? Can a simulation
                  start when another one hasn't finished yet? Do some simulation(s) need to be
                  run before other simulation(s) can start? If so, those nasty "PERT" graphs
                  come to mind, but I'm afraid I'm overcomplicatin g matters a bit again.

                  Care to elaborate a bit more?

                  kind regards,

                  Jos

                  Comment

                  • antoniosk
                    New Member
                    • Apr 2007
                    • 9

                    #10
                    the problem....


                    I want to run the same program sequentially - that is restart it (with slight changes) when the previous run has ended....


                    How will I make my program aware of the fact that the previous run has ended?

                    Comment

                    Working...