Math tests on Jenkins -- is Windows being tested?

I couldn’t find whether Windows was tested on Jenkins now.

I tried downloading the latest version of develop on a Windows box and the tests don’t finish compiling and running. If it’s not running unit tests on Windows, should we set that up?

I’m seeing this failure:

> make test/unit/math/fwd/mat/fun/assign_test.exe
uname: not found
uname: not found
g++  -Wall -I . -isystem lib/eigen_3.3.3 -isystem lib/boost_1.66.0 -isystem lib/cvodes-3.1.0/include -isystem lib/idas-2.1.0/include -std=c++1y -DBOOST_RESULT_O
F_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -Wno-unused-function -Wno-uninitialized -m64 -Wno-unused-but-set-va
riable -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -isystem lib/gtest_1.7.0/include -isystem lib/gtest_1.7.0 -O3 -DNO_FPRINTF_OUTPUT -pipe  -c -o test/unit/
math/fwd/mat/fun/assign_test.o test/unit/math/fwd/mat/fun/assign_test.cpp
test/unit/math/fwd/mat/fun/assign_test.cpp: In member function 'virtual void AgradFwdMatrixAssign_vector_vector_fvar_fvar_double_Test::TestBody()':
test/unit/math/fwd/mat/fun/assign_test.cpp:430:15: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<stan::math::fvar
<stan::math::fvar<double> > > >::value_type {aka stan::math::fvar<stan::math::fvar<double> >}' and 'size_t {aka long long unsigned int}')
       x[i][j] = (i + 1) * (j - 10);
               ^
test/unit/math/fwd/mat/fun/assign_test.cpp:430:15: note: candidate is:
In file included from ./stan/math/fwd/core.hpp:4:0,
                 from ./stan/math/fwd/mat.hpp:4,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/fwd/core/fvar.hpp:42:8: note: stan::math::fvar<stan::math::fvar<double> >& stan::math::fvar<stan::math::fvar<double> >::operator=(const stan::math::
fvar<stan::math::fvar<double> >&)
 struct fvar {
        ^
./stan/math/fwd/core/fvar.hpp:42:8: note:   no known conversion for argument 1 from 'size_t {aka long long unsigned int}' to 'const stan::math::fvar<stan::math:
:fvar<double> >&'
test/unit/math/fwd/mat/fun/assign_test.cpp: In member function 'virtual void AgradFwdMatrixAssign_vector_vector_vector_fvar_fvar_double_Test::TestBody()':
test/unit/math/fwd/mat/fun/assign_test.cpp:460:20: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<stan::math::fvar
<stan::math::fvar<double> > > >::value_type {aka stan::math::fvar<stan::math::fvar<double> >}' and 'size_t {aka long long unsigned int}')
         x[k][i][j] = (i + 1) * (j - 10) * (20 * k + 100);
                    ^
test/unit/math/fwd/mat/fun/assign_test.cpp:460:20: note: candidate is:
In file included from ./stan/math/fwd/core.hpp:4:0,
                 from ./stan/math/fwd/mat.hpp:4,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/fwd/core/fvar.hpp:42:8: note: stan::math::fvar<stan::math::fvar<double> >& stan::math::fvar<stan::math::fvar<double> >::operator=(const stan::math::
fvar<stan::math::fvar<double> >&)
 struct fvar {
        ^
./stan/math/fwd/core/fvar.hpp:42:8: note:   no known conversion for argument 1 from 'size_t {aka long long unsigned int}' to 'const stan::math::fvar<stan::math:
:fvar<double> >&'
test/unit/math/fwd/mat/fun/assign_test.cpp: In member function 'virtual void AgradFwdMatrixAssign_vector_eigen_vector_fvar_fvar_double_Test::TestBody()':
test/unit/math/fwd/mat/fun/assign_test.cpp:496:15: error: no match for 'operator=' (operand types are 'Eigen::DenseCoeffsBase<Eigen::Matrix<stan::math::fvar<sta
n::math::fvar<double> >, -1, 1>, 1>::Scalar {aka stan::math::fvar<stan::math::fvar<double> >}' and 'size_t {aka long long unsigned int}')
       x[i](j) = (i + 1) * (10 * j + 2);
               ^
test/unit/math/fwd/mat/fun/assign_test.cpp:496:15: note: candidate is:
In file included from ./stan/math/fwd/core.hpp:4:0,
                 from ./stan/math/fwd/mat.hpp:4,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/fwd/core/fvar.hpp:42:8: note: stan::math::fvar<stan::math::fvar<double> >& stan::math::fvar<stan::math::fvar<double> >::operator=(const stan::math::
fvar<stan::math::fvar<double> >&)
 struct fvar {
        ^
./stan/math/fwd/core/fvar.hpp:42:8: note:   no known conversion for argument 1 from 'size_t {aka long long unsigned int}' to 'const stan::math::fvar<stan::math:
:fvar<double> >&'
In file included from ./stan/math/prim/scal/fun/acosh.hpp:4:0,
                 from ./stan/math/prim/mat/fun/acosh.hpp:5,
                 from ./stan/math/prim/mat.hpp:50,
                 from ./stan/math/fwd/mat.hpp:9,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/prim/scal/fun/constants.hpp: At global scope:
./stan/math/prim/scal/fun/constants.hpp:140:14: warning: 'stan::math::NEG_TWO_OVER_SQRT_PI' defined but not used [-Wunused-variable]
 const double NEG_TWO_OVER_SQRT_PI = -TWO_OVER_SQRT_PI;
              ^
make: *** [test/unit/math/fwd/mat/fun/assign_test.o] Error 1

It won’t let me see jenkins status, but I am interested in this question because I (am supposed to) work on Windows.

1 Like

Any progress on this, I was trying to work on my first math library issue and can’t compile any tests due to exactly this error.

I am on Windows 10, using gcc from RTools 3.5. Full version of gcc:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/Rtools/mingw_64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.9.3/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/home/Jeroen/mingw-gcc-4.9.3/x86_64-493-posix-seh-rt_v3-s/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-static --disable-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --with-mpc=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --with-isl=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --with-cloog=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x86_64-posix-seh, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/home/Jeroen/mingw-gcc-4.9.3/x86_64-493-posix-seh-rt_v3-s/mingw64/opt/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-zlib-static/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/home/Jeroen/mingw-gcc-4.9.3/x86_64-493-posix-seh-rt_v3-s/mingw64/opt/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-zlib-static/include -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/home/Jeroen/mingw-gcc-4.9.3/x86_64-493-posix-seh-rt_v3-s/mingw64/opt/lib -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-zlib-static/lib -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: posix
gcc version 4.9.3 (x86_64-posix-seh, Built by MinGW-W64 project)

Mind reporting back on what fails? We just had a report that it passes, so we need to figure out what’s different that’s causing the failure. Knowing where it fails helps us narrow it down.

Here’s link to the Math issue: https://github.com/stan-dev/math/issues/951

It looks almost the same as in the OP.

I run:

python runTests.py -j 8 test/unit

First there is a warning (multiple copies):

test/unit/multiple_translation_units1.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
 #include <stan/math.hpp>
 ^

And then I get the error:

g++ -Wall -I . -isystem lib/eigen_3.3.3 -isystem lib/boost_1.66.0 -isystem lib/sundials_3.1.0/include -std=c++1y -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -Wno-unused-function -Wno-uninitialized -m64 -Wno-unused-but-set-variable -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -isystem lib/gtest_1.7.0/include -isystem lib/gtest_1.7.0 -O3 -DNO_FPRINTF_OUTPUT -pipe  -c -o test/unit/math/fwd/mat/fun/columns_dot_product_test.o test/unit/math/fwd/mat/fun/columns_dot_product_test.cpp
test/unit/math/fwd/mat/fun/assign_test.cpp: In member function 'virtual void AgradFwdMatrixAssign_vector_vector_fvar_fvar_double_Test::TestBody()':
test/unit/math/fwd/mat/fun/assign_test.cpp:430:15: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<stan::math::fvar<stan::math::fvar<double> > > >::value_type {aka stan::math::fvar<stan::math::fvar<double> >}' and 'size_t {aka long long unsigned int}')
       x[i][j] = (i + 1) * (j - 10);
               ^
test/unit/math/fwd/mat/fun/assign_test.cpp:430:15: note: candidate is:
In file included from ./stan/math/fwd/core.hpp:4:0,
                 from ./stan/math/fwd/mat.hpp:4,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/fwd/core/fvar.hpp:42:8: note: stan::math::fvar<stan::math::fvar<double> >& stan::math::fvar<stan::math::fvar<double> >::operator=(const stan::math::fvar<stan::math::fvar<double> >&)
 struct fvar {
        ^
./stan/math/fwd/core/fvar.hpp:42:8: note:   no known conversion for argument 1 from 'size_t {aka long long unsigned int}' to 'const stan::math::fvar<stan::math::fvar<double> >&'
test/unit/math/fwd/mat/fun/assign_test.cpp: In member function 'virtual void AgradFwdMatrixAssign_vector_vector_vector_fvar_fvar_double_Test::TestBody()':
test/unit/math/fwd/mat/fun/assign_test.cpp:460:20: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<stan::math::fvar<stan::math::fvar<double> > > >::value_type {aka stan::math::fvar<stan::math::fvar<double> >}' and 'size_t {aka long long unsigned int}')
         x[k][i][j] = (i + 1) * (j - 10) * (20 * k + 100);
                    ^
test/unit/math/fwd/mat/fun/assign_test.cpp:460:20: note: candidate is:
In file included from ./stan/math/fwd/core.hpp:4:0,
                 from ./stan/math/fwd/mat.hpp:4,
                 from test/unit/math/fwd/mat/fun/assign_test.cpp:1:
./stan/math/fwd/core/fvar.hpp:42:8: note: stan::math::fvar<stan::math::fvar<double> >& stan::math::fvar<stan::math::fvar<double> >::operator=(const stan::math::fvar<stan::math::fvar<double> >&)
 struct fvar {

And many more, full output in the attached file.error.txt (31.5 KB)

Thanks. I’ll try to tackle this in the next few days. I’ll send periodic updates. Mind if I ask you to confirm if changes work as I get them going?

Yes, that’s totally OK, will try to have reasonable response times.

For completness I am working on a clean math develop checkout, the only change is that I added make/local with

CC=g++

I managed to reproduce this error.

Casting the RHS to double in lines 430, 460 and 496 like this

x[i][j] = (double)(i + 1) * (j - 10);

fixes this issue for this test.

As to why this helps, I have less of an idea.

The same problem then arises in fwd/mat/fun/get_base1_lhs_test.cpp

1 Like

Thanks! That narrows it down a lot.

One more bit of info if it helps.

I guess the second long in the index types gives the g++ a headache. If i and j are not defined as size_t (long long unsigned int) but are instead defined as long unsigned int or something else, there are no issues.