Closed Asohamithran closed 1 year ago
Hi, thank you for trying out Spirit! Apparently CMake introduced a new policy in version 3.18, which changes the treatment of the cuda architecture. As a temporary fix, until we address this in a commit, this should work for you:
In the root spirit folder:
CMakeLists.txt
and right at the top paste in this line: cmake_policy( SET CMP0104 OLD )
./clean.sh
script In the build folder:
cmake -DSPIRIT_USE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda ..
make
[ashok@ashok build]$ make
Scanning dependencies of target qhull
[ 1%] Creating directories for 'qhull'
[ 2%] No download step for 'qhull'
[ 3%] No update step for 'qhull'
[ 3%] No patch step for 'qhull'
[ 4%] Performing configure step for 'qhull'
loading initial cache file /home/ashok/spirit/build/qhull-prefix/tmp/qhull-cache-Release.cmake
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:64 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Check size of off_t
-- Check size of off_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for ftello
-- Looking for ftello - found
-- Looking for PRIdMAX
-- Looking for PRIdMAX - found
--
-- ========== qhull Build Information ==========
-- Build Version: 7.2.0
-- Install Prefix (CMAKE_INSTALL_PREFIX): /home/ashok/spirit/build/thirdparty-install
-- Binary Directory (BIN_INSTALL_DIR): /home/ashok/spirit/build/thirdparty-install/bin
-- Library Directory (LIB_INSTALL_DIR): /home/ashok/spirit/build/thirdparty-install/lib
-- Include Directory (INCLUDE_INSTALL_DIR): /home/ashok/spirit/build/thirdparty-install/include
-- Documentation Directory (DOC_INSTALL_DIR): /home/ashok/spirit/build/thirdparty-install/share/doc/qhull
-- Man Pages Directory (MAN_INSTALL_DIR): /home/ashok/spirit/build/thirdparty-install/share/man/man1
-- Build Type (CMAKE_BUILD_TYPE):
-- To override these options, add -D{OPTION_NAME}=... to the cmake command
-- Build the debug targets -DCMAKE_BUILD_TYPE=Debug
--
-- To build and install qhull, enter "make" and "make install"
-- To smoketest qhull, enter "ctest"
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ashok/spirit/build/thirdparty-build/qhull
[ 5%] Performing build step for 'qhull'
Scanning dependencies of target qhullstatic
[ 1%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/global.c.o
[ 2%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/stat.c.o
[ 4%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/geom2.c.o
[ 5%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/poly2.c.o
[ 7%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/merge.c.o
[ 8%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/libqhull.c.o
[ 10%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/geom.c.o
[ 11%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/poly.c.o
[ 13%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/qset.c.o
[ 14%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/mem.c.o
[ 16%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/random.c.o
[ 17%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/usermem.c.o
[ 19%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/userprintf.c.o
[ 20%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/io.c.o
[ 22%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/user.c.o
[ 23%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/rboxlib.c.o
[ 25%] Building C object CMakeFiles/qhullstatic.dir/src/libqhull/userprintf_rbox.c.o
[ 26%] Linking C static library libqhullstatic.a
[ 26%] Built target qhullstatic
Scanning dependencies of target qhullstatic_r
[ 27%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/global_r.c.o
[ 29%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/stat_r.c.o
[ 30%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/geom2_r.c.o
[ 32%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/poly2_r.c.o
[ 33%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/merge_r.c.o
[ 35%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/libqhull_r.c.o
[ 36%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/geom_r.c.o
[ 38%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/poly_r.c.o
[ 39%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/qset_r.c.o
[ 41%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/mem_r.c.o
[ 42%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/random_r.c.o
[ 44%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/usermem_r.c.o
[ 45%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/userprintf_r.c.o
[ 47%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/io_r.c.o
[ 48%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/user_r.c.o
[ 50%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/rboxlib_r.c.o
[ 51%] Building C object CMakeFiles/qhullstatic_r.dir/src/libqhull_r/userprintf_rbox_r.c.o
[ 52%] Linking C static library libqhullstatic_r.a
[ 52%] Built target qhullstatic_r
Scanning dependencies of target qhullcpp
[ 54%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/Coordinates.cpp.o
[ 55%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/PointCoordinates.cpp.o
[ 57%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/Qhull.cpp.o
[ 58%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullFacet.cpp.o
[ 60%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullFacetList.cpp.o
[ 61%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullFacetSet.cpp.o
[ 63%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullHyperplane.cpp.o
[ 64%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullPoint.cpp.o
[ 66%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullPointSet.cpp.o
[ 67%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullPoints.cpp.o
[ 69%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullQh.cpp.o
[ 70%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullRidge.cpp.o
[ 72%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullSet.cpp.o
[ 73%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullStat.cpp.o
[ 75%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullVertex.cpp.o
[ 76%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/QhullVertexSet.cpp.o
[ 77%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/RboxPoints.cpp.o
[ 79%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/RoadError.cpp.o
[ 80%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/RoadLogEvent.cpp.o
[ 82%] Linking CXX static library libqhullcpp.a
[ 82%] Built target qhullcpp
Scanning dependencies of target qdelaunay
[ 83%] Building C object CMakeFiles/qdelaunay.dir/src/qdelaunay/qdelaun.c.o
[ 85%] Linking C executable qdelaunay
[ 85%] Built target qdelaunay
Scanning dependencies of target rbox
[ 86%] Building C object CMakeFiles/rbox.dir/src/rbox/rbox.c.o
[ 88%] Linking C executable rbox
[ 88%] Built target rbox
Scanning dependencies of target qconvex
[ 89%] Building C object CMakeFiles/qconvex.dir/src/qconvex/qconvex.c.o
[ 91%] Linking C executable qconvex
[ 91%] Built target qconvex
Scanning dependencies of target qvoronoi
[ 92%] Building C object CMakeFiles/qvoronoi.dir/src/qvoronoi/qvoronoi.c.o
[ 94%] Linking C executable qvoronoi
[ 94%] Built target qvoronoi
Scanning dependencies of target qhalf
[ 95%] Building C object CMakeFiles/qhalf.dir/src/qhalf/qhalf.c.o
[ 97%] Linking C executable qhalf
[ 97%] Built target qhalf
Scanning dependencies of target qhull
[ 98%] Building C object CMakeFiles/qhull.dir/src/qhull/unix_r.c.o
[100%] Linking C executable qhull
[100%] Built target qhull
[ 5%] Performing install step for 'qhull'
[ 26%] Built target qhullstatic
[ 52%] Built target qhullstatic_r
[ 82%] Built target qhullcpp
[ 85%] Built target qdelaunay
[ 88%] Built target rbox
[ 91%] Built target qconvex
[ 94%] Built target qvoronoi
[ 97%] Built target qhalf
[100%] Built target qhull
Install the project...
-- Install configuration: ""
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/libqhull.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/geom.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/io.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/mem.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/merge.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/poly.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qhull_a.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qset.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/random.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/stat.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/user.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/index.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-geom.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-globa.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-io.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-mem.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-merge.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-poly.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-qhull.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-set.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-stat.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/qh-user.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull/DEPRECATED.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/libqhull_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/geom_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/io_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/mem_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/merge_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/poly_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qhull_ra.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qset_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/random_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/stat_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/user_r.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/index.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-geom_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-globa_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-io_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-mem_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-merge_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-poly_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-qhull_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-set_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-stat_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhull_r/qh-user_r.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/Coordinates.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/functionObjects.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/PointCoordinates.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/Qhull.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullError.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacet.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacetList.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacetSet.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullHyperplane.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullIterator.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullLinkedList.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullPoint.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullPoints.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullPointSet.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullQh.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullRidge.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullSet.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullSets.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullStat.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullVertex.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullVertexSet.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/RboxPoints.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/RoadError.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/RoadLogEvent.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/RoadTest.h
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/man/man1/qhull.1
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/man/man1/rbox.1
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/README.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/REGISTER.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/Announce.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/COPYING.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/index.htm
-- Up-to-date: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optf.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qvoron_f.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-eg.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-impre.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-quick.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--half.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--dt.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qhalf.htm
-- Up-to-date: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/index.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--rand.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qhull.man
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qhull.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/normal_voronoi_knauss_oesterle.jpg
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-code.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/rbox.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qhull-cpp.xml
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-faq.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optg.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-get.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optt.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qdelaun.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qdelau_f.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optc.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/rbox.man
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--cone.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-opto.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/rbox.txt
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qvoronoi.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optq.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qconvex.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--geom.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh--4d.gif
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qh-optp.htm
-- Installing: /home/ashok/spirit/build/thirdparty-install/share/doc/qhull/qhull.txt
[ 6%] Completed 'qhull'
[ 6%] Built target qhull
Scanning dependencies of target ovf
[ 7%] Building CXX object core/thirdparty/ovf/CMakeFiles/ovf.dir/src/ovf.cpp.o
[ 7%] Built target ovf
Scanning dependencies of target ovf_static
[ 8%] Linking CXX static library libovf_static.a
[ 8%] Built target ovf_static
Scanning dependencies of target Spirit
[ 8%] Building CUDA object core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o
/home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacet.h(71): warning #68-D: integer conversion resulted in a change of sign
/home/ashok/spirit/core/src/data/Geometry.cpp(461): warning #177-D: variable "atom_type" was declared but never referenced
/home/ashok/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacet.h(71): warning #68-D: integer conversion resulted in a change of sign
/home/ashok/spirit/core/include/engine/Vectormath.hpp(511): internal error: assertion failed: gen_initializer_constant: ran out of fields (cp_gen_be.c, line 7109 in gen_initializer_constant)
**1 catastrophic error detected in the compilation of "/home/ashok/spirit/core/src/data/Geometry.cpp".**
**Compilation aborted.**
**nvcc error : 'cudafe++' died due to signal 6**
**nvcc error : 'cudafe++' core dumped**
**make[2]: *** [core/CMakeFiles/Spirit.dir/build.make:82: core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o] Error 134**
**make[1]: *** [CMakeFiles/Makefile2:529: core/CMakeFiles/Spirit.dir/all] Error 2**
**make: *** [Makefile:182: all] Error 2**
The only related issues I could find are these:
Both are quite old and the issue should be fixed long ago, since CUDA 6.5 or so... Could it be that it is trying to compile in C mode instead of C++ mode? That might explain why this template won't work.
@Asohamithran please try the previous release of Spirit, v2.0.1. If that version works, it could help to narrow down the cause of your issue.
I have tried to revert to version v2.0.1 but $ cmake ..
throws error during core build compilation. I don't know if this is the proper way to build the previous version?
[ashok@ashok spirit-2.0.1]$ mkdir build
[ashok@ashok spirit-2.0.1]$ cd build
[ashok@ashok build]$ cmake ..
-- >> Setting build type to 'Release' as none was specified.
-- >> -------------------------------------------------------------------- <<
-- >> --------------------- ChooseCompiler.cmake ------------------------- <<
-- >> CMAKE_C_COMPILER:
-- >> CMAKE_CXX_COMPILER:
-- >> --------------------- ChooseCompiler.cmake done -------------------- <<
-- >> -------------------------------------------------------------------- <<
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- >> Please check the CMAKE_CXX_COMPILER to make sure it's the right one
-- >> CMAKE_C_COMPILER: /usr/bin/cc
-- >> CMAKE_CXX_COMPILER: /usr/bin/c++
-- >> -------------------------------------------------------------------- <<
-- >> --------------------- Platforms.cmake ------------------------------ <<
-- >> We are on the platform: UNIX
-- >> --------------------- Platforms.cmake done ------------------------- <<
-- >> -------------------------------------------------------------------- <<
-- >> -------------------------------------------------------------------- <<
-- >> ------------------ GlobalCompilerFlags.cmake ----------------------- <<
-- >> Chose compiler: gcc
-- >> CMAKE_CXX_COMPILER_ID: GNU
-- >> CMAKE_CXX_FLAGS:
-- >> CMAKE_EXE_LINKER_FLAGS:
-- >> ------------------ GlobalCompilerFlags.cmake done ------------------ <<
-- >> -------------------------------------------------------------------- <<
-- >> -------------------------------------------------------------------- <<
-- >> --------------------- Spirit --------------------------------------- <<
-- >> Spirit core: Did not need to set build type, using: Release
CMake Error: File /home/ashok/.git/packed-refs does not exist.
CMake Error at build/core/CMakeFiles/git-data/grabRef.cmake:31 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
core/CMake/GetGitRevisionDescription.cmake:85 (include)
core/CMakeLists.txt:96 (get_git_head_revision)
CMake Error at build/core/CMakeFiles/git-data/grabRef.cmake:32 (file):
file failed to open for reading (No such file or directory):
/home/ashok/spirit-2.0.1/build/core/CMakeFiles/git-data/packed-refs
Call Stack (most recent call first):
core/CMake/GetGitRevisionDescription.cmake:85 (include)
core/CMakeLists.txt:96 (get_git_head_revision)
CMake Error at build/core/CMakeFiles/git-data/grabRef.cmake:45 (file):
file failed to open for reading (No such file or directory):
/home/ashok/spirit-2.0.1/build/core/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
core/CMake/GetGitRevisionDescription.cmake:85 (include)
core/CMakeLists.txt:96 (get_git_head_revision)
CMake Warning at core/CMakeLists.txt:123 (project):
VERSION keyword not followed by a value or was followed by a value that
expanded to nothing.
-- >> -------------------------------------------------------------------- <<
-- >> ------------------ Spirit CompilerFlags.cmake ---------------------- <<
-- >> Chose compiler: gcc
-- >> CMAKE_CXX_COMPILER_ID: GNU
-- >> CMAKE_CXX_FLAGS: -std=c++11
-- >> CMAKE_EXE_LINKER_FLAGS:
-- >> ------------------ Spirit CompilerFlags.cmake done ----------------- <<
-- >> -------------------------------------------------------------------- <<
-- >> Compiler information: GNU (10.2.0)
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Found FFTW: /usr/include
-- >> Using FFTW
-- >> Using FFT lib: /usr/lib/libfftw3.so
-- >> With include dirs: /usr/include
-- >> Building static cxx library Spirit_static
-- >> Building shared library for Python
-- >> Building unit tests for Spirit
-- >> Setting up unit tests for python bindings
-- Found PythonInterp: /usr/bin/python (found version "3.9.1")
-- >> --------------------- Spirit done ---------------------------------- <<
-- >> CMake CXX Flags: -std=c++11
-- >> -------------------------------------------------------------------- <<
-- >> -------------------------------------------------------------------- <<
-- >> --------------------- UI - CPP ------------------------------------- <<
-- >> Please check the CMAKE_PREFIX_PATH to make sure QT5 is found
-- >> CMAKE_PREFIX_PATH: /usr/local/qt5/
-- >> QT version: 5.15.2
-- >> Found QT at: /usr/lib64/cmake/Qt5
-- Asking qmake for QT_PLUGINS_DIR and got /usr/lib/qt/plugins
-- Asking qmake for QT_IMPORTS_DIR and got /usr/lib/qt/imports
-- Asking qmake for QT_DATA_DIR and got /usr/lib/qt
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- >> --------------------- UI - CPP done -------------------------------- <<
-- >> -------------------------------------------------------------------- <<
-- Configuring incomplete, errors occurred!
See also "/home/ashok/spirit-2.0.1/build/CMakeFiles/CMakeOutput.log".
See also "/home/ashok/spirit-2.0.1/build/CMakeFiles/CMakeError.log".
Attatched: CMakeOutput.log and CMakeError.log files CMakeError.log CMakeOutput.log
No idea why that error would occur, I have not seen that before...
Did you remove the build folder by calling ./clean.sh
or rm -rf build
before trying to configure?
I have both spirit current release and version 2.0.1 in my system. I have deleted the 'build' directory in the current release and now trying to build version 2.0.1. Yes I have run ./clean.sh
before configure.
Please try using the executable in this zip https://github.com/spirit-code/spirit/suites/1794914117/artifacts/34399360 Not sure it will work, since it is built for Ubuntu and some system dpendencies may be missing, but it might...
Were you trying to build Spirit on WSL2? I got the same error. But it works fine for the real linux system.
@zangyuzhe No, I am using Manjaro and I couldn't get spirit v2.0.1 to install.
@GPMueller Thank you for your patience, The executable from the zip(v2.1.0) works fine, I am running mc.py
but the log file shows not using CUDA
How do I enable CUDA in this version? I don't see any CMake folder
@Asohamithran I'm afraid I currently cannot figure out how to provide working cuda builds. If you wish to debug your compilation problem further, you could call make VERBOSE=1
instead of just make
from inside the build folder. That will give you the exact compilation commands, with which you could try to figure out what exactly is causing cudafe++
to crash.
I'm only guessing, but you might be able to change whatever cuda does not like about the function declaration of Vectormath::change_dimensions
, maybe replacing std::array<int,3> shift = std::array<int,3>{0,0,0}
with std::array<int,3> shift
has an effect?.
Dear @Asohamithran did you maybe make any progress with your issue? I just realized you could try to remove these lines from core/CMakeLists.txt:
#----- Get git revision
include( GetGitRevisionDescription )
get_git_head_revision( GIT_REFSPEC GIT_SHA1 )
string( SUBSTRING "${GIT_SHA1}" 0 13 GIT_REV )
That should avoid the cmake error you had here and allow you to build.
Dear @GPMueller Thank you for the suggestion I have sort of given up on the issue and have been using spirit without Cuda
for the past month. On modifying core/CMakeLists.txt
now I can build v2.0.1
's core build but the issue persists when I try to activate the cuda backend support. I have tried modifying the
vectormath::change_dimensions but Geometry.cpp
fails to compile. The issue is not version-specific.
spirit/build >> make VERBOSE=1
/usr/bin/cmake -S/home/ashok/spirit_2.0.1/spirit -B/home/ashok/spirit_2.0.1/spirit/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/ashok/spirit_2.0.1/spirit/build/CMakeFiles /home/ashok/spirit_2.0.1/spirit/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
make -f CMakeFiles/qhull.dir/build.make CMakeFiles/qhull.dir/depend
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
cd /home/ashok/spirit_2.0.1/spirit/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ashok/spirit_2.0.1/spirit /home/ashok/spirit_2.0.1/spirit /home/ashok/spirit_2.0.1/spirit/build /home/ashok/spirit_2.0.1/spirit/build /home/ashok/spirit_2.0.1/spirit/build/CMakeFiles/qhull.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make -f CMakeFiles/qhull.dir/build.make CMakeFiles/qhull.dir/build
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
make[2]: Nothing to be done for 'CMakeFiles/qhull.dir/build'.
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
[ 6%] Built target qhull
make -f core/thirdparty/ovf/CMakeFiles/ovf.dir/build.make core/thirdparty/ovf/CMakeFiles/ovf.dir/depend
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
cd /home/ashok/spirit_2.0.1/spirit/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ashok/spirit_2.0.1/spirit /home/ashok/spirit_2.0.1/spirit/core/thirdparty/ovf /home/ashok/spirit_2.0.1/spirit/build /home/ashok/spirit_2.0.1/spirit/build/core/thirdparty/ovf /home/ashok/spirit_2.0.1/spirit/build/core/thirdparty/ovf/CMakeFiles/ovf.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make -f core/thirdparty/ovf/CMakeFiles/ovf.dir/build.make core/thirdparty/ovf/CMakeFiles/ovf.dir/build
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
make[2]: Nothing to be done for 'core/thirdparty/ovf/CMakeFiles/ovf.dir/build'.
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
[ 7%] Built target ovf
make -f core/thirdparty/ovf/CMakeFiles/ovf_static.dir/build.make core/thirdparty/ovf/CMakeFiles/ovf_static.dir/depend
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
cd /home/ashok/spirit_2.0.1/spirit/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ashok/spirit_2.0.1/spirit /home/ashok/spirit_2.0.1/spirit/core/thirdparty/ovf /home/ashok/spirit_2.0.1/spirit/build /home/ashok/spirit_2.0.1/spirit/build/core/thirdparty/ovf /home/ashok/spirit_2.0.1/spirit/build/core/thirdparty/ovf/CMakeFiles/ovf_static.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make -f core/thirdparty/ovf/CMakeFiles/ovf_static.dir/build.make core/thirdparty/ovf/CMakeFiles/ovf_static.dir/build
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
make[2]: Nothing to be done for 'core/thirdparty/ovf/CMakeFiles/ovf_static.dir/build'.
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
[ 8%] Built target ovf_static
make -f core/CMakeFiles/Spirit.dir/build.make core/CMakeFiles/Spirit.dir/depend
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
cd /home/ashok/spirit_2.0.1/spirit/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/ashok/spirit_2.0.1/spirit /home/ashok/spirit_2.0.1/spirit/core /home/ashok/spirit_2.0.1/spirit/build /home/ashok/spirit_2.0.1/spirit/build/core /home/ashok/spirit_2.0.1/spirit/build/core/CMakeFiles/Spirit.dir/DependInfo.cmake --color=
Dependencies file "core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o.d" is newer than depends file "/home/ashok/spirit_2.0.1/spirit/build/core/CMakeFiles/Spirit.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target Spirit
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make -f core/CMakeFiles/Spirit.dir/build.make core/CMakeFiles/Spirit.dir/build
make[2]: Entering directory '/home/ashok/spirit_2.0.1/spirit/build'
[ 8%] Building CUDA object core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o
cd /home/ashok/spirit_2.0.1/spirit/build/core && /opt/cuda/bin/nvcc -forward-unknown-to-host-compiler -DFMT_HEADER_ONLY -DSPIRIT_USE_CUDA -I/home/ashok/spirit_2.0.1/spirit/build/thirdparty-install/include -I/home/ashok/spirit_2.0.1/spirit/build/thirdparty-install/include/libqhullcpp -I/home/ashok/spirit_2.0.1/spirit/core/include -I/home/ashok/spirit_2.0.1/spirit/core/thirdparty -I/home/ashok/spirit_2.0.1/spirit/core/thirdparty/ovf/include -I/home/ashok/spirit_2.0.1/spirit/core/thirdparty/spectra/include -lineinfo -arch=sm_60 --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe="--diag_suppress=esa_on_defaulted_function_ignored" -Xcudafe "--display_error_number" -O3 -DNDEBUG -Xcompiler=-fPIC -std=c++11 -MD -MT core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o -MF CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o.d -x cu -c /home/ashok/spirit_2.0.1/spirit/core/src/data/Geometry.cpp -o CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o
/home/ashok/spirit_2.0.1/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacet.h(71): warning #68-D: integer conversion resulted in a change of sign
/home/ashok/spirit_2.0.1/spirit/core/src/data/Geometry.cpp(461): warning #177-D: variable "atom_type" was declared but never referenced
/home/ashok/spirit_2.0.1/spirit/core/include/engine/Vectormath.hpp(530): error: identifier "shift" is undefined
/home/ashok/spirit_2.0.1/spirit/build/thirdparty-install/include/libqhullcpp/QhullFacet.h(71): warning #68-D: integer conversion resulted in a change of sign
1 error detected in the compilation of "/home/ashok/spirit_2.0.1/spirit/core/src/data/Geometry.cpp".
make[2]: *** [core/CMakeFiles/Spirit.dir/build.make:76: core/CMakeFiles/Spirit.dir/src/data/Geometry.cpp.o] Error 2
make[2]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make[1]: *** [CMakeFiles/Makefile2:466: core/CMakeFiles/Spirit.dir/all] Error 2
make[1]: Leaving directory '/home/ashok/spirit_2.0.1/spirit/build'
make: *** [Makefile:166: all] Error 2```
@Asohamithran hello, are you able to enable CUDA for speedup in the end? I am facing the same issue and trying to figure out a solution. I am wondering that if we don't have the GPU speedup, the simulation speed will be very slow.
@sqml-ust can you list here what system you are getting this error on?
For reference, @Asohamithran's error was on
I have been using manjaro for a year but facing a lot of dependency issues when using make
. I have installed Ubuntu 20.04 LTS yesterday I will reinstall to check if its distro-specific .
@GPMueller Thank you so much for your attention. My system is: OS: Ubuntu 64-bit Kernel: Ubuntu 20.10 CPU: ntel® Core™ i7-9700 CPU @ 3.00GHz × 8 GPU: VIDIA Corporation TU104 [GeForce RTX 2080 SUPER] gcc version 10.2.0 (GCC) nvcc -version = Cuda compilation tools, release 11.2, V11.2.152
Do you mean that only for specific systems, there is a problem? For many other systems, it is ok? Could you kindly let me know what systems do you normally see people are installing this spirit on? Thank you.
Another naive question I have is the following. On your front page of this github package, you said: "To install the Spirit python package, either build and install from source (Unix/OSX, Windows) or simply use pip install spirit With this package you have access to powerful Python APIs to run and control dynamics simulations or optimizations. This is especially useful for work on clusters, where you can now script your workflow, never having to re-compile when testing, debugging or adding features." So, I guess that I don't need to build? However, I have installed the package and run the example: "from spirit import state, simulation with state.State("input/input.cfg") as p_state: simulation.start(p_state, simulation.METHOD_LLG, simulation.SOLVER_SIB)" But the CUDA and GPU are not used. If I don't need GUI and just want to use python to interact with the spirit package, how could I enable CUDA and GPU?
Indeed, we never had problems on Ubuntu18 (on Ubuntu 16 you had to make sure to get cuda > 8 I think) and I used to run an Arch-Linux system 3 years ago...
I can still compile fine on Ubuntu 20.04 with cuda 10.1.243 and gcc 9.3.0, so the issue might be related to you both using gcc-10 and cuda-11... There is sometimes weird breakages between Eigen and cuda, so you could try updating Eigen to the latest version (just copy-paste the sources over those in core/thirdparty/Eigen). Sorry but I don't currently have time to try and reproduce this issue myself.
@sqml-ust please open new issues for topics unrelated to the one in this issue.
@GPMueller Thank you for your suggestions. I will try to copy and paste the lastest Eigen into core/thirdparty/Eigen
Dear @sqml-ust and @Asohamithran, did you finally have any success? And if so, do you remember your path to a solution, more than a year later? 😄
Since this thread has not been active in a while, I would suggest closing it unless there are any new insights. Note that the CUDA builds on our CI appear to be working.
Hi I have been trying to enable CUDA support in my spirit installation. Following the build instructions on Unix, I get the following error message.
I tried running 'mc.py' but the log files says "NOT using CUDA backend" but the program runs.
System specifications :
I am a linux noob , help me to sort out the issue