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

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

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2013, 08:16
Default
  #21
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
its the result of "mail" command.
Code:
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, 05:37
Default
  #22
New Member
 
Karla Mora Ulate
Join Date: Jan 2014
Posts: 5
Rep Power: 12
karlamora is on a distinguished road
Quote:
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:
Code:
echo "Sending separate email with the simulation status..."
  (
    echo "Case in question:"
    head -n 20 log.$application
    echo
     echo
     echo
     echo
    echo "Last 100 lines of the output for the solver $application:"
     echo
    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": https://github.com/OpenFOAM/OpenFOAM...tionFan/Allrun

Best regards,
Bruno
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?

Regards

Karla
karlamora is offline   Reply With Quote

Old   March 23, 2014, 15:46
Default
  #23
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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:
Code:
mpirun -np $NPROCS mySolver -parallel > log.mySolver 2>&1

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

Reply


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
[Gmsh] gmsh 2.6.0 conversion to OpenFoam 160 rosswin OpenFOAM Meshing & Mesh Conversion 0 March 5, 2013 07: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 22: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 09:43.