Skip to content

Problem when using mpi

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8334
    thanhphatvt
    Participant

    I have this problem when making the simulation:
    make CXX=mpic++ CC=gcc -C external
    make[1]: Entering directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external’
    make -C zlib
    make[2]: Entering directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external/zlib’
    gcc -c -o build/adler32.o ./adler32.c
    gcc -c -o build/crc32.o ./crc32.c
    gcc -c -o build/deflate.o ./deflate.c
    gcc -c -o build/infback.o ./infback.c
    gcc -c -o build/inffast.o ./inffast.c
    gcc -c -o build/inflate.o ./inflate.c
    gcc -c -o build/inftrees.o ./inftrees.c
    gcc -c -o build/trees.o ./trees.c
    gcc -c -o build/zutil.o ./zutil.c
    gcc -c -o build/compress.o ./compress.c
    gcc -c -o build/uncompr.o ./uncompr.c
    gcc -c -o build/gzclose.o ./gzclose.c
    gcc -c -o build/gzlib.o ./gzlib.c
    gcc -c -o build/gzread.o ./gzread.c
    gcc -c -o build/gzwrite.o ./gzwrite.c
    ar rc build//libz.a ./build/adler32.o ./build/crc32.o ./build/deflate.o ./build/infback.o ./build/inffast.o ./build/inflate.o ./build/inftrees.o ./build/trees.o ./build/zutil.o ./build/compress.o ./build/uncompr.o ./build/gzclose.o ./build/gzlib.o ./build/gzread.o ./build/gzwrite.o
    make[2]: Leaving directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external/zlib’
    cp zlib/build/libz.a lib/
    make -C tinyxml
    make[2]: Entering directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external/tinyxml’
    mpic++ -c tinystr.cpp -o build/tinystr.o
    mpic++ -c tinyxml.cpp -o build/tinyxml.o
    mpic++ -c tinyxmlerror.cpp -o build/tinyxmlerror.o
    mpic++ -c tinyxmlparser.cpp -o build/tinyxmlparser.o
    ar rc build/libtinyxml.a ./build/tinystr.o ./build/tinyxml.o ./build/tinyxmlerror.o ./build/tinyxmlparser.o
    make[2]: Leaving directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external/tinyxml’
    cp tinyxml/build/libtinyxml.a lib/
    make[1]: Leaving directory ‘/mnt/c/Users/duong/Downloads/olb-1.6r1/olb-1.6r0/external’
    mpic++ -O3 -Wall -march=native -mtune=native -std=c++17 -fopenmp -pthread -DPARALLEL_MODE_OMP -DPARALLEL_MODE_MPI -DPLATFORM_CPU_SISD -DPLATFORM_CPU_SIMD -DPLATFORM_GPU_CUDA -fPIC -Isrc/ -c src/communication/mpiManager.cpp -o src/communication/mpiManager.o
    In file included from src/communication/mpiManager.cpp:21:
    src/communication/mpiManager.h:31:10: fatal error: mpi.h: No such file or directory
    31 | #include “mpi.h”
    | ^~~~~~~
    compilation terminated.
    make: *** [Makefile:46: src/communication/mpiManager.o] Error 1
    Could you help me to solve this problem Thank you so much!

    #8335
    Adrian
    Keymaster

    Which MPI version are you using and can you share details on your system? The mpic++ wrapper should set the required include paths automatically (it is it’s main point). The issue is that does are not found in your environment.

    #8336
    thanhphatvt
    Participant

    Hello Adrian,
    Thanks for your reply. Here is mpi version which I used
    mpirun –version
    mpirun (Open MPI) 4.1.2

    Report bugs to http://www.open-mpi.org/community/help/

    #8337
    Adrian
    Keymaster

    Ok, judging from the initial log you are compiling inside WSL?

    Which distribution are you using and how / which MPI packages did you install?

    Following the “tech report” you are likely missing the libopenmpi-dev package.

    #8354
    thanhphatvt
    Participant

    Yes I compiled in WSL.
    For installing MPI, I used tech report for doing it.
    I’ve already installed libopenmpi-dev
    libopenmpi-dev is already the newest version (4.1.2-2ubuntu1).

    #8376
    thanhphatvt
    Participant

    Hi Adrian,
    Thank you for your help. I’ve solved my problem. I uninstalled open mpi and installed again. And now it can work normally. Thank you so much!

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