Re: Charm++ nodelist commands

From: Gengbin Zheng (gzheng_at_ks.uiuc.edu)
Date: Sun Jan 04 2004 - 16:23:27 CST

On Sun, 4 Jan 2004, Gadi Oron wrote:

> Hello again...
>
> On Fri, 2004-01-02 at 20:09, Gengbin Zheng wrote:
> > > > > Another question: is it possible to set process priority (nice
level)
> > > > > for NAMD node programs?
> > > > >
> > > >
> > > > No. It can be implemented but not for windows I guess.
> > > >
> >
> > You can now. This has been implemented in Charm++ CVS server.
> > It is only for non windows versions.
>
> Thank you very much, this option is very helpful!
>
> I believe though that with Cygwin the your implementation should be
> functional. (The nice command exists).
>

ok, Windows version of setting process priority (using SetPriorityClass
Win32 call) is also implemented. It should work for both Cygwin(gcc) and
pure windows(visual c++) binary.

Since windows does not support numeric nice level - it only
has these 6 levels (from high to low), I had to do a mapping from +nice
parameter value to the win priority levels:

REALTIME_PRIORITY_CLASS <= -20
HIGH_PRIORITY_CLASS -20 - -10
ABOVE_NORMAL_PRIORITY_CLASS -10 - 0
NORMAL_PRIORITY_CLASS 0
BELOW_NORMAL_PRIORITY_CLASS 0 - 10
IDLE_PRIORITY_CLASS > 10

Note that not every Windows supports ABOVE_NORMAL_PRIORITY_CLASS and
BELOW_NORMAL_PRIORITY_CLASS for example win95/ME. So when not supported,
the value will be overtaken by corresponding IDLE_PRIORITY_CLASS or
HIGH_PRIORITY_CLASS.
Again, you may need administrator privilege to set high priorities.

Same as explained in previous email, to set priority nice level, you can:
1. ./charmrun +p4 ./pgm +nice -5
   to set nice level to -5 (higher priority) for all 4 node processes.
   This works for *all* charm/NAMD version now.
2. put ++nice in a nodelist file:
group main
host host-1 ++nice 2
host host-2 ++nice -2
   This only works for net-* version when nodelist is read.

My test shows that setting very high priority under windows do have
noticeable good impact in the execution time.

The latest NAMD win32/VC++ binary for testing is now at:

http://www.ks.uiuc.edu/~gzheng/NAMD_Win32-i686.zip

It is compiled with Charm++/net-win32 with -O -DCMK_OPTIMIZE
and NAMD/Win32-i686-MSVC with tcl and plugins libraries.

The VC++ I was using to compile the binary donot have
BELOW_NORMAL_PRIORITY_CLASS and ABOVE_NORMAL_PRIORITY_CLASS defined, so
these two priorities are not supported in this binary.

(for cross linux/windows clusters usage, please note that you need exact
same charm++ source code from cvs, also with exact *Charm++ defined
macros* - that is with or without -DCMK_OPTIMIZE, binaries with
CMK_OPTIMIZE is not compatible with the one compiled without the flag
when running cross the platforms.)

Gengbin

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:18:00 CST