User Activity

  • Posted a comment on discussion ngspice-users on ngspice

    Dear Holger, Thank you for your help. I realised my mistake that I did not have a delay in my while loop in the main thread. Therefore my program was taking long to respond to callbacks by simulator. It is working fine now after adding a delay of 0.1 second inside the while loop. Thanks again for your response and I really appreciate the good work that you are doing. Cheers, Salman

  • Modified a comment on discussion ngspice-users on ngspice

    It is a strange behavior, I don't understand it as well. The simulation is faster (but unsafe in case of ngspice crash due to incomplete random circuit) with the python code below: self.__run(netlist=netlist, background=True) time.sleep(0.1) while(not self.running): if (self.exit_upon_quit == False): break if(self.error == True): self.bg_halt() if(time.time() - start_time > 20): self.bg_halt() time.sleep(0.1) try: if(not self._shared.ngSpice_running()): self.bg_halt() break except: raise Exception...

  • Posted a comment on discussion ngspice-users on ngspice

    It is a strange behavior, I don't understand it as well. The simulation is faster with the python code below: self.__run(netlist=netlist, background=True) time.sleep(0.1) while(not self.running): if (self.exit_upon_quit == False): break if(self.error == True): self.bg_halt() if(time.time() - start_time > 20): self.bg_halt() time.sleep(0.1) try: if(not self._shared.ngSpice_running()): self.bg_halt() break except: raise Exception While the simulation is much more slower with the code: self.__run(netlist=netlist,...

  • Posted a comment on discussion ngspice-users on ngspice

    But how do you explain the increase in simulation time when I am calling ngSpice_running(). The BGThreadRunning() callback is still being used.

  • Posted a comment on discussion ngspice-users on ngspice

    I am using ngspice shared in python to do my simulations with bg_run command. If I use ngSpice_running() function to check the status of the background my simulation is much faster but if I go with the flags set by BGThreadRunning() callback function, the simulation speed is very slow (almost 100 times slow). Could someone explain me the possible reason for this behavior? Thanks in advance for your help.

  • Modified a comment on discussion ngspice-users on ngspice

    I think it was my mistake. I was calling the dlclose/Freelibrary function inside the ControlledExit callback function. Thanks a lot for your help :) But still it would be great to have a function which can be called to restore the xspice shared libs to the defualt state before calling ngSpice_Init() because sometimes proper unloading of ngspice is not possible because of some error.

  • Posted a comment on discussion ngspice-users on ngspice

    I think it was my mistake. I was calling the dlclose/Freelibrary function inside the ControlledExit callback function. Thanks a lot for your help :)

  • Posted a comment on discussion ngspice-users on ngspice

    Yes, I have tried it with unloading of shared dll but I get the same error.

View All

Personal Data

Username:
salman07
Joined:
2017-12-28 12:16:30

Projects

  • No projects to display.

Personal Tools