Re: [Gems-users] SMT in GEMS2.1


Date: Tue, 25 Mar 2008 14:29:58 -0500 (CDT)
From: Luke Yen <lyen@xxxxxxxxxxx>
Subject: Re: [Gems-users] SMT in GEMS2.1

No, numProcs should be exactly equal to g_NUM_PROCESSORS, and is equal to the number of processors in the checkpoint used by Simics.

In your case, if g_NUM_PROCESSORS = 4, g_NUM_SMT_THREADS = 2, and CONFIG_LOGICAL_PER_PHY_PROC = 2, numProcs should be equal to 4 and numSMTProcs should be equal to 2.

  Luke

On Tue, 25 Mar 2008, Xuan Qi wrote:

Hi Luke,

Thanks for your quick reply. I think I didn't explain my confusion well.

If I have 4 physical procs initiated by simics, and 2 threads/processor,
as Logical = total number of HW thread contexts, numProcs should be 4 * 2
= 8.

However, when setting the parameter g_NUM_PROCESSORS, I should set it to
4 not 8 (right?). And 4 is passed into and numProcs will be assigned 4. So
there is a mismatch here as numProcs is supposed to be 8 if I understand
correctly. Any idea how should I configure to make numProcs assigned to
the right value? Thank you very much for your patience...


Best regards,
Xuan Qi


On Tue, 25 Mar 2008, Luke Yen wrote:


   You need checkpoints that support the total number of g_NUM_PROCESSORS
(in your case, 4).  It might be that you are trying to simulate a CMP with
4 HW contexts with only 2 physical processors, which is not allowed.

  Luke

On Tue, 25 Mar 2008, Xuan Qi wrote:

Thanks Luke, could you help me with one more question:

I am simulating a system with 2 processor, each processor supports 2
threads. This is the configuration in my script, which basically follows
mfacet.py:

ruby0.setparam g_NUM_PROCESSORS 2
ruby0.setparam g_PROCS_PER_CHIP 2
ruby0.setparam g_NUM_SMT_THREADS 2
ruby0.setparam g_NUM_MEMORIES 1
ruby0.setparam g_MEMORY_SIZE_BYTES 536870912
ruby0.setparam NUMBER_OF_VIRTUAL_NETWORKS 6
ruby0.init
load-module opal
opal0.setparam CONFIG_LOGICAL_PER_PHY_PROC 2
opal0.setparam CONFIG_IREG_PHYSICAL 384
opal0.setparam CONFIG_FPREG_PHYSICAL 256
opal0.setparam CONFIG_CCREG_PHYSICAL 74
opal0.init

And I add this line in system.C just to check if the value of numProcs and
m_numSMTProcs is corret:
printf("numProcs[%d] numSMTProcs[%d]\n", numProcs, m_numSMTProcs);

The print out is:
numProcs[2] numSMTProcs[1]

If I understand your explanation correctly, numProcs should be 4 and
numSMTProcs should be 2 in this case. And my configuration apparently
didnt pass in the correct values. How should I set the parameters to make
the value correct? I tried to do: ruby0.setparam g_NUM_PROCESSORS 4, but
simics won't take it... Thank you.


Best regards,
Xuan Qi


On Tue, 25 Mar 2008, Luke Yen wrote:


If this is the case, the first assert should be:

ASSERT( (cpuNumber >= 0) && (cpuNumber < system_t::inst->m_numSMTProcs) );

instead of:

ASSERT( (cpuNumber >= 0) && (cpuNumber < system_t::inst->m_numProcs) );

Is it?

    You can change it if you want, but in any case the error condition you
care about will be caught by the assertion on seq_index, since the
assignment makes seq_index get the value of cpuNumber.


(2) in system.C

first, the numProcs is defined as:

// establish how many processors there are in the system
 int numProcs = SIM_number_processors();   //for SMT, this is the total
number of LOGICAL processors in the system

then,

m_numSMTProcs = numProcs / CONFIG_LOGICAL_PER_PHY_PROC;

I am confused here because numProcs is first defined as the total number
of LOGICAL processors in the system. Is this the number of SMT processors?
If so, m_numSMTProcs = numProcs / CONFIG_LOGICAL_PER_PHY_PROC doesn't make
sense. It looks to me that numProcs should be set to the number
of PHYSICAL processors initiated by simics, is it? Maybe I misunderstand
the definition of LOGICAL processor?


    My definitions:
      Logical = total number of HW thread contexts
            (e.g. physical procs*(SMT contexts per proc), available to Simics for
                  scheduling)
      Physical = total number of physical procs (as seen by Ruby)

    Luke
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.



_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.


_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.

[← Prev in Thread] Current Thread [Next in Thread→]