qsub pbs doesn't show error and output log, even forcing the path - output

when I run code using qsub and pbs script, the log and error files are not shown.
I have also tried to add the path of error and log file, but without succes
#PBS -N example_job
#PBS -j oe
#PBS -q shortp
#PBS -V
##PBS -v BATCH_NUM_PROC_TOT=16
#PBS -l nodes=1:ppn=4
#PBS -e $HOME/error.txt
#PBS -o $HOME/otput.txt
Do you know how can I solve the problem ?
Thanks a lot

Related

Pass flags to the Sphinx runner?

So I've got the following project OpenFHE-development and when I run the build process, there are lots of warnings. However, most of these warnings are fine to ignore (we vet them before pushing to the main branch)
Specifically, is there a way to take
pth/python -m sphinx -T -E -b readthedocssinglehtmllocalmedia -d _build/doctrees -D language=en . _build/localmedia
and convert it to
pth/python -m sphinx -T -E -b readthedocssinglehtmllocalmedia -d _build/doctrees -D language=en . _build/localmedia 2> errors.txt
(pipe the stderr to a file instead of having it display on stdout)?
Does not seem to be possible at the moment. See git discussion

the system cannot find the file specified while importing json data in couchbase bucket.

I apologize if my question does not deserve a standard to ask here.
I have two files(products-data.json, orders-data.json) inside the following directory:
G:\kb\Couchbase\CB121
and I imported the products-data.json successfully using the following command:
G:\kb\Couchbase\CB121>cbimport.exe json -c couchbase://127.0.0.1 -u sattar -p 156271 -b sampleDB -f lines -d file://products-data.json -t 4 -g %type%::%variety%::#MONO_INCR#
But when I try to import orders-data.json in the same way as follows:
G:\kb\Couchbase\CB121>cbimport.exe json -c couchbase://127.0.0.1 -u sattar -p 156271 -b sampleDB -f lines -d file://orders-data.json​ -t 4 -g ​%type%::%order_id%
I am getting the following error:
2018-01-21T12:01:31.211+06:00 [31mERRO: open orders-data.json​: The system cannot find the file specified.[0m[2m -- jsondata.(*Parallelizer).Execute() at source.go:198[0m
2018-01-21T12:01:31.212+06:00 [31mERRO: open orders-data.json​: The system cannot find the file specified.[0m[2m -- plan.(*data).execute() at data.go:89[0m
Json import failed: open orders-data.json​: The system cannot find the file specified.
It kills my day. Any help is appreciated. Thanks.

How to pass arguments from cmd to tcl script of ModelSim

I run Modelsim in the cmd from a python program.
I use the following code which call a tcl script which run the modelsim:
os.system("vsim -c -do top_tb_simulate_reg.tcl " )
The tcl script contain the following:
vsim -voptargs="+acc" +UVM_TESTNAME=test_name +UVM_MAX_QUIT_COUNT=1 +UVM_VERBOSITY=UVM_LOW \
-t 1ps -L unisims_verm -L generic_baseblocks_v2_1_0 -L axi_infrastructure_v1_1_0 \
-L dds_compiler_v6_0_12 -lib xil_defaultlib xil_defaultlib.girobo2_tb_top \
xil_defaultlib.glbl
I want that the value of the +UVM_TESTNAME will be an argument which I passed from the cmd when I execute:
os.system("vsim -c -do top_tb_simulate_reg.tcl " )
How can I do it?
I tried the following with no succees:
Python script:
os.system("vsim -c -do top_tb_simulate_reg.tcl axi_rd_only_test" )
Simulation file (tcl script)
vsim -voptargs="+acc" +UVM_TESTNAME=$argv +UVM_MAX_QUIT_COUNT=1 +UVM_VERBOSITY=UVM_LOW \
-t 1ps -L unisims_verm -L generic_baseblocks_v2_1_0 -L axi_infrastructure_v1_1_0 \
-L dds_compiler_v6_0_12 -lib xil_defaultlib xil_defaultlib.girobo2_tb_top \
xil_defaultlib.glbl
I got the following error:
# ** Error: (vsim-3170) Could not find 'C:/raft/raftortwo/girobo2/ver/sim/work.axi_rd_only_test'.
The problem is that the vsim binary is doing its own processing of the arguments, and that is interfering. While yes, you can probably find a way around this by reading the vsim documentation, the simplest way around this is to pass values via environment variables. They're inherited by a process from its parent process, and are fine for passing most things. (The exception are security tokens, which should always be passed in files with correctly-set permissions, rather than either environment variables or command-line arguments.)
In your python code:
# Store the value in the *inheritable* environment
os.environ["MY_TEST_CASE"] = "axi_rd_only_test"
# Do the call; the environment gets passed over behind the scenes
os.system("vsim -c -do top_tb_simulate_reg.tcl " )
In your tcl code:
# Read out of the inherited environment
set name $env(MY_TEST_CASE)
# Use it! (Could do this as one line, but that's hard to read)
vsim -voptargs="+acc" +UVM_TESTNAME=$name +UVM_MAX_QUIT_COUNT=1 +UVM_VERBOSITY=UVM_LOW \
-t 1ps -L unisims_verm -L generic_baseblocks_v2_1_0 -L axi_infrastructure_v1_1_0 \
-L dds_compiler_v6_0_12 -lib xil_defaultlib xil_defaultlib.girobo2_tb_top \
xil_defaultlib.glbl
Late to the party but I found a great workaround for your obstacle. The do command within Modelsim's TCL instance does accept parameters. See command reference.
vsim -c -do filename.tcl can't take parameters, but you can use vsim -c -do "do filename.tcl params".
In your case this translates to os.system('vsim -c -do "do top_tb_simulate_reg.tcl axi_rd_only_test"'). Your .tcl script will find the parameter passed through the variable $1.
I hope to helps anyone!

How do I fix my shell script for this curl command

Hey guys I'm running a shell script through a few loops to acquire records but the curl command is giving me an invalid json error, what am I doing wrong?
resp=$(curl -g -u "${usr}":"${pwd}" -X GET "${env}"/"${name}"/res/"${type}"?where={%22timestamp%22:{%22$gt%22:{%22$date%22:%22"${date1}"%22},%22$lt%22:{%22$date%22:%22"${date2}"%22}}}&paging=limit:100,page:${i})
Quoting hell. printf can help:
url=$(printf '%s/%s/res/%s?where={%%22timestamp%%22:{%%22$gt%%22:{%%22$date%%22:%%22%s%%22},%%22$lt%%22:{%%22$date%%22:%%22%s%%22}}}&paging=limit:100,page:%s' "$env" "$name" "$type" "$date1" "$date2" "$i")
resp=$(curl -g -u "$usr:$pwd" -X GET "$url")

How to make gsutil rsync skip symlinks and return error code 0?

I have noticed that when gsutil rsync is working, it will return a non-zero error code out if it encounters a symlink which it can not resolve:
$ gsutil -m rsync -r -C /my_folder/ gs://my_bucket/
CommandException: Error opening file "file:////my_folder/my_symlink": .
CommandException: 1 files/objects could not be copied/removed.
Is there any way I can exclude such symlinks during the sync and make gsutil return error code 0?
I do not know the names of the symlinks.
As stated in the gsutil rsync documentation the -e parameter is used to ignore symbolic links.
Your command would look like:
gsutil -m rsync -r -C -e /my_folder/ gs://my_bucket/
I hope this is what you are looking for.