i am trying to add numbers with decimal place and I am prompted with an error.
this expr command works
:add=`expr 1 + 1`
:echo $add
:2
but when i am trying to add
:addThis=`expr 1.1 + 1`
:expr: An integer value was expected.
is there a way to add numbers with decimal place in UNIX? (4 Replies)
If I cat a file
And want to go to the first instance of a particular value - what command would I use?
And then from that point where I jumped to search for another value - but only search from that point forward not before the file?
Thanks~ (2 Replies)
Hi Guys,
I am unable to return a decimal value from a function to the main script.
I am getting the correct value in the function but when it is returning to the main script using "return" it is coming as 0. Below is my code.
read VALUE_V fun_FATHERID fun_SONID fun_TOPID fun_RTYPE <... (2 Replies)
Hi All,
I have problem in the middle of implementing to users, whereby the complaint is all about the decimal place which is too long. I need two decimal places only, but the outcome from command is always fixed to 6.
See the sample :
before:
Sort Total
Site Sort SortName Parts ... (3 Replies)
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Dear all,
I have a data test.txt as below.
X22.30799720_T cg03868770 -0.5645412582127 2.4084685750406e-175
X22.30781182_A cg03868770 -0.5620426397492 3.5818034129169e-172
X22.30780724_C cg03868770 -0.5616890165605 2.9765569717858e-168
what I want is:
X22.30799720_T cg03868770... (3 Replies)
Hi,
I have one input file which is delimited by pipe. I want to put decimal points in this input file at particular position in particular column and also get the negative sign (if any) at start of that column.
$ cat Input_file.txt
11|10102693|1|20151202|10263204|20151127|N|0001... (7 Replies)
Dear all,
I have a file call test.txt which has 2000 columns, 1000 rows. If I want to trim all the columns to 3 decimal places, how can I do it? I know how to use awk prinf to trim specic columns. But I don't know how to trim all the columns. Thank you.
data sample:
0.976004565 9.34567845... (6 Replies)
Input file:
USA 20.5683
UK 3.54221
Japan 2.54001
China 2.50897
Germany 2.05816
.
.
Desired output file:
USA 20.57
UK 3.54
Japan 2.54
China 2.51
Germany 2.06
.
. (2 Replies)
Hi I was hoping someone could help me with a sed script I am trying to write? I am on a Mac running ElCapitan
I have some text that I have converted from a pdf that I want to format into an xml file.
In the file I have managed to delete all the text I do not need. The text I have left is... (8 Replies)
Discussion started by: Paul Walker
8 Replies
LEARN ABOUT DEBIAN
slurm::stepctx
Slurm::Stepctx(3pm) User Contributed Perl Documentation Slurm::Stepctx(3pm)NAME
Slurm::Stepctx - Step launching functions in libslurm
SYNOPSIS
use Slurm;
$slurm = Slurm::new();
$params = {job_id => 1234, ...};
$ctx = $slurm->step_ctx_create($params);
$rc = $ctx->launch({...}, {task_start => sub {...},
task_finish => sub {...} });
DESCRIPTION
The Slurm::Stepctx class is a wrapper of the job step context and step launching functions in libslurm. This package is loaded and
bootstraped with package Slurm.
METHODS
STEP CONTEXT CREATION FUNCTIONS
Please see "SLURM TASK SPAWNING FUNCTIONS" in Slurm for step context creation functions.
STEP CONTEXT MANIPULATION FUNCTIONS
$rc = $ctx->get($ctx_key, ...);
Get parameters from a job step context.
o INPUT $ctx_key: type of the parameter to get. Supported key and the corresponding result data are:
o $rc = $ctx->get(SLURM_STEP_CTX_STEPID, $stepid);
Get the created job step id. $stepid will be set to the step id number.
o $rc = $ctx->get(SLURM_STEP_CTX_TASKS, $tasks);
Get array of task count on each node. $tasks will be set to an array reference.
o $rc = $ctx->get(SLURM_STEP_CTX_TID, $nodeid, $tids);
Get array of task IDs for specified node. $nodeid specifies index of the node. $tids will be set to an array reference.
o $rc = $ctx->get(SLURM_STEP_CTX_RESP, $resp);
TODO: this is not exported. Get job step create response message.
o $rc = $ctx->get(SLURM_STEP_CTX_CRED, $cred);
Get credential of the created job step. $cred will be an opaque object blessed to "Slurm::slurm_cred_t".
o $rc = $ctx->get(SLURM_STEP_CTX_SWITCH_JOB, $switch_info);
Get switch plugin specific info of the step. $switch_info will be an opaque object blessed to "Slurm::switch_jobinfo_t".
o $rc = $ctx->get(SLURM_STEP_CTX_NUM_HOSTS, $num);
Get number of nodes allocated to the job step.
o $rc = $ctx->get(SLURM_STEP_CTX_HOST, $nodeid, $nodename);
Get node name allocated to the job step. $nodeid specifies index of the node.
o $rc = $ctx->get(SLURM_STEP_CTX_JOBID, $jobid);
Get job ID of the job step.
o $rc = $ctx->get(SLURM_STEP_CTX_USER_MANAGED_SOCKETS, $numtasks, $sockets);
Get user managed I/O sockets. TODO: describe the parameters.
o RET: error code.
$rc = $ctx->daemon_per_node_hack();
Hack the step context to run a single process per node, regardless of the settings selected at Slurm::Stepctx::create() time.
o RET: error code.
STEP TASK LAUNCHING FUNCTIONS
$rc = $ctx->launch($params, $callbacks);
Launch a parallel job step.
o IN $params: parameters of task launching, with structure of "slurm_step_launch_params_t".
o IN $callbacks: callback functions, with structure of "slurm_step_launch_callbacks_t". NOTE: the callback functions will be called in a
thread different from the thread calling the "launch()" function.
o RET: error code.
$rc = $ctx->launch_wait_start();
Block until all tasks have started.
o RET: error code.
$ctx->launch_wait_finish();
Block until all tasks have finished (or failed to start altogether).
$ctx->launch_abort();
Abort an in-progress launch, or terminate the fully launched job step. Can be called from a signal handler.
$ctx->launch_fwd_signal($signo);
Forward a signal to all those nodes with running tasks.
o IN $signo: signal number.
SEE ALSO
Slurm
AUTHOR
This library is created by Hongjia Cao, <hjcao(AT)nudt.edu.cn> and Danny Auble, <da(AT)llnl.gov>. It is distributed with SLURM.
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2012-03-16 Slurm::Stepctx(3pm)