Author Topic: Parsing error containing very small floating-point values in windows package  (Read 82 times)

RaminAghababaei

  • Newbie
  • *
  • Posts: 4
Hi Alex

I just tried to use OVITO on a new windows workstation and faced with this parsing error. It says "invalid floating-point value" in a column, eg. "-4.22536e-121". The Linux version of the OVITO perfectly works with the same dump file and it seems there is a bug in the Windows version. Any idea?

Thanks,
Ramin

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
That's surprising. Which program package version are you using? Is it the same version on Linux and Windows?

RaminAghababaei

  • Newbie
  • *
  • Posts: 4
I am using the latest version, OVITO 2.9.0 on both Windows and Linux. I just installed the windows version on a different machine and I get the same error even with a different dump file!

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
So far I was not able to reproduce the problem under Windows with the current development version Ovito 3.0.0-dev52. I didn't have the chance yet to test v2.9.0.

If you have a dump file that raises the error and is not too large, please post it here.

RaminAghababaei

  • Newbie
  • *
  • Posts: 4
Thanks Alex for the follow-up. Here is a small dump sample that has some very small values (eg. 5.0233e-121 in force column), in which causes the problem.

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
I was now able to reproduce the file parsing error. It looks like the system function for floating-point number parsing behaves differently on Windows (or the Microsoft C++ compiler). The system's locale might play a role as well if it is set to a non-english language, but I'm not sure.

In any case, it doesn't seem to be an issue anymore in the new 3.0 version of OVITO, which uses double precision numbers internally. The error only occurred in the 2.9.0 version, which uses single precision floating-point numbers internally, which cannot represent very small numbers like 1e-205.

Please switch to the current development version if you want to get rid of the error.

RaminAghababaei

  • Newbie
  • *
  • Posts: 4
Thanks Alex. Surprisingely (to me) the non-english language was the problem, it worked when I changed that to english. Anyway I am going to switch to the 3.0.0 version.