Photonics

Photonics

Topics related to Lumerical and more.

FDTD crash when plotting figures using script

    • vince
      Subscriber

      Hi,

      The FDTD simulation crash every time when I try to plot a figure using script. Here is the screenshot of the simulation, it's a simple structure of grating coupler. I can visualize the simulation result on right clicking the monitors, but not with script.

      I generated along x-axis a gaussian function. I just simply want to plot this gaussian as a function of x using the script. The simulation just crash and it doesn't return any error.

    • Greg Baethge
      Ansys Employee

      Thanks for posting on the forum. This is a weird issue, I haven't been able to reproduce it so far. Could you run the script again, but comment the plot line (#26) before? I'd want to check the workspace, in case there's a problem with some variable.
    • vince
      Subscriber
      Hi @greg_baethge Thanks for you response. The simulation runs without any errors if I comment the plot line. It doesn't crash this time. Here you can see the new screenshot of the simulation. "x" is a vector with 1915 elements, same as "Gaussian".
      Best Vince
    • Greg Baethge
      Ansys Employee
      Thanks for the additional information,. Could you give us some more details on the machine? What OS version is it running? Are the graphics driver up to date? As I mentioned, I haven't been able to reproduce the crash so far, I tried on my laptop and on a virtual machine. In both cases, I could get the plot running:
      x = linspace(-20,20, 20000)*1e-6;
      MFD = 8.9e-6;
      sigma = MFD / 2;
      Gaussian = exp(-(x /sigma)^2);
      plot(x, Gaussian);
      both machines are running Windows 10 Enterprise.
    • vince
      Subscriber
      Hi greg_baethge, the machine is running windows server 2019 datacenter. You can see the windows specifications in the attached image.
      I don't know how to check the graphic setting of this machine. Regarding the problem is related to the plot, it would be due to the graphics. What kind of graphic setting is necessary? Where I can find the information?
      Thanks, Vince
    • Greg Baethge
      Ansys Employee
      Thanks. The plot shouldn't require anything really specific, as they're not that demanding, but I'm trying to eliminate possible causes. I'll ask my colleagues if they encounter this problem.
      Does the crash also occurs with "visualize"? You can try:
      MFD = 8.9e-6;
      sigma = MFD / 2;

      x = linspace(-20,20, 20000)*1e-6;
      Gaussian = exp(-(x /sigma)^2);

      G = matrixdataset("Gaussian");
      G.addparameter("x", x);
      G.addattribute("G", Gaussian);

      visualize(G);
    • vince
      Subscriber
      I tried your code, it doesn't crash. I also tried "image", it doesn't crash neither.
      x = linspace(-20,20, 500)*1e-6;
      y = linspace(-20,20, 500)*1e-6;
      Gaussian = matrix(length(x),length(y));
      for(i=1:length(x)){
      for(j=1:length(y)){
      Gaussian(i,j) = exp(-((x(i)/sigma)^2)+(y(j)/sigma)^2);
      }}
      image(x,y,Gaussian);
    • Greg Baethge
      Ansys Employee
      Thanks for the confirmation. It's good to know it is limited to "plot". I'll keep you posted if I get more information.
    • jvdburgt
      Subscriber
      Has the cause of this issue been found?
      I seem to have the exact same problem. Even if I just open a new FDTD simulation an try something like plot(2,3) it just crashes. image(x,y,Gaussian) like above works fine. I had it also earlier this week, the server was rebooted, then I could make a few plots, and now the issue is back again.
    • Greg Baethge
      Ansys Employee

      Unfortunately, no. The difficulty is we cannot reproduce this issue on our machines. It could be due to some graphic drivers or library issue, for example. Could you give some information on your configuration?
    • jmidkiff
      Subscriber

      Hi all, I had the same problem with the plot command in MODE, using a second monitor. I moved the program back to my computer's native monitor and it worked fine.

    • Lito
      Ansys Employee
    • rameshk
      Subscriber

      I am using te Ansys 2023 R2.1.. The INTERCONENCT window automatically exits when running the scripts with 'plot' command. It works fine without plot command, and also work with visualize command. I noticed that it happens when accessing the software remotely on a server machine. (But suprisingly, sometimes it works fine on the same remote machine.) I tried removing the '.ini' file; it did not help. 

    • Lito
      Ansys Employee

      @rameshk, 

      If the issue only happens when you connect remotely to the machine, check the setttings/configuration of the remote client application. 

      Try to check for any error message from the Ansys client logs on the machine having the issue. These log are in the folder:

      Windows:

      %Temp%\.ansys\

      Linux:

      ~/.ansys 

      or

      $HOME/.ansys 

       

Viewing 13 reply threads
  • The topic ‘FDTD crash when plotting figures using script’ is closed to new replies.