MSO4SC / cloudify-hpc-plugin

Plugin to allow Cloudify to deploy and orchestrate HPC resources
Apache License 2.0
8 stars 8 forks source link

send the output result by email #55

Open Trophime opened 6 years ago

Trophime commented 6 years ago

Hi, would it be possible to send the output by email at the end of the slurm script?

Trophime commented 6 years ago

here is a way to do it. Note it also contains a workaround for #49

email-output-patch.txt

emepetres commented 6 years ago

@Trophime nice!

Could you create a pull request instead of a patch file?

Also, did you try your code? What happens if the "mail" command is not available in the HPC or not configured (these errors should be handled)?

Trophime commented 6 years ago

I could create a PR but the logs of my branch contains a lot of meaningfull logs.. I don't know how to clean the git history... And I do not have much time to do it right now..

Next I've tried the code. It's working on cesga at least Right now it doesn't handle any error... My guess if that if mail is not available the slurm script will report an error... but as we are not able to see any "logs" in the portal, the user will have no clue why it fails...

The only check we can do is to perform something like:

isMail=$(which mail)
if [ $isMail != "" ]; then ... else ... fi

The good way to check should be like with the def of HPC resource (like what I suggest for #51)