Thanks. First problem is solved. The next is that the size of input1 is greater than input2. When it run ,the code only read to input2 size. I mean for example the size of input1 is 100 and input2 is 50,code only read 50 samples of input1.
Do you have to read the lines from the input files in parallel like that, or can you process the first file, and then process the second file?
If you can process the files one at a time, the write a function that processes one file. Then you can call it as many times as you like with whatever files you wish.