Prob_Angle Segmentation Fault or Bug?
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #289
by jdmoore
When I try to add
Does Prob_Angle have a bug or am I making a syntax error?
# Prob_Angle
60
to the Examples/NPT/pentane I get a segmentation fault.
In another case for my specific problem I am getting this error
************ERROR************
Attempted to change an angle of molecule 14 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 13.
Fatal Error. Stopping program.
I am pretty sure my angle coefficients and angles are correct for my model, but maybe I have a mistake. However, since the pentane example is showing a segmentation fault, I thought they might be related.
Am I making an error in the use of the Angle move or is there a bug?
Thanks.
Josh.
Does Prob_Angle have a bug or am I making a syntax error?
# Prob_Angle
60
to the Examples/NPT/pentane I get a segmentation fault.
In another case for my specific problem I am getting this error
************ERROR************
Attempted to change an angle of molecule 14 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 13.
Fatal Error. Stopping program.
I am pretty sure my angle coefficients and angles are correct for my model, but maybe I have a mistake. However, since the pentane example is showing a segmentation fault, I thought they might be related.
Am I making an error in the use of the Angle move or is there a bug?
Thanks.
Josh.
Please Log in to join the conversation.
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #291
by jdmoore
I think the problem might be on line 199 of move_angle.f90
I think the integer angle_to_move is being used before it has been defined. So it seg faults when angle_list is trying to use angle_to_move
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
Code runs if I peg angle_to_move = 1 at beginning of subroutine.
What needs to go here before here to define angle_to_move?
Thanks.
Josh
I think the integer angle_to_move is being used before it has been defined. So it seg faults when angle_list is trying to use angle_to_move
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
Code runs if I peg angle_to_move = 1 at beginning of subroutine.
What needs to go here before here to define angle_to_move?
Thanks.
Josh
Please Log in to join the conversation.
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #292
by jdmoore
Ahh, I think this is what is missing. Can you confirm?
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
Should be before line 199 of angle.f90, before
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
This would then match move_dihedral, where dihedral_to_move is chosen randomly.
Thanks.
Josh
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
Should be before line 199 of angle.f90, before
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
This would then match move_dihedral, where dihedral_to_move is chosen randomly.
Thanks.
Josh
Please Log in to join the conversation.
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #293
by jdmoore
After adding
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
I am now sometimes getting other errors related to the prob_this_theta being too low in the
6.9531649819728962E-310
This error occurred in subroutine Get_Theta_Prob on step 88.
Fatal Error. Stopping program.
However, sometimes in other examples, I get a different error
Attempted to change an angle of molecule 50 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 64.
Fatal Error. Stopping program.
I'm attaching an example using the pentane example from the Examples directory, modified for GCMC. Note I'm also sometimes getting an error with NPT, but I'm getting an error most often with GCMC with small tests
The fragments need to be regenerated with
Cassandra_V1.2/Scripts/Frag_Library_Setup//library_setup.py Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp pentane.pdb
Then run with
Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp
I compiled this with gfortran, but I'm also seeing the same errors with intel compilers.
Note if I decrease the chemical potential to say -40 kJ/mol, it does run, but shouldn't I be able to do angle moves with this chemical potential. The problem runs fine, if I don't include angle moves.
To confuse you, I've also kept the equil.inp file there which is the NPT example. Please ignore that file.
Any advice?
Thanks in advance.
Josh
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
I am now sometimes getting other errors related to the prob_this_theta being too low in the
6.9531649819728962E-310
This error occurred in subroutine Get_Theta_Prob on step 88.
Fatal Error. Stopping program.
However, sometimes in other examples, I get a different error
Attempted to change an angle of molecule 50 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 64.
Fatal Error. Stopping program.
I'm attaching an example using the pentane example from the Examples directory, modified for GCMC. Note I'm also sometimes getting an error with NPT, but I'm getting an error most often with GCMC with small tests
The fragments need to be regenerated with
Cassandra_V1.2/Scripts/Frag_Library_Setup//library_setup.py Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp pentane.pdb
Then run with
Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp
I compiled this with gfortran, but I'm also seeing the same errors with intel compilers.
Note if I decrease the chemical potential to say -40 kJ/mol, it does run, but shouldn't I be able to do angle moves with this chemical potential. The problem runs fine, if I don't include angle moves.
To confuse you, I've also kept the equil.inp file there which is the NPT example. Please ignore that file.
Any advice?
Thanks in advance.
Josh
Please Log in to join the conversation.
- emarin
- Offline
- Administrator
Less
More
- Posts: 42
- Karma: 2
- Thank you received: 7
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
Time to create page: 0.125 seconds