#include <omp.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
/*File pointers*/
FILE *ptr_file_1, *ptr_file_2,*ptr_file_3; //test file pointers
/*Definitions*/
#define TRUE 1
#define FALSE 0
#define Match 1
#define MissMatch -1
#define GapPenalty 2
#define MAXLEN 20
/*Global Variables*/
char inputC[5]; //user input character
int inputI;
int StrLen1,StrLen2;
int intcheck = TRUE;
char holder, ch;
int filelen1 = 0;
int filelen2 = 0;
int filelen3 = 0;
int i,j,k,l,m,n,lenA,lenB,compval,top,left,left_top,rows,columns,contrl;
char FASTA1[MAXLEN],FASTA2[MAXLEN];
char dash = '-';
char strA[MAXLEN]; //holds 1st string to be aligned in character array
char strB[MAXLEN]; //holds 2nd string to be aligned in character array
int HiScore; //holds value of highest scoring alignment(s).
int HiScorePos[2]; //holds the position of the HiScore
int SWArray[MAXLEN][MAXLEN]; //S-W Matrix
char MaxA[MAXLEN];
char MaxB[MAXLEN];
char OptA[MAXLEN];
char OptB[MAXLEN];
int MaxAcounter = 1; //MaxA counter
int MaxBcounter = 1; //MaxB counter
int cont = TRUE;
int check;
int rank,size;
MPI_Status status;
int buff[3];
/*ALIGNMENT FUNCTION*/
int Align(int PosA,int PosB) {
/*Function Variables*/
int relmax = -1; //hold highest value in sub columns and rows
int relmaxpos[2]; //holds position of relmax
if(SWArray[PosA-1][PosB-1] == 0) {
cont = FALSE;
}
while(cont == TRUE) { //until the diagonal of the current cell has a value of zero
/*Find relmax in sub columns and rows*/
for(i=PosA; i>0; --i) {
if(rel