rindow / rindow-math-matrix

The fundamental package for scientific matrix operation
https://rindow.github.io/mathematics/
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

Problem with running under Windows #1

Closed GajowyJ closed 1 year ago

GajowyJ commented 1 year ago

I tried to check out the library, but I ran into the following problem when trying to use your example code (https://rindow.github.io/mathematics/openblas/mathlibrary.html#usage-on-php):

PHP Fatal error: Uncaught Error: Class "Interop\Polite\Math\Matrix\NDArray" not found in E:\tmp\rindow\rin.php:3

Following extensions are loaded in php_ini:

extension=rindow_openblas
extension=rindow_opencl
extension=rindow_clblast

Could you advise please, what could be the problem? My environement is Windows 10 with PHP 8.1.15 Thread Safe.

yuichiis commented 1 year ago

Thanks for your questions

There are two possibilities.

The first possibility is that the following phenomenon occurs, inferring from the phenomenon that it is occurring in the tmp file. You may have once saved a pure PHP object without the openblas extension set, but when you read it you are trying to read a binary object with the openblas extension set.

I think it's probably happening when you run the rindow-neuralnetwork sample. Object cache the first time you run the sample. The sample does not clear this cache. It will try to load when the sample is moved after the second time.

Please clear this cache. The sample program cache is created under "%TEMP%\rindow".

A second possibility is that your program is not reading Interop\Polite\Math\Matrix\NDArray.

Use composer to download the required libraries.

Set up rindow-math-matrix using composer. The necessary PHP libraries will be downloaded automatically.

thanks,

GajowyJ commented 1 year ago

Yes, indeed, the composer helped.