Write over of FlagsForSh

Asked by Sophie Williamson on 2020-12-15

Hi there,

I've got a model file that has very long expressions for the Constraints, and they're therefore being cut midline and are flagging errors. I read that something like the following should be added to FlagsForSh in the home directory:

------

#LineLength
LL="-DSTRSIZ=220"

export CC CFLAGS lDL LX11 SHARED SONAME SO FC FFLAGS RANLIB CXX CXXFLAGS lFort lQuad LL MAKE

------

I'm using make instead of gmake, so then do make clean (keep FlagsForSh), and make. Only during the make procedure my modified FlagsForSh is wiped and replaced with the default, and the line length is not changed.

I have also tried manually editing the Constraints file with C style line wrappers (\) but this is not being recognised.

I'd really appreciate if anyone could advise me.

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
CalcHEP Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Pukhov
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Pukhov (pukhov) said :
#1

You can change this instruction:

c_source/chep_crt/include/syst.h:#define STRSIZ 4096

Do not forget

make clean

make

after  file correction.

Best

     Alexander Pukhov

On 12/15/20 9:41 PM, Sophie Williamson wrote:
> New question #694533 on CalcHEP:
> https://answers.launchpad.net/calchep/+question/694533
>
> Hi there,
>
> I've got a model file that has very long expressions for the Constraints, and they're therefore being cut midline and are flagging errors. I read that something like the following should be added to FlagsForSh in the home directory:
>
> ------
>
> #LineLength
> LL="-DSTRSIZ=220"
>
> export CC CFLAGS lDL LX11 SHARED SONAME SO FC FFLAGS RANLIB CXX CXXFLAGS lFort lQuad LL MAKE
>
> ------
>
> I'm using make instead of gmake, so then do make clean (keep FlagsForSh), and make. Only during the make procedure my modified FlagsForSh is wiped and replaced with the default, and the line length is not changed.
>
> I have also tried manually editing the Constraints file with C style line wrappers (\) but this is not being recognised.
>
> I'd really appreciate if anyone could advise me.
>
> Thanks in advance.
>

Revision history for this message
Sophie Williamson (swilliamson) said :
#2

Hi Alexander,

Thanks for your response.

So I have tried changing this line both to
#define STRSIZ 8192 and #define STRSIZ 1024
and found that I am still getting the same error as before; that there is an error in the constraints table - expressions - position X because of variables being chomped off when being read in.

I have tried doing this simultaneously with LL="-DSTRSIZ=8192/1024", but nothing changes.

What am I still missing?

Thanks a lot,

Sophie

Revision history for this message
Best Alexander Pukhov (pukhov) said :
#3

Please, send me your model files  which lead to the problem.

<email address hidden>

Best

    Alexander Pukhov

On 12/17/20 2:41 AM, Sophie Williamson wrote:
> Question #694533 on CalcHEP changed:
> https://answers.launchpad.net/calchep/+question/694533
>
> Status: Answered => Open
>
> Sophie Williamson is still having a problem:
> Hi Alexander,
>
> Thanks for your response.
>
> So I have tried changing this line both to
> #define STRSIZ 8192 and #define STRSIZ 1024
> and found that I am still getting the same error as before; that there is an error in the constraints table - expressions - position X because of variables being chomped off when being read in.
>
> I have tried doing this simultaneously with LL="-DSTRSIZ=8192/1024", but
> nothing changes.
>
> What am I still missing?
>
> Thanks a lot,
>
> Sophie
>

Revision history for this message
Sophie Williamson (swilliamson) said :
#4

Thanks Alexander Pukhov, that solved my question.

Revision history for this message
Sophie Williamson (swilliamson) said :
#5

The solution found was to move the line ending, <|, defined on the 3rd line of the model file,
`Name |> Expression ....... <|`
to the maximal character length of the expression lines, by preceding it with the required number of white spaces. This worked immediately. Thanks!