How to change how frequently SLURM updates the output file (stdout)? - stdout

I am using SLURM to dispatch jobs on a supercomputer. I have set the --output=log.out option to place the content from a job's stdout into a file (log.out). I'm finding that the file is updated every 30-60 minutes, making it difficult for me to check on the status of my jobs.
Any idea why it takes so long to update this file? Is there a way to change settings so that this file is updated more frequently?
Using SLURM 14.03.4-2

This may be related to buffering.
Have you tried disabling output buffering as suggested in here? I would recommend the stdbuf option:
stdbuf -o0 -e0 command
But can't be sure without more information, as I've never experienced a behavior like that. Which filesystem are you using?
Also if you are using srun to run your commands you can use the --unbuffered option which disables the output buffering.

Related

How to get bazel's rules_docker to use the repository cache

(This is an answer-your-own-question question: the answer is trivial but I did not find it easily: this is an attempt at fixing this)
If you depend on docker containers via container_pull with Bazel and rules_docker, it seems that you'll need to redownload the docker images relatively frequently. This becomes particularly problematic for images that are several hundreds of Mb's.
It looks like rules_docker ignores the --repository_cache configuration flag.
See below for the workaround.
rules_docker will only cache to the path specified by DOCKER_REPO_CACHE, if it is set.
See this documentation page for container_pull regarding the caveats:
NOTE: Set DOCKER_REPO_CACHE env variable to make the container puller cache downloaded layers at the directory specified as a value to this env variable. The caching feature hasn't been thoroughly tested and may be thread unsafe. If you notice flakiness after enabling it, see the warning below on how to workaround it.
NOTE: container_pull is suspected to have thread safety issues. To ensure multiple container_pull(s) don't execute concurrently, please use the bazel startup flag --loading_phase_threads=1 in your bazel invocation (typically by adding startup --loading_phase_threads=1 as a line in your .bazelrc)

How do I log to stdout or stderr from an Erlang common test suite?

I'm using common_test and just want to log values to stdout or stderr.
How????
I've tried:
ct:comment
ct:log
io:format
The state of the art seems to be manually combing through html files. But I'm on a server and I don't care about anything except my log line, I only want stdout. And I never want to look at an HTML file when writing tests, so advice on how to avoid that generally would be really helpful.
You should use ct:print or ct:pal (print and log), I'd recommend using the later, though.
(You can always use erlang:display, which is a low-level access to stdout)
Keep in mind that if you use Rebar3 with the default configuration and ct values. ct:print is only shown with --verbose, whereas, ct:pal is only shown if the test fails.

Extract information from a log file using powershell

Hi I am new to the language of powershell s i though about playing around with it. I am trying to extract information out of a log file (the file belongs to a program called event viewer). I need to use the information under Boot Duration.
Could somebody guide me a little bit?
It will be greatly appreciated
Thanks.
Logs are always the same. Not sure if you are going to monitor boot log of windows or linux or what.. but will try to answer.
If you edit your question and add info on the operating system and an example of relevant lines of boot log file I can provide you with some powershell code.
In general you should do:
Identify how to manually see boot time in log file. For example
probably it will have a starting boot time and a finished boot time.
Something similar to this.
[2012-06-08 12:00:04] starting boot
lot of log entries
[2012-06-08 12:00:34] finished boot
Once you know how to do it manually, you have to convince powershell to do it for you. You can use regular expressions to look for the pattern of dates. In my example look for lines that contains "starting boot" and then parse it to load date.
Here you have an useful link on powershell and regular expressions: http://www.regular-expressions.info/powershell.html

Nant: Process id of a service that is already running

Does anyone know how to get the PID of the process that a windows service is running in from Nant?
I am having file locking problems. I issue a stop command to the service and then try and delete the Windows service's files. However these are quite often locked by the process that the Windows service is running in. I want to find the PID so that I can wait for it to terminate before deleting.
Thanks
You might have to create a custom nant task to do this. However you might want to see about just adding maybe a delay like 1 min or something before you try to replace your files. Might be easier.

Spawn a process from Rhozet Carbon Coder

I am trying to figure out how to spawn a process / start an EXE from Rhozet Carbon Coder.
The manual mentions a task that sounds promising, "ExternalProcess", in section 5.8.2 but does not document this task.
Has anybody had success doing this, or knows where the ExternalProcess task is documented?
I have heard back from Rhozet that the ExternalProcess command mentioned tangentially in the manual is a typo, there isn't any task by that name.
Currently the only way to launch a process is to use the Notify task.
For example the folowing xml put in the Sources section of a configuration file launches notepad before running the job.
<Notify>
<PreTaskNotify>
<ProcessNotify_0 NotifyCommand="notepad.exe" />
</PostTaskNotify>
</Notify>

Resources