BIC-MNI / minc-toolkit-v2

Version 2 of the minc-toolkit, uses tools based on ITK version 4.x
GNU General Public License v3.0
48 stars 21 forks source link

Make error with Windows Linux Subsystem in OpenBLAS Ubuntu 20.04.06 LTS #168

Closed egarza closed 3 months ago

egarza commented 3 months ago

Hi,

I'm trying to make install and I keep getting an error from Open-BLAS.


  Compiling getarch_2nd failed Change Dir:
  '/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build/CMakeFiles/CMakeTmp'

  Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/make
  -f Makefile cmTC_42907/fast

  make[3]: Entering directory
  '/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build/CMakeFiles/CMakeTmp'

  /usr/bin/make -f CMakeFiles/cmTC_42907.dir/build.make
  CMakeFiles/cmTC_42907.dir/build

  make[4]: Entering directory
  '/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_42907.dir/getarch_2nd.c.o

  /usr/bin/cc -fPIC -march=native -DGEMM_MULTITHREAD_THRESHOLD=4
  -DNO_PARALLEL_MAKE=0
  -I/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build
  -I"/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS"
  -I"/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build" -o
  CMakeFiles/cmTC_42907.dir/getarch_2nd.c.o -c
  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c: In function
  ‘main’:

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:12:35: error:
  ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
  you mean ‘XGEMM_DEFAULT_UNROLL_M’?

     12 |     printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   XGEMM_DEFAULT_UNROLL_M

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:12:35: note: each
  undeclared identifier is reported only once for each function it appears in

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:13:35: error:
  ‘SGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
  you mean ‘QGEMM_DEFAULT_UNROLL_N’?

     13 |     printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   QGEMM_DEFAULT_UNROLL_N

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:14:35: error:
  ‘DGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
  you mean ‘XGEMM_DEFAULT_UNROLL_M’?

     14 |     printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   XGEMM_DEFAULT_UNROLL_M

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:15:35: error:
  ‘DGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
  you mean ‘QGEMM_DEFAULT_UNROLL_N’?

     15 |     printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   QGEMM_DEFAULT_UNROLL_N

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:19:35: error:
  ‘CGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
  you mean ‘XGEMM_DEFAULT_UNROLL_M’?

     19 |     printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   XGEMM_DEFAULT_UNROLL_M

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:20:35: error:
  ‘CGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
  you mean ‘QGEMM_DEFAULT_UNROLL_N’?

     20 |     printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   QGEMM_DEFAULT_UNROLL_N

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:21:35: error:
  ‘ZGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
  you mean ‘XGEMM_DEFAULT_UNROLL_M’?

     21 |     printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   XGEMM_DEFAULT_UNROLL_M

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:22:35: error:
  ‘ZGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
  you mean ‘QGEMM_DEFAULT_UNROLL_N’?

     22 |     printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
        |                                   ^~~~~~~~~~~~~~~~~~~~~~
        |                                   QGEMM_DEFAULT_UNROLL_N

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:69:50: error:
  ‘SGEMM_DEFAULT_Q’ undeclared (first use in this function)

     69 |     printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
        |                                                  ^~~~~~~~~~~~~~~

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:70:50: error:
  ‘DGEMM_DEFAULT_Q’ undeclared (first use in this function)

     70 |     printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
        |                                                  ^~~~~~~~~~~~~~~

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:71:50: error:
  ‘CGEMM_DEFAULT_Q’ undeclared (first use in this function)

     71 |     printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
        |                                                  ^~~~~~~~~~~~~~~

  /mnt/d/apps/minc-toolkit-v2/build/OpenBLAS/getarch_2nd.c:72:50: error:
  ‘ZGEMM_DEFAULT_Q’ undeclared (first use in this function)

     72 |     printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 *  sizeof(double)));
        |                                                  ^~~~~~~~~~~~~~~

  make[4]: *** [CMakeFiles/cmTC_42907.dir/build.make:78:
  CMakeFiles/cmTC_42907.dir/getarch_2nd.c.o] Error 1

  make[4]: Leaving directory
  '/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build/CMakeFiles/CMakeTmp'

  make[3]: *** [Makefile:127: cmTC_42907/fast] Error 2

  make[3]: Leaving directory
  '/mnt/d/apps/minc-toolkit-v2/build/OpenBLAS-build/getarch2_build/CMakeFiles/CMakeTmp'

Call Stack (most recent call first):
  cmake/system.cmake:157 (include)
  CMakeLists.txt:67 (include)```

I made all the steps as usual, but I'm unsure what the problem is. Seems the TARGET is not recognizing the CPU?
The rest of the steps seem to be fine.

Let me know if you need more information.

Thanks,

Eduardo
vfonov commented 3 months ago

Unfortunately, can't verify - don't have a windows machine at the moment. Perhaps updating OpenBLAS would help?

gdevenyi commented 3 months ago

Ed, you can use NeuroAnsibke https://github.com/gdevenyi/NeuroAnsible on WSL as well since it's just Ubuntu.

Otherwise, you can just download and install the DEB files from bic-mni.github.io

egarza commented 3 months ago

Thanks, Gabe. I'll try it.