email notification when iteration reaches to the 10th loop

Hi,

I am running a huge model on Linux with 15 iterations. I am not sure whether it would be feasible or not. But I would like to get an email notification when the iteration within the GAMS model moves to its 10th iteration. Thus I can speed up the two-step maximization problem on the cluster.

I know that the cluster has its notification system when the model is done, I have the email sent to me. But wondering how can I get the email in the middle of the modeling running but when the iteration hit 10th loop.

Thanks in advance.
Jia

Is this the 10th iteration in a solver or your own iteration inside the GAMS code? For the latter you can implement some logic inside your code (if(iter=10, …):wink: and use the “execute” command to call the mailer program on the system to email. If this is inside the solver, you could have a parallel script running (e.g. a Python script) that scans the GAMS log for the start of the 10th iteration and then calls the mailer program.

-Michael

Thanks Michael! I believe it is later one. I have the loop(iter,…) set up in my GAMS code. Can you elaborate more on how to use the execute command to call the mailer program on the system in GAMS?

Check the docs: execute (https://www.gams.com/35/docs/UG_GamsCall.html#UG_DollarExecute) or put_utility ‘exec’ (https://www.gams.com/35/docs/UG_Put.html#UG_Put_PutUtil_Ex2). How to call your mailer depends pure on your system. Check with your sysadmin.

-Michael

Thanks a lot for the suggestions.

Best,
Jia