Thread: Running executable code from SAC

Started: 2013-03-13 21:34:45
Last activity: 2013-03-15 14:42:12
Topics: SAC Help
Charlotte Schoonman
2013-03-13 21:34:45
Hi SAC help,

I have a macro which tells SAC to run an executable. This executable
requires input. The macro as I was given it is structured as follows:

echo on
rh *.?[LH]?
setbb dp &1,evdp
setbb del &1,gcarc
$run /space3/cms78/scripts/unpacking_preprep/src/ttimes
P <------ input into the executable
S

%dp
%del
-10
-10 <------input ends
$endrun
quit

Running this macro produces a segmentation fault on my version of SAC
(101.4 64 bit Ubuntu).

Then, when I try running the executable from SAC (without using the macro),
the following appears:

SAC> $run /space3/cms78/scripts/unpacking_preprep/src/ttimes
run?
ERROR 1203: Could not find VARS section terminal
SAC>



I have two questions.

1. By using sc instead of $run in the macro, I can get the executable to
run from SAC, but then the macro will not give the input to the executable.
Is there another way of running the executable and and inputting the above
values from the same macro?

2. What does error 1203 mean and is there a way around it in this
situation? I have compiled all requisite components in both 32bit and 64bit
(previously listed as a potential solution), and both produce the same
error.

Many thanks,

Charlie

  • George Helffrich
    2013-03-13 21:47:16
    Dear Charlie -

    Problem (1) is a bug -- SAC should not fail when using the $run command (though the program run might fail!)

    Problem (2) is not a bug. The $run command is only usable inside of a macro. Outside of it, the string "$run" is interpreted as a use of a macro variable, and those don't exist except inside of macros!

    A note regarding your macro ... you can simply put &1,evdp& in between the $run ... $endrun, and the proper value will be substituted -- no need to use a blackboard variable to retrive its value.

    On 13 Mar 2013, at 14:34, Charlotte Schoonman wrote:

    Hi SAC help,

    I have a macro which tells SAC to run an executable. This executable requires input. The macro as I was given it is structured as follows:

    echo on
    rh *.?[LH]?
    setbb dp &1,evdp
    setbb del &1,gcarc
    $run /space3/cms78/scripts/unpacking_preprep/src/ttimes
    P <------ input into the executable
    S

    %dp
    %del
    -10
    -10 <------input ends
    $endrun
    quit

    Running this macro produces a segmentation fault on my version of SAC (101.4 64 bit Ubuntu).

    Then, when I try running the executable from SAC (without using the macro), the following appears:

    SAC> $run /space3/cms78/scripts/unpacking_preprep/src/ttimes
    run?
    ERROR 1203: Could not find VARS section terminal
    SAC>



    I have two questions.

    1. By using sc instead of $run in the macro, I can get the executable to run from SAC, but then the macro will not give the input to the executable. Is there another way of running the executable and and inputting the above values from the same macro?

    2. What does error 1203 mean and is there a way around it in this situation? I have compiled all requisite components in both 32bit and 64bit (previously listed as a potential solution), and both produce the same error.

    Many thanks,

    Charlie
    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help



    George Helffrich
    george.helffrich<at>bris.ac.uk



  • Brian Savage
    2013-03-15 14:42:12
    Dear Charlie,

    Thanks for reporting this bug in SAC.

    A fix for this is straight forward if you have the source. Apply the attached patch and recompile.

    The next version of SAC (101.6) will be appearing soon and will include this bug fix.

    Thanks again.

    Brian Savage
    savage<at>uri.edu



    On Mar 13, 2013, at 10:34 AM, Charlotte Schoonman wrote:

    Hi SAC help,

    I have a macro which tells SAC to run an executable. This executable requires input. The macro as I was given it is structured as follows:

    echo on
    rh *.?[LH]?
    setbb dp &1,evdp
    setbb del &1,gcarc
    $run /space3/cms78/scripts/unpacking_preprep/src/ttimes
    P <------ input into the executable
    S

    %dp
    %del
    -10
    -10 <------input ends
    $endrun
    quit

    Running this macro produces a segmentation fault on my version of SAC (101.4 64 bit Ubuntu).

    Then, when I try running the executable from SAC (without using the macro), the following appears:

    SAC> $run /space3/cms78/scripts/unpacking_preprep/src/ttimes
    run?
    ERROR 1203: Could not find VARS section terminal
    SAC>



    I have two questions.

    1. By using sc instead of $run in the macro, I can get the executable to run from SAC, but then the macro will not give the input to the executable. Is there another way of running the executable and and inputting the above values from the same macro?

    2. What does error 1203 mean and is there a way around it in this situation? I have compiled all requisite components in both 32bit and 64bit (previously listed as a potential solution), and both produce the same error.

    Many thanks,

    Charlie
    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


    Attachments
Page built 04:08:53 | v.b'59d0d2