Picongpu: TBG variable wrong but no error

Created on 26 Oct 2018  路  8Comments  路  Source: ComputationalRadiationPhysics/picongpu

When using the following tbg variable

TBG_radiation="--eG_radiation.period 1 --eG_radiation.dump 100 \
               --eG_radiation.totalRadiation   \
               --eG_radiation.lastRadiation 
               --e_radiation.start 20000 --e_radiation.end 40000 "

with a missing \ in third line, tbg still creates an output file but without the fourth line and it didn't throw and error.

tools question warning

All 8 comments

@macdre141 Welcome to GitHub and PIConGPU! Thanks for committing your first issue :+1:.

@psychocoderHPC Is this the intended behavior of tbg?

Hm, complicated. That's just "bash" and a similar

#!/usr/bin/env bash

TBG_radiation="--eG_radiation.period 1 --eG_radiation.dump 100 \
               --eG_radiation.totalRadiation   \
               --eG_radiation.lastRadiation 
               --e_radiation.start 20000 --e_radiation.end 40000 "

echo $TBG_radiation

does indeed output

--eG_radiation.period 1 --eG_radiation.dump 100 --eG_radiation.totalRadiation --eG_radiation.lastRadiation --e_radiation.start 20000 --e_radiation.end 40000

Also, your last line

--e_radiation.start 20000 --e_radiation.end 40000

has an error e instead of eG which is something tbg cannot catch since it's a logic bug.

Hm, complicated. That's just "bash" and a similar

#!/usr/bin/env bash

TBG_radiation="--eG_radiation.period 1 --eG_radiation.dump 100 \
               --eG_radiation.totalRadiation   \
               --eG_radiation.lastRadiation 
               --e_radiation.start 20000 --e_radiation.end 40000 "

echo $TBG_radiation

does indeed output

--eG_radiation.period 1 --eG_radiation.dump 100 --eG_radiation.totalRadiation --eG_radiation.lastRadiation --e_radiation.start 20000 --e_radiation.end 40000

Even if this works with normal bash I am not sure if we can handle it in tbg. The problem is that we need to detect multi line arguments and transform them internally.
We should keep this issue open but I give it a low priority since it is an ill formatted input.

@ax3l Yes, there is a bug in there that should have caused a crash at start time - but thus it ran (without the extra flags).

The question is also a bit why we even need the \. Pure bash does not need line-continuation to define multi-line strings. (And it's a common source of error for our users.)

#!/usr/bin/env bash

A="Hey,
   hey yo,
     hey jo!"

echo $A
Hey, hey yo, hey jo!

I do not remember why. We can check if we can skip the backslash

Am 31. Oktober 2018 12:45:03 MEZ schrieb Axel Huebl notifications@github.com:

The question is also a bit why we even need the \. Pure bash does not
need line-continuation to define multi-line strings. (And it's a common
source of error for our users.)

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/ComputationalRadiationPhysics/picongpu/issues/2775#issuecomment-434656625

@macdre141 may I ask you for a little favor?
Since you are PIConGPU pro's now and we are trying to run as well on Stampede2, can you please add yourselves to our community map? :) Thanks a lot! cc @n01r (live map)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

berceanu picture berceanu  路  4Comments

PrometheusPi picture PrometheusPi  路  3Comments

cbontoiu picture cbontoiu  路  3Comments

cbontoiu picture cbontoiu  路  3Comments

ax3l picture ax3l  路  3Comments