kokkos / kokkos-tutorials

Tutorials for the Kokkos C++ Performance Portability Programming Ecosystem
https://kokkos.org
Other
298 stars 100 forks source link

miniMD [tools_minimd] case can not compile: with -mavx =sm_70 #100

Closed particleflow-dev closed 3 months ago

particleflow-dev commented 3 months ago

[tools_minimd]$ make g++ -O3 -g -I./MPI-Stubs -DKOKKOSP_ENABLE_PROFILING -DPRECISION=2 -I./ -I/home/dao/Kokkos/kokkos/core/src -I/home/dao/Kokkos/kokkos/containers/src -I/home/dao/Kokkos/kokkos/algorithms/src -I/home/dao/Kokkos/kokkos/tpls/desul/include -I/home/dao/Kokkos/kokkos/tpls/mdspan/include -std=c++17 -mavx =sm_70 -fopenmp -I./ -I/home/dao/Kokkos/kokkos/core/src -I/home/dao/Kokkos/kokkos/containers/src -I/home/dao/Kokkos/kokkos/algorithms/src -I/home/dao/Kokkos/kokkos/tpls/desul/include -I/home/dao/Kokkos/kokkos/tpls/mdspan/include -c input.cpp g++: warning: =sm_70: linker input file unused because linking not done g++: error: =sm_70: linker input file not found: No such file or directory make: *** [Makefile:124: input.o] Error 1

what is the option: -mavx =sm_70?

masterleinad commented 3 months ago

Are you using cmake? If not, I would recommend that over the Makefile since it doesn't assume a particular architecture.

particleflow-dev commented 3 months ago

Aha, thanks a lot. cmake did work.

$ mkdir build
$ cd build
$ cmake ..
$ make