Results 1 to 1 of 1

Thread: how to parallel programming in device driver module

  1. #1
    Join Date
    Jul 2014
    Beans
    83

    Thumbs up how to parallel programming in device driver module

    how to parallel programming in device driver module

    /home/wonder/layer/hello.c:608:5: error: implicit declaration of function ‘MPI_Init’ [-Werror=implicit-function-declaration]
    /home/wonder/layer/hello.c:609:5: error: implicit declaration of function ‘MPI_Comm_rank’ [-Werror=implicit-function-declaration]
    /home/wonder/layer/hello.c:609:26: error: ‘MPI_COMM_WORLD’ undeclared (first use in this function)
    /home/wonder/layer/hello.c:609:26: note: each undeclared identifier is reported only once for each function it appears in
    /home/wonder/layer/hello.c:610:5: error: implicit declaration of function ‘MPI_Comm_size’ [-Werror=implicit-function-declaration]
    /home/wonder/layer/hello.c:615:5: error: implicit declaration of function ‘MPI_Finalize’ [-Werror=implicit-function-declaration]

    can not use normal functions after include <linux/mpi.h>
    Code:
    int my_id = 0;
        int num_procs = 0;
        int ierr = MPI_Init(2, 0);
        ierr = MPI_Comm_rank(MPI_COMM_WORLD, &my_id);
        ierr = MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
        if(my_id == 0){
        }
        else if(my_id == 1){
        }
        ierr = MPI_Finalize();
    Last edited by zerop2; July 27th, 2014 at 10:47 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •