Closed kkaryos closed 5 months ago
This worked for me:
Perhaps the problem is the jupyter kernel somehow?
Can you take a look at our binder service here: https://mybinder.org/v2/gh/vgvassilev/clad/master?labpath=%2Fdemos%2FJupyter%2FIntro.ipynb
Thank you very much! The problem seams to be with the use of vectors.I have noticed that when there is a vector in any form in the function, it crashes, even when I am just accessing an element of the vector. The same does not happen with arrays...
Also the kernel restart on it's own:
Perhaps you are hitting #750. Can you use a fixed-size array in your example until the issue is fixed?
Also, in what context the kernel is automatically restarted?
Yes, I have managed to make it work with arrays , but it's not really appropriate for my application (this is just a minimal reproducible example for the error). The kernel restarts running the last cell (In[5]).
Yes, I have managed to make it work with arrays , but it's not really appropriate for my application (this is just a minimal reproducible example for the error).
Ah, I see. Then we will have to wait until that bug report is resolved :(.
The kernel restarts running the last cell (In[5]).
Do you know which kernel you are running? xeus-cling, xeus-cpp?
Yes, I have managed to make it work with arrays , but it's not really appropriate for my application (this is just a minimal reproducible example for the error).
Ah, I see. Then we will have to wait until that bug report is resolved :(. It's ok , thanks for your help
The kernel restarts running the last cell (In[5]).
Do you know which kernel you are running? xeus-cling, xeus-cpp? xeus-cling, but I don't think this is the problem because I also get errors when running it in vscode with clad "Built from source".
Yes, I have managed to make it work with arrays , but it's not really appropriate for my application (this is just a minimal reproducible example for the error). Ah, I see. Then we will have to wait until that bug report is resolved :(. It's ok , thanks for your help
The kernel restarts running the last cell (In[5]).
Do you know which kernel you are running? xeus-cling, xeus-cpp? xeus-cling, but I don't think this is the problem because I also get errors when running it in vscode with clad "Built from source".
Can you submit a bug report for the crash if it happens in xeus-cpp or via the static compiler?
Yes, I have managed to make it work with arrays , but it's not really appropriate for my application (this is just a minimal reproducible example for the error). Ah, I see. Then we will have to wait until that bug report is resolved :(. It's ok , thanks for your help
The kernel restarts running the last cell (In[5]).
Do you know which kernel you are running? xeus-cling, xeus-cpp? xeus-cling, but I don't think this is the problem because I also get errors when running it in vscode with clad "Built from source".
Can you submit a bug report for the crash if it happens in xeus-cpp or via the static compiler?
Yes, I will ...
I have encountered this error with this code:
Code: double integral(double alpha){ double h=alpha*2; return h; } double si(double x){ double alpha = 1/x ; // a=(M/m)/(kB T) double h =0; h= integral(alpha);
return h; } double x=100.0; std::cout<<si(x); auto Sigma1_dT = clad::differentiate(si,"x");
Error: input_line_42:4:14: error: no matching function for call to 'differentiate' auto Si_dx = clad::differentiate(si,"x"); ^)]: no member named 'value' in 'std::is_class<double (double)>'
differentiate(F fn, ArgSpec args = "",
^
~~~~~~ /home/kkaryos/miniconda3/envs/xeus-clad/include/clad/Differentiator/Differentiator.h:303:3: note: candidate template ignored: substitution failure [with BitMaskedOpts = <>, ArgSpec = const char , F = double ()(double)]: no type named 'type' in 'clad::ExtractDerivedFnTraitsForwMode<double ()(double), void>' differentiate(F fn, ArgSpec args = "", ^ /home/kkaryos/miniconda3/envs/xeus-clad/include/clad/Differentiator/Differentiator.h:323:3: note: candidate template ignored: substitution failure [with BitMaskedOpts = <>, ArgSpec = const char , F = double (&)(double)]: no type named 'type' in 'clad::ExtractDerivedFnTraitsForwMode<double (&)(double), void>' differentiate(F&& f, ArgSpec args = "", ^ /home/kkaryos/miniconda3/envs/xeus-clad/include/clad/Differentiator/Differentiator.h:346:3: note: candidate template ignored: substitution failure [with BitMaskedOpts = <>, ArgSpec = const char , F = double ()(double), DerivedFnType = void (*)(double, clad::array_refInterpreter Error:
I am using jupyter-lab with C++17.