rodluger / starry_process

interpretable gaussian processes for stellar light curves
MIT License
16 stars 5 forks source link

error: 'M_PI' was not declared in this scope #25

Open toihr opened 3 years ago

toihr commented 3 years ago

I am trying to use starry_process on Win10. And i keep getting this kind of error: Even if i just want to do this simple line: y = sp.sample_ylm().eval()

The Error Logs are something about M_PI was not declared in this scope:

Problem occurred during compilation with the command line below:
"D:\Software\Programming\mingw-64\mingw64\bin\g++.exe" -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -std=c++14 -O2 -DNDEBUG -DSP__LMAX=15 -DSP__UMAX=2 -Wno-c++11-narrowing -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=haswell -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include" -I"D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\vendor\eigen_3.3.5" -I"D:\Software\Programming\Anaconda\lib\site-packages\numpy\core\include" -I"D:\Software\Programming\Anaconda\include" -I"D:\Software\Programming\Anaconda\lib\site-packages\theano\link\c\c_code" -L"D:\Software\Programming\Anaconda\libs" -L"D:\Software\Programming\Anaconda" -o "C:\Users\diese\AppData\Local\Theano\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.8.8-64\tmpom5gfujq\m49317b78e657a6e50b4a70b6f485f9b198c08562c7599af663e1f62ca091d93b.pyd" "C:\Users\diese\AppData\Local\Theano\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.8.8-64\tmpom5gfujq\mod.cpp" -lpython38In file included from C:\Users\diese\AppData\Local\Theano\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.8.8-64\tmpom5gfujq\mod.cpp:8:
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/special.h: In function 'double sp::special::digamma::psi(const double&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/special.h:134:10: error: 'M_PI' was not declared in this scope
     y = -M_PI / tan(M_PI * r);
          ^~~~
In file included from C:\Users\diese\AppData\Local\Theano\compiledir_Windows-10-10.0.19041-SP0-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.8.8-64\tmpom5gfujq\mod.cpp:12:
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In function 'void sp::flux::computerT(int, sp::utils::RowVector<Scalar, -1>&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:28:10: error: 'M_PI' was not declared in this scope
   amp0 = M_PI;
          ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In function 'void sp::flux::amp(int, Eigen::MatrixBase<Derived>&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:202:18: error: 'M_PI' was not declared in this scope
   M /= (2 * sqrt(M_PI));
                  ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In function 'void sp::flux::computeA1(int, Eigen::SparseMatrix<Scalar>&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:248:28: error: 'M_PI' was not declared in this scope
   Scalar norm = 2.0 / sqrt(M_PI);
                            ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In member function 'void sp::flux::LimbDark<Scalar>::computeU1()':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:332:30: error: 'M_PI' was not declared in this scope
     Scalar norm = 2.0 / sqrt(M_PI);
                              ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In member function 'void sp::flux::LimbDark<Scalar>::computerTA1L(sp::utils::Vector<Scalar, 2>&, ROWVECTOR&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:512:17: error: 'M_PI' was not declared in this scope
     p *= norm * M_PI;
                 ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In member function 'void sp::flux::LimbDark<Scalar>::computerTA1L(sp::utils::Vector<Scalar, 2>&, ROWVECTOR&, VECTOR&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:540:17: error: 'M_PI' was not declared in this scope
     p *= norm * M_PI;
                 ^~~~
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h: In member function 'void sp::flux::LimbDark<Scalar>::computeL(sp::utils::Vector<Scalar, 2>&, ROWMATRIX&)':
D:\Software\Programming\Anaconda\lib\site-packages\starry_process\ops\include/flux.h:574:17: error: 'M_PI' was not declared in this scope
     p *= norm * M_PI;
                 ^~~~
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-c++11-narrowing

What am i doing wrong?