Re: [Gems-users] ctrl+C does not interrupt the simulation


Date: Tue, 13 Oct 2009 11:40:56 +0330
From: Mahmood Naderan <mahmood.nt@xxxxxxxxx>
Subject: Re: [Gems-users] ctrl+C does not interrupt the simulation
>Then in the system_t constructor class, i register my signal handler
>with opal using:
>signal(SIGINT,SignalInt);

I have found two constructors for system_t in system.C and system.h.
Which one do you mean?

_mnaderan_




On Tue, Oct 13, 2009 at 11:20 AM, Philip Garcia <pcgarcia@xxxxxxxx> wrote:
> I had this same issue a while back when I switched to using Simics
> 3.0.  An unsupported workaround to this is to install your own ctrl-c
> signal handler into opal/system/system.C .
>
> I can't say exactly what the changes are, as I don't know offhand
> which stuff I've added to system.C and what is in the vanilla system.C
>
> Adding the signal handler itself is pretty easy, I just include the
> file  #include <signal.h>
> I also added the following function into system.C (not as a method of
> the class, just a plain C function):
>
> void SignalInt(int sig)
> {
>   signal (sig,SIG_IGN); //ignore the signal
>   //HaltSimulation("hit control-c");
>   HALT_SIMULATION;
>   signal(SIGINT,SignalInt);
> }
>
> Then in the system_t constructor class, i register my signal handler
> with opal using:
>
> signal(SIGINT,SignalInt);
>
> This should allow ctrl-C events to halt opal.  I'm not sure why opal
> no longer gets the SIGINT signal from simics.  The simics forum said
> something about how they don't know what would happen if you add your
> own signal handler (like I did), but this method has worked pretty
> well for me.
>
> Phil
>
> On Oct 13, 2009, at 2:27 AM, Mahmood Naderan wrote:
>
>> Hi,
>> I have followed the instructions to start a simulation. After
>> successfully loading ruby and opal, I ran these commands:
>> simics> ruby0.setparam g_NUM_PROCESSORS 1
>> simics> ruby0.setparam g_MEMORY_SIZE_BYTES 4294967296
>> simics> ruby0.init
>> simics> opal0.init
>> simics> opal0.simstart "results.opal"
>>
>> Now at this point I ran  simics> opal0.simstep 10000000000, and it
>> seems the simulation starts, but I am not able to interrupt it with
>> ctrl+C (!). pressing ctrl+C results in displaying ^C character only.
>> How can I stop it?
>>
>> Thanks,
>> _mnaderan_
>> _______________________________________________
>> 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→]