CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Post-Processing

I want OpenFOAM to email me when it's done, is this too much to ask?!?

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

Like Tree12Likes

LinkBack Thread Tools Display Modes
Old   September 7, 2013, 08:16
Senior Member
immortality's Avatar
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 18
immortality is on a distinguished road
its the result of "mail" command.
ehsan@Ehsan-com:~$ mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/ehsan": 6 messages 6 new
>N  1 MAILER-DAEMON@gma  Wed Sep  4 15:50   73/2146  Undelivered Mail Returned t
 N  2 MAILER-DAEMON@gma  Thu Sep  5 01:39  127/4777  Undelivered Mail Returned t
 N  3 MAILER-DAEMON@gma  Thu Sep  5 01:40  193/5449  Undelivered Mail Returned t
 N  4 MAILER-DAEMON@gma  Thu Sep  5 01:44  193/8041  Undelivered Mail Returned t
 N  5 MAILER-DAEMON@gma  Sat Sep  7 15:44   67/2088  Undelivered Mail Returned t
 N  6 MAILER-DAEMON@gma  Sat Sep  7 16:32   67/2069  Undelivered Mail Returned t
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   March 19, 2014, 06:37
New Member
Karla Mora Ulate
Join Date: Jan 2014
Posts: 5
Rep Power: 3
karlamora is on a distinguished road
Originally Posted by wyldckat View Post
Hi Jose,

Well, it all depends on how you ran the case in the first place... if you used an Allrun script, identical to OpenFOAM's tutorials, then you can try adding this to the end of the script:
echo "Sending separate email with the simulation status..."
    echo "Case in question:"
    head -n 20 log.$application
    echo "Last 100 lines of the output for the solver $application:"
    tail -n 100 log.$application
  ) | mail -s "Summary Report from the case $PWD" yourname@email.address
The mail application can be one of several. In my case, I use the package "bsd-mailx" on Ubuntu.

The "$application" variable is sometimes defined in Allrun scripts... for example in "tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun":

Best regards,
Hi Bruno,

I am not using the Allrun option because the university server doesn't allow it. What other option do I can use to send me an email? Is there another script where I can add this command?


karlamora is offline   Reply With Quote

Old   March 23, 2014, 16:46
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,964
Blog Entries: 34
Rep Power: 92
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Karla,

You should ask about this to the system administrator for the server you're using, because the job scheduler that the server uses should have an option to send you an email when the simulation is complete.

If not, it's possible that the server doesn't even allow sending emails from the master node. But if it does, it's a matter of unravelling the code on the example you've quoted, into something like this:
mpirun -np $NPROCS mySolver -parallel > log.mySolver 2>&1

mail -s "Summary Report from the case $PWD" yourname@email.address < log.mySolver
Best regards,
wyldckat is offline   Reply With Quote


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
gmsh 2.6.0 conversion to OpenFoam 160 rosswin Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 March 5, 2013 08:34
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x wyldckat OpenFOAM Bugs 18 October 21, 2010 05:51
OpenFOAM Message Board Email notification stopped working mbeaudoin OpenFOAM Bugs 3 January 8, 2009 23:08
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 13:14
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50

All times are GMT -4. The time now is 03:27.