java.lang.NumberFormatException: For input string: -NAN

This forum is shown on the index page along with all topics.

Moderator: robpearc

afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

java.lang.NumberFormatException: For input string: -NAN

Post by afif »

I've been trying standalone I-TASSER 5.2 on Rocky Linux 8. I was first getting

Code: Select all

start gnuparallel threading dPPAS
start gnuparallel threading dPPAS2
start gnuparallel threading Env-PPAS
start gnuparallel threading MUSTER
start gnuparallel threading wPPAS
start gnuparallel threading wdPPAS
start gnuparallel threading wMUSTER
Illegal division by zero at /path/to/i-tasser/test2/PPAS_P01308 line 359.
Illegal division by zero at /path/to/i-tasser/test2/dPPAS_P01308 line 361.
Illegal division by zero at /path/to/i-tasser/test2/dPPAS2_P01308 line 360.
Illegal division by zero at /path/to/i-tasser/test2/Env-PPAS_P01308 line 357.
Illegal division by zero at /path/to/i-tasser/test2/MUSTER_P01308 line 609.
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at c.a(c.java)
        at c.main(c.java)
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at e.a(e.java)
        at e.main(e.java)
FORTRAN STOP
only 3 threading programs have output, please check threading programs

And I searched the messages here and found
viewtopic.php?t=953
It linked me to the other thread about replacing some zal* binaries. I did so, but now my output looks like this:

Code: Select all

start gnuparallel threading PPAS
start gnuparallel threading dPPAS
start gnuparallel threading dPPAS2
start gnuparallel threading Env-PPAS
start gnuparallel threading MUSTER
start gnuparallel threading wPPAS
start gnuparallel threading wdPPAS
start gnuparallel threading wMUSTER
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at c.a(c.java)
        at c.main(c.java)
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at e.a(e.java)
        at e.main(e.java)
FORTRAN STOP
3.2 make restraints
type= easy, n_good=35, M0= 8, M1_for_medm=1.6, n_sg= 7 role=SEQ
domain2=no
       type=easy----n_temp_use_for_restraints=20
4.1 run simulation
run 14 gnuparallel simulations starting at Sun Jan 28 16:26:48 EST 2024
I couldn't find anything in the forums to get around this java.lan.NumberFormatException. I'm using Java 8 (the default OS java version included with the OS).

many thanks
jlspzw
Posts: 247
Joined: Tue May 04, 2021 5:04 pm

Re: java.lang.NumberFormatException: For input string: -NAN

Post by jlspzw »

Dear user,

Please see if this ticket can help you viewtopic.php?f=3&t=721&p=1314&hilit=za ... 3bab#p1314

Best
IT Team
jlspzw
Posts: 247
Joined: Tue May 04, 2021 5:04 pm

Re: java.lang.NumberFormatException: For input string: -NAN

Post by jlspzw »

Dear user,

It may be caused by library issues,

We found a library update issue on Feb 2, if you downloaded the I-TASSER series standalone packages (I-TASSER, C-I-TASSER, D-I-TASSER, C-QUARK, etc) after Feb 2, please remove the summary* MTX and PDB folders in ITlib folder and re-download the library

Thank you.

Best
IT Team
afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by afif »

Apologies for the delay-- I thought I'd get notified about replies.
Please see if this ticket can help you viewtopic.php?f=3&t=721&p=1314&hilit=za ... 3bab#p1314
Thanks for the response, but I had already tried this before originally posting here, as I described above.
It may be caused by library issues,

We found a library update issue on Feb 2, if you downloaded the I-TASSER series standalone packages (I-TASSER, C-I-TASSER, D-I-TASSER, C-QUARK, etc) after Feb 2, please remove the summary* MTX and PDB folders in ITlib folder and re-download the library
I downloaded it in December, but I'll give this a try anyway.
afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by afif »

> please remove the summary* MTX and PDB folders in ITlib folder and re-download the library

I tried this and it didn't fix the problem.
afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by afif »

I should add that, following those errors I mentioned, the run hangs. So this is what my log looks like:

Code: Select all

start gnuparallel threading dPPAS2
start gnuparallel threading Env-PPAS
start gnuparallel threading MUSTER
start gnuparallel threading wPPAS
start gnuparallel threading wdPPAS
start gnuparallel threading wMUSTER
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at c.a(c.java)
        at c.main(c.java)
Exception in thread "main" java.lang.NumberFormatException: For input string: "-NAN."
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
        at java.lang.Float.parseFloat(Float.java:451)
        at java.lang.Float.valueOf(Float.java:416)
        at e.a(e.java)
        at e.main(e.java)
FORTRAN STOP
3.2 make restraints
type= easy, n_good=40, M0= 8, M1_for_medm=1.6, n_sg= 8 role=SEQ
domain2=no
       type=easy----n_temp_use_for_restraints=20
4.1 run simulation
run 14 gnuparallel simulations starting at Sun Mar  3 16:17:07 EST 2024
run simulation job 1 / 14
run simulation job 2 / 14
run simulation job 3 / 14
run simulation job 4 / 14
run simulation job 5 / 14
run simulation job 6 / 14
run simulation job 7 / 14
run simulation job 8 / 14
run simulation job 9 / 14
run simulation job 10 / 14
run simulation job 11 / 14
run simulation job 12 / 14
run simulation job 13 / 14
run simulation job 14 / 14
And it hangs from there.
harvey@bucknell.edu
Posts: 4
Joined: Tue Mar 19, 2024 6:11 pm

Re: java.lang.NumberFormatException: For input string: -NAN

Post by harvey@bucknell.edu »

Hello,

I am having the same issue and was wondering if you ever found a solution to the java errors.


Thanks!
afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by afif »

Nope. Still stuck here.
afif
Posts: 8
Joined: Thu Apr 21, 2022 7:40 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by afif »

I compared to I-TASSER 5.1 and the java files apparently haven't changed since then. So I wondered whether the java version might make the difference in how this was run.

We previously used to have I-TASSER 5.1 successfully working on CentOS7 where I believe the default java version was 7. Now we're on Rocky Linux 8 and the default java version is 8.

The jar files in question appear to have been built using the java 5 sdk:

JAR=/usr/local/apps/i-tasser/5.2/bin/zalign/fGGGd.jar; unzip -p $JAR `unzip -l $JAR | grep '\.class$' | head -1` | file -
caution: filename not matched: 13495
caution: filename not matched: 03-06-2013
caution: filename not matched: 16:12
/dev/stdin: compiled Java class data, version 49.0 (Java 1.5)


So I tried java 7 since that worked before in the old 5.1 installation and that resulted in the same errors. I think there might still be some issues in the zal* binaries. Perhaps they aren't compatible with rocky linux 8.

In any case, I think I've done all that I can do from my end, so barring any help here from support, we'll have to abandon setting up our local I-TASSER installation.
sarausa
Posts: 2
Joined: Tue Oct 22, 2024 1:38 am

Re: java.lang.NumberFormatException: For input string: -NAN

Post by sarausa »

I have had those problems but have not found a way to fix them. Thanks for sharing very useful information on how to solve these problems. Slither io
Post Reply