INFO: sys file exists: /usr/lib/python3.9/site-packages/pythran/pythran.cfg
INFO: platform file exists: /usr/lib/python3.9/site-packages/pythran/pythran-linux.cfg
WARNING: user file does not exist: /home/khushi/.pythranrc
INFO: pythranrc section [pythran] is valid and options are correct
INFO: pythranrc section [typing] is valid and options are correct
INFO: pythranrc section [compiler] is valid and options are correct
CRITICAL: I am in trouble. Your input file does not seem to match Pythran's constraints...
python/acc_pythran2.py:None:None error: Module 'sys' not found.
CRITICAL: I am in trouble. Your input file does not seem to match Pythran's constraints...
python/acc_pythran2.py:None:None error: Module 'sys' not found.
I had imported sys module, yet it shows "Module 'sys' not found.". I am concluding that the error is not due to the sys module.
Still, I wanted to configure. Hence, I hard-coded datasets and again tried to run the codes. I got: "Module 'timeit' not found.".
I am concluding that the error is while computing accelerations in compute_accelerations functions.
For 3rd: Here, the time taken by Pythran's implementation is almost similar to that of NumPy. This should not be the case since Pythran is an accelerator. I'm expecting the performance of Pythran > Performance of NumPy.
Solution
We can observe that the error is while calculating accelerations of the masses. I made some changes in the function, here. It works well with jitted compilation using Pythran: Transonic.
Drawbacks with the above solution
The solution is able to produce better results. But steps must be the same in all kinds of implementation for benchmarking. Does that matter in a bigger view? Yeah, I feel so.
One solution to the above problem I can think of, is to change the functions in all the other implementations. But that will degrade NumPy's performance. Hence, I'm not up for this solution.
I'm looking forward to your inputs. Thanks!
cc: @mattip
I'm trying to accelerate my NumPy's implementation using the Pythran library.
Code: here
I'm getting the following outputs:
1st: For Command:
Error:
2nd: For Command:
Error:
3rd: For Command:
Result:
My Viewpoints
sys
module, yet it shows "Module 'sys' not found.". I am concluding that the error is not due to thesys
module.Solution
jitted compilation using Pythran: Transonic
.Drawbacks with the above solution
I'm looking forward to your inputs. Thanks! cc: @mattip
I'm referring to the following reference: