Skip to content

Commit 76fd37c

Browse files
lucasarklucasark
lucasark
authored and
lucasark
committed
DNA.c
1 parent 37dc404 commit 76fd37c

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

DNA

13.4 KB
Binary file not shown.

DNA.c

+22-4
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ inline void remove_eol(char *line) {
9292
}
9393
}
9494

95-
char *bases;
96-
char *str;
9795

9896
//funcao MPI
9997

@@ -113,14 +111,34 @@ int main(int argc,char** argv){
113111

114112
int genes_tam=0; //TOdos podem iniciar essas duas
115113
int chave_tam=0;
116-
114+
char* chave;
115+
char* genes;
117116
if(meu_rank==0){
117+
118+
openfiles(); //abre os arquivos e nome eles na funcao
119+
120+
118121
/*
119122
IO
120123
Aqui vai o programa que recupera a string da chave e do genes (sequencia genetica), e deve guardar essas informacoes
121124
nas variaveis logo abaixo (que serao char*).
122125
*/
123-
char* chave; char* genes;
126+
127+
//
128+
129+
genes = (char*) malloc(sizeof(char) * 1000001);
130+
if (genes == NULL) {
131+
perror("malloc genes");
132+
exit(EXIT_FAILURE);
133+
}
134+
135+
chave = (char*) malloc(sizeof(char) * 1000001);
136+
if (chave == NULL) {
137+
perror("malloc chave");
138+
exit(EXIT_FAILURE);
139+
}
140+
141+
openfiles();
124142

125143
genes_tam = sizeof(genes)/sizeof(char*);
126144
chave_tam = sizeof(chave)/sizeof(char*);

dna.out

Whitespace-only changes.

0 commit comments

Comments
 (0)