ISx icon indicating copy to clipboard operation
ISx copied to clipboard

atoi typecasting bug

Open Ashutosh-Londhe opened this issue 5 years ago • 3 comments

"atoi" function is used to get command line value for "TOTAL_KEYS" or "NUM_KEYS_PER_PER" and then it is type cast to "uint64_t", problem with "atoi" is that it cannot convert value more than "2^31" it will truncate that value. Instead "strtoull" can be used.

Also please comment whether the application can scale beyond "2^31" KEYS_PER_PE for weak_scaling experiment or not, considering sufficient memory is available.

Particularly for SHMEM version where symmetric heap memory is limited to 2^28 elements, can increasing this symmetric heap memory will solve the scaling limitation and is there any limitation of memory to be allocated on symmetric heap??

Ashutosh-Londhe avatar Feb 24 '20 06:02 Ashutosh-Londhe

This is a good change. Would you be willing to post a PR for it? Can you elaborate on the symmetric heap size limitation you ran into?

jdinan avatar Feb 25 '20 15:02 jdinan

Hello James, I have created the pull request. For the SHMEM version, i am trying to run the application for more than 2^32 problem size per PE. And as the output space of 2^28 KEY_TYPE element is allocated on symmetric heap the application will not run for more than 2^28 problem size per PE. So changing the value as per the problem size and experiment (strong or weak) is required along with setting value of SMA_SYMMETRIC_HEAP environment variable. Also data type of some variables like "local_bucket_sizes" and "local_bucket_offset" also need to be changed.

Ashutosh-Londhe avatar Feb 26 '20 06:02 Ashutosh-Londhe

Got it -- happy to accept any additional patches needed to make this work.

jdinan avatar Feb 27 '20 20:02 jdinan