fatal error: mpi.h: No such file or directory #include

前端 未结 7 1328
迷失自我
迷失自我 2020-12-08 00:50

when I compile my script with only

#include 

it tells me that there is no such file or directory. But when i include the path

7条回答
  •  渐次进展
    2020-12-08 01:30

    The problem is almost certainly that you're not using the MPI compiler wrappers. Whenever you're compiling an MPI program, you should use the MPI wrappers:

    • C - mpicc
    • C++ - mpiCC, mpicxx, mpic++
    • FORTRAN - mpifort, mpif77, mpif90

    These wrappers do all of the dirty work for you of making sure that all of the appropriate compiler flags, libraries, include directories, library directories, etc. are included when you compile your program.

提交回复
热议问题