[Swift-user] locally running parallel code

Michael Wilde wilde at mcs.anl.gov
Thu Jul 4 09:31:14 CDT 2013


Nikhil, the problem is most likely the jobThrottle value in your sites.xml file.

The default sites file entry for pool "localhost" specifies jobThrottle=0 :

    <profile namespace="karajan" key="jobThrottle">0</profile>

Copy the sites file from your swift/ release directory (e.g. swift-0.94/etc) to the directory in which you are running swift, and replace the line above with these two lines:

    <profile namespace="karajan" key="jobThrottle">.07</profile>
    <profile namespace="karajan" key="initialScore">10000</profile>

The run swift with the -sites.file option specifying  your local copy of sites:

  swift -sites.file sites.xml myscript.swift # etc

The max number of jobs that Swift will send to each site (each "pool" in the sites file) is
(jobThrottle + 1) * 100. This is explained in the User Guide section that explains Swift properties.

So the value above of .07 will allow up to 8 jobs at a time to be sent to the pool. If you want to run 16 jobs at one, use .15, 32 jobs at once, use .31, etc.

The reason for this odd convention is historical: Swift originally was developed to send jobs to grid sites where the optimal number of jobs to send had to be discovered dynamically. The initialScore value of 10000 essentially disables this outdated algorithm and lets you set the number of concurrent jobs directly via jobThrottle.  This will be made simpler and more clear in a future release of Swift.

- Mike

----- Original Message -----
> From: "Nikhil Raj" <nkrjnishu01 at gmail.com>
> To: swift-user at ci.uchicago.edu
> Sent: Thursday, July 4, 2013 3:50:06 AM
> Subject: [Swift-user] locally running parallel code
> 
> 
> 
> 
> 
> hi,
> this is nikhil and i am using swift for running a program. The
> problem i want to calculate the solution parallely using local
> multiple processor,but when i give the
> command it is just taking each problem at a time and not parallely.I
> have a multi core processor and i want each cpu solving diffrent
> problem at the same time
> but it is just using one of them and calculating one by one.pls help
> me out asap.
> 
> 
> 
> my program
> 
> 
> type messagefile;
> 
> app (messagefile t) solve_instance(string fname) {
> bnb fname stdout=@filename(t);
> }
> string name ="b.txt c.txt";
> messagefile fi[]<fixed_array_mapper;files=name>;
> string
> prob[]=["/home/nikhil/BatchS121208M.nl","/home/nikhil/BatchS151208M.nl"];
> foreach f in prob{
> messagefile c<regexp_mapper;
> source=@f,
> match="(.*)nl",
> transform="\\1txt">;
> c=solve_instance(f);
> }
> 
> bnb is a slover i am using to solve the problem."BatchS121208M.nl" is
> the problem file name.
> I am attaching various log files and also the files which i think may
> be problem because of which my code is not running properly.
> look inti sites.xml may be there is some prob
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user



More information about the Swift-user mailing list