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

Email notification after finished solver

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

Reply
 
LinkBack Thread Tools Search this Thread 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: 20
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: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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: 20
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: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
> 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, 19:35
Default python script to send mail
  #5
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan 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, 21 views)
chegdan is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 09:00
cfxsolve-Monitor Finished Run changes restart file Karsten CFX 6 May 16, 2006 11:31
Curtis Marsh Email? steve FLUENT 0 July 29, 2005 05: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 06:49.