Skip to content

Can’t compile the example

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8532
    hhan
    Participant

    I modify the config.mk file and use the cpu default setting. When i make a case, there are some errors message. I don’t know how to solve it. The errors message is following:
    (base) hhan@hhan:~/olb-1.7r0/examples/laminar/cavity3d$ make
    make -C ../../../external
    make[1]: Entering directory ‘/home/hhan/olb-1.7r0/external’
    make -C zlib
    make[2]: Entering directory ‘/home/hhan/olb-1.7r0/external/zlib’
    make[2]: Nothing to be done for ‘all’.
    make[2]: Leaving directory ‘/home/hhan/olb-1.7r0/external/zlib’
    cp zlib/build/libz.a lib/
    make -C tinyxml
    make[2]: Entering directory ‘/home/hhan/olb-1.7r0/external/tinyxml’
    make[2]: Nothing to be done for ‘all’.
    make[2]: Leaving directory ‘/home/hhan/olb-1.7r0/external/tinyxml’
    cp tinyxml/build/libtinyxml.a lib/
    make[1]: Leaving directory ‘/home/hhan/olb-1.7r0/external’
    make -C ../../.. core
    make[1]: Entering directory ‘/home/hhan/olb-1.7r0’
    make[1]: Nothing to be done for ‘core’.
    make[1]: Leaving directory ‘/home/hhan/olb-1.7r0′
    g++ -O3 -Wall -march=native -mtune=native -std=c++17 -pthread -DPLATFORM_CPU_SISD -DDEFAULT_FLOATING_POINT_TYPE=double -I../../../src -I../../../external/zlib -I../../../external/tinyxml -c -o cavity3d.o cavity3d.cpp
    g++ cavity3d.o -o cavity3d -lolbcore -L../../../external/lib -lpthread -lz -ltinyxml -L../../../build/lib
    /usr/bin/ld: ../../../build/lib/libolbcore.a(olbInit.o): in function `olb::olbInit(int*, char***, bool, bool)’:
    tmpxft_0000189d_00000000-6_olbInit.cudafe1.cpp:(.text+0x385): undefined reference to `void olb::checkPlatform<(olb::Platform)2>()’
    /usr/bin/ld: ../../../build/lib/libolbcore.a(olbInit.o): in function `__sti____cudaRegisterAll()’:
    tmpxft_0000189d_00000000-6_olbInit.cudafe1.cpp:(.text.startup+0x21): undefined reference to `__cudaRegisterLinkedBinary_870272bc_11_olbInit_cpp_2dd560cd’
    /usr/bin/ld: ../../../build/lib/libolbcore.a(ostreamManager.o): in function `__sti____cudaRegisterAll()’:
    tmpxft_000018c2_00000000-6_ostreamManager.cudafe1.cpp:(.text.startup+0x21): undefined reference to `__cudaRegisterLinkedBinary_423859f7_18_ostreamManager_cpp_9bae805e’
    /usr/bin/ld: ../../../build/lib/libolbcore.a(mpiManager.o): in function `__sti____cudaRegisterAll()’:
    tmpxft_0000185b_00000000-6_mpiManager.cudafe1.cpp:(.text.startup+0x21): undefined reference to `__cudaRegisterLinkedBinary_79a1df2e_14_mpiManager_cpp_aaf196a2′
    collect2: error: ld returned 1 exit status
    make: *** [../../../default.single.mk:38: cavity3d] Error 1

    Please help me, thank you!

    #8533
    Adrian
    Keymaster

    The problem is most likely that you did not fully recompile after switching from a GPU_CUDA enabled config to the plain CPU one. Running a make clean-core from the example resp. make clean from the OpenLB root should fix it.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.