CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Email notification after finished solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 2, 2009, 05:54
Default Do you think it's possible to
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Do you think it's possible to get an email notification after a solver finished running?

I'm using OpenFOAM on an university machine I'm accessing with Putty.
Getting a notification would be very nice, so I don't have to check all the time if the solver is still running.

I tried to use some command-line tools for sending emails, but didn't manage to use one properly, not to mention including them in the code of the solver.

Thanks so far.
Have an nice day.
S.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 2, 2009, 06:04
Default This is normally the task of t
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
This is normally the task of the queuing system (ask the sysadmin). If you running without a queuing system, you could try calling /bin/mail or equivalent via the systemCall functionObject. If that doesn't do it, you could just hack in the equivalent system call after the final solver loop.
In any case, you'll need to get your mailer script working first.
olesen is offline   Reply With Quote

Old   March 2, 2009, 06:14
Default Well, I don't understand half
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Well, I don't understand half of what I pretend to.
Getting the mailer script (this is the tool responsible for sending the mail?) to work properly is probably platform dependet?
Or is there a standard-solution for such a problem?

BTW. What is a queuing system?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 2, 2009, 06:32
Default > Mailing: The backend for
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
> Mailing:

The backend for mailing is normally sendmail or postfix on Unix-type machines, but I wouldn't generally advise descending to that level. Instead it is easier to use /bin/mail, /usr/bin/mail, /usr/ucb/mail - the exact path depends on which OS you are using. On some systems you might need to use Mail or mailx.
Read the appropriate manpage and you'll see that they all use -s "some subject" followed by the mail address. The body of the message is taken from stdin. ASSUMING the mailer is correctly set up on the machine, you'll either get the email directly or you can set the email address in the ~/.forward file.

You can simply wrap the call to the appropriate mailer within a shell script (eg, foamMail might be a nice name) and generate your message on-thy-fly (eg, report the time/date and PWD of the job that finished) any pipe it thru to the mailer.

> Queuing system:
eg, GridEngine, PBS, OpenPBS, LSF, LoadLeveller.
olesen is offline   Reply With Quote

Old   April 6, 2009, 18:35
Default python script to send mail
  #5
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
I'm not sure if you resolved this, but I was able to find a really simple python script to send mail. I think this would be easy. here is the python script.
Attached Files
File Type: zip errorMail.py.zip (458 Bytes, 13 views)
chegdan is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Message Board Email notification stopped working mbeaudoin OpenFOAM Bugs 3 January 8, 2009 23:08
Marketing email sent out today Jonas Larsson CFD-Wiki 0 May 21, 2007 08:00
cfxsolve-Monitor Finished Run changes restart file Karsten CFX 6 May 16, 2006 10:31
Curtis Marsh Email? steve FLUENT 0 July 29, 2005 04:45
AJAY YOU HAVE PROBLEM IN YOUR EMAIL STK FLUENT 1 March 26, 2004 15:00


All times are GMT -4. The time now is 23:51.