cschin / peregrine-2021

Other
58 stars 6 forks source link

Peregrine fails when you use more than 99 threads #4

Open hoppo opened 2 years ago

hoppo commented 2 years ago

Hi,

I noticed that if you use more than 99 threads (and hence chunks), then peregrine fails. The responsible code is:- let filename = format!("{}-??-of-??.dat", shmmr_index_file_prefix);

Although the code will generate .dat files greater than 99 (eg reads-shmr-01-of-128.dat), it will fail when it tries to read these as the regular expression above can never be correct.

cschin commented 2 years ago

@hoppo thanks. is that the only error you see? I can make the "??" to become "???". I do not anticipate people using that many threads :) Do you use a machine with 128 physical cores?

cschin commented 2 years ago

@hoppo can you test it out by building a new set of binaries from the main branch?

ahcm commented 2 years ago

A two year old two socket machine I use has 128 cores / 256 threads. Next year 128 core CPUs (256 threads) are expected and 4 to 8 sockets are easily possible. There are architectures that have more unified Cores and once you go MPI you get into millions of cores.

As you are about to change it, 4 digits would be much better imho.

For MPI you could add hostname or some other machine identifier.