VictorEijkhout / diff2d_benchmark

MIT License
1 stars 1 forks source link

Build issues #1

Open jedbrown opened 4 months ago

jedbrown commented 4 months ago

I'm trying to follow instructions in the README:

$ make compile VARIANTS='seq oned'
Making variant seq
Variable CXX_COMPILER not set
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: options.o] Error 1
make[2]: *** [../../../makefiles/Make.compile:327: seq.o] Error 1
make[1]: *** [../Make.depend:32: ../lib/options.o] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [../Make.depend:24: ../lib/seq.o] Error 2
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: base.o] Error 1
make[1]: *** [../Make.depend:28: ../lib/base.o] Error 2
Making variant oned
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: base.o] Error 1
make[1]: *** [../Make.depend:28: ../lib/base.o] Error 2
make[1]: *** Waiting for unfinished jobs....
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: oned.o] Error 1
make[1]: *** [../Make.depend:24: ../lib/oned.o] Error 2
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: options.o] Error 1
make[1]: *** [../Make.depend:32: ../lib/options.o] Error 2
See: compile.log
ls: cannot access 'seq/diff2d': No such file or directory
ls: cannot access 'oned/diff2d': No such file or directory
make: *** [Makefile:27: compile] Error 2

Okay, let's try specifying a compiler (g++ 14.1.1)

$make compile VARIANTS='seq oned' CXX_COMPILER=g++
Making variant seq
In file included from base.cpp:11:
base.hpp:27:10: fatal error: mdspan/mdspan.hpp: No such file or directory
   27 | #include "mdspan/mdspan.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../makefiles/Make.compile:328: base.o] Error 1
make[1]: *** [../Make.depend:28: ../lib/base.o] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from seq.hpp:17,
                 from seq.cpp:16:
base.hpp:27:10: fatal error: mdspan/mdspan.hpp: No such file or directory
   27 | #include "mdspan/mdspan.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../makefiles/Make.compile:328: seq.o] Error 1
make[1]: *** [../Make.depend:24: ../lib/seq.o] Error 2

Making variant oned
In file included from base.cpp:11:
base.hpp:27:10: fatal error: mdspan/mdspan.hpp: No such file or directory
   27 | #include "mdspan/mdspan.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../makefiles/Make.compile:328: base.o] Error 1
make[1]: *** [../Make.depend:28: ../lib/base.o] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from oned.hpp:17,
                 from oned.cpp:17:
base.hpp:27:10: fatal error: mdspan/mdspan.hpp: No such file or directory
   27 | #include "mdspan/mdspan.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../makefiles/Make.compile:328: oned.o] Error 1
make[1]: *** [../Make.depend:24: ../lib/oned.o] Error 2
See: compile.log
ls: cannot access 'seq/diff2d': No such file or directory
ls: cannot access 'oned/diff2d': No such file or directory
make: *** [Makefile:27: compile] Error 2

I tried setting MDSPAN_INC, but that doesn't work from the general make targets. I tried running cmake manually, but that fails, as does

$ cmake -B build -S seq -DVARIANT=seq -DMDSPAN_INC=$HOME/src/kokkos/tpls/mdspan/include
--
====   Building variant: seq
--
====   setting backend
--
====   options handling
--
====   span handling
CMake Error at CMakeLists.txt:56 (find_package):
  By not providing "Findmdspan.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "mdspan", but
  CMake did not find one.

  Could not find a package configuration file provided by "mdspan" with any
  of the following names:

    mdspanConfig.cmake
    mdspan-config.cmake

  Add the installation prefix of "mdspan" to CMAKE_PREFIX_PATH or set
  "mdspan_DIR" to a directory containing one of the above files.  If "mdspan"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!

If the build is cleaned up with correct instructions, I can look into making the Rust implementation you asked for.

VictorEijkhout commented 4 months ago

Hey Jed, you're my first outsude user for what's so far a private project.

I've just learned about CMake fetch_content so I'll try to make it more bulletproof. Stand by.

VictorEijkhout commented 4 months ago

Ok, please try again. CMake should now install those packages for you.

I've updated the instructions in the README.

jedbrown commented 4 months ago

I think this mandatory variable should be documented, or just use a default when it's unset.

$ make compile VARIANTS="seq"
Making variant seq
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: seq.o] Error 1
make[1]: *** [../Make.depend:24: ../lib/seq.o] Error 2
make[1]: *** Waiting for unfinished jobs....
Variable CXX_COMPILER not set
make[2]: *** [../../../makefiles/Make.compile:327: base.o] Error 1
make[1]: *** [../Make.depend:28: ../lib/base.o] Error 2
See: compile.log
ls: cannot access 'seq/diff2d': No such file or directory
make: *** [Makefile:27: compile] Error 2

Now trying with CMake in hopes that it downloads stuff directly.

$ make cmake VARIANTS="seq"
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:6 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
make: *** [Makefile:40: cmake] Error 1

It appears that setting TACC_CXX (undocumented) is mandatory, but it still doesn't get me mdspan as promised.

$ make cmake VARIANTS="seq" TACC_CXX=g++
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
====   Building variant: seq
--
====   setting backend
--
====   options handling
--
====   span handling
CMake Error at CMakeLists.txt:56 (find_package):
  By not providing "Findmdspan.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "mdspan", but
  CMake did not find one.

  Could not find a package configuration file provided by "mdspan" with any
  of the following names:

    mdspanConfig.cmake
    mdspan-config.cmake

  Add the installation prefix of "mdspan" to CMAKE_PREFIX_PATH or set
  "mdspan_DIR" to a directory containing one of the above files.  If "mdspan"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
make: *** [Makefile:40: cmake] Error 1
VictorEijkhout commented 4 months ago

One more dependency on my local system removed. Could you try the cmake install again?

VictorEijkhout commented 4 months ago

OH, and I don't understand what the error is in the mdspan installation. Let's hope it's fixed with the latest commit.