Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fread() in MPI is giving Signal 7 Bus Error
- #include "RabinKarp.c"
- #include <stdio.h>
- #include <stdlib.h>
- #include<string.h>
- #include<math.h>
- #include </usr/include/mpi/mpi.h>
- typedef struct {
- int lowerOffset;
- int upperOffset;
- int processorNumber;
- } patternPartitioning;
- int rank;
- FILE *fp;
- char* filename = "/home/rohit/Downloads/10_seqs_2000_3000_bp.fasta";
- int n = 0;
- int d = 0;
- //number of processors
- int k, i = 0, lower_limit, upper_limit;
- int main(int argc, char** argv) {
- char* pattern= "taaat";
- patternPartitioning partition[k];
- MPI_Init(&argc, &argv);
- MPI_Comm_size(MPI_COMM_WORLD, &k);
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- fp = fopen(filename, "rb");
- if (fp != '