[ExM Users] foreach bounds resulting in seg fault

Scott Krieder skrieder at iit.edu
Wed Oct 24 13:20:25 CDT 2012


Hi All,

I am encountering an error when the bound on my foreach loop exceeds 1,021.

#include <builtins.swift>
#include <io.swift>
#include <sys.swift>
main{

     int bound = toint(argv("bound"));
     float sleepTime = tofloat(argv("sleeptime"));

     // print for debug
     printf("The number of arguments is: %i\n", argc());
     printf("The bound is: %i\n", bound);
     printf("The sleeptime is: %f\n", sleepTime);

     // run the sleep
     foreach i in [1:bound:1]{
               sleep(sleepTime);
     }
}

Running with the bound set to 1022 and above results in the following error:

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 11
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault
(signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions

Could someone point me to the FAQ page with debugging suggestions? Are
there any limits to the sizes of the foreach loops?

Thank you,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20121024/1f9c9afc/attachment.html>


More information about the Exm-user mailing list