[Swift-devel] recent trunk changes swift parsing

Justin M Wozniak wozniak at mcs.anl.gov
Fri May 20 15:43:55 CDT 2011


Here are two related cases to consider (one commented out).

type file;

app (file o) touch()
{
   touch @o;
}

file t[] <simple_mapper;prefix="a",suffix=".txt">;

/*
foreach i in t
{
   i = touch();
}
*/

foreach i in [1:5]
{
   t[i] = touch();
}


On Fri, 20 May 2011, Mihael Hategan wrote:

> Can you post a stack trace or a pointer to the log?
>
> On Fri, 2011-05-20 at 15:14 -0500, ketan wrote:
>> I updated trunk and seems swift parsing has changed a bit?
>>
>> I see this:
>>
>> Swift svn swift-r4502 cog-r3128 (cog modified locally)
>>
>> RunID: 20110520-2005-kst5ztsf
>> Progress:  time: Fri, 20 May 2011 20:05:51 +0000
>> SwiftScript trace: str_roots.[0]:string = 3lyv-4 - Closed
>> Execution failed:
>>      For input string: "3.0"
>>
>>
>> for my this swift:
>>
>> type file_pdb;
>> type file_dat;
>>
>> app (file_dat dat_file)
>>    do_one_dock(
>>        string        param_root,
>>        string        param_modulo,
>>        file_pdb param_file_static,
>>        file_pdb param_file_mobile )
>> {
>>    modftdock 32
>>              "-modulo" @param_modulo
>>              "-root"   @param_root
>>              "-static" @param_file_static
>>              "-mobile" @param_file_mobile
>>              "-calculate_grid" @arg("grid","2.5")
>>              "-angle_step" "10"
>>              "-keep" "10"
>>              "-noelec";
>> }
>>
>> string modulus = @arg("m","100");
>> string str_roots[] = readData( @arg( "list" ) );
>>
>> foreach str_root in str_roots
>> {
>>    trace( str_root );
>>
>>    string str_file_static = @strcat( "input/", str_root, ".pdb" );
>>    string str_file_mobile = "input/4TRA.pdb";
>>
>>    file_pdb file_static < single_file_mapper; file = str_file_static >;
>>    file_pdb file_mobile < single_file_mapper; file = str_file_mobile >;
>>    file_dat dat_files[] < simple_mapper;
>>                                padding = 3,
>>                                location = "output",
>>                    prefix  = @strcat( str_root, "_" ),
>>                    suffix  = ".dat" >;
>>
>>    // break docking jobs + do 'em in parallel
>>    int n = @toint(@arg("n","1"));
>>    foreach mod_index in [0:n-1]
>>    {
>>      string str_modulo = @strcat(mod_index, ":", modulus);
>>      dat_files[ mod_index ] = do_one_dock( str_root,
>>                        str_modulo,
>>                        file_static,
>>                        file_mobile );
>>    }
>> }
>>
>> _______________________________________________
>> Swift-devel mailing list
>> Swift-devel at ci.uchicago.edu
>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>

-- 
Justin M Wozniak



More information about the Swift-devel mailing list