Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV when building solvation cavity #1

Closed
alexei-matveev opened this issue Apr 1, 2015 · 5 comments
Closed

SIGSEGV when building solvation cavity #1

alexei-matveev opened this issue Apr 1, 2015 · 5 comments

Comments

@alexei-matveev
Copy link
Owner

Some info for a SIGSEGV in more_triangles()

Stack trace:
#0 0x00000000007ee6aa in polyhedron_module::more_triangles (xyz_t=..., ind_t=..., n_ind=, n_xyz_st=22, n_ind_st=32) at solvation/polyhedron_module.f90:876
#1 0x000000000064d100 in solv_cavity_module::tesselation () at solvation/solv_cavity_module.f90:3110
#2 0x0000000000653d90 in solv_cavity_module::points_on_cavity_surface () at solvation/solv_cavity_module.f90:1032
#3 0x00000000007ee1ec in disp_rep_wrap () at solvation/disp_rep_wrap.f90:97
#4 0x00000000007e50a7 in build_mol_surfaces () at build_mol_surfaces.F90:79
#5 0x0000000000594307 in main_master () at main_master.f90:454
#6 0x00000000004abe72 in paragauss::qm_run (world=0) at modules/paragauss.f90:156

Location:

xyz_t_buf=(xyz_t(i1,:)+xyz_t(i2,:))/2.0_r8_kind

was:

https://github.com/alexei-matveev/paragauss-gpl/blob/master/solvation/polyhedron_module.f90#L876

871 ind_buf(next_i,neighbour)=i1
872
873 label_k: do k=1,3
874 if (k==j) cycle label_k
875 i2=ind_t(i,k)
876 xyz_t_buf=(xyz_t(i1,:)+xyz_t(i2,:))/2.0_r8_kind
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
877 xyz_tt=(radius/sqrt(dot_product(xyz_t_buf,xyz_t_buf)))*xyz_t_buf
878
879 label_l: do l=1,n_xyz_st

@alexei-matveev
Copy link
Owner Author

Increasing the literal constant from 30 to 100 at
https://github.com/alexei-matveev/paragauss-gpl/blob/master/solvation/solv_cavity_module.f90#L95

# define MAX_POL_VER 100

does not help ...

@alexei-matveev
Copy link
Owner Author

Recompiling with bounds cheking gives:

At line 878 of file solvation/polyhedron_module.f90
Fortran runtime error: Index '19' of dimension 1 of array 'xyz_t.0' outside of expected range (1:18)

@alexei-matveev
Copy link
Owner Author

SK reported that after removal of two hydrogens the SIGSEGV goes. His input features 41 atom.
There is MAX_ATOMS_QMMM = 40 literal in the code. And this newly introduced ABORT() does fire:

i_poly=0
if ( N_atom_spheres >= MAX_ATOMS_QMMM .and. &
     name_point_group=='C1  ') then
   ABORT('here')
   if(output_cavity_data .and. .not.do_gradients) &
        write (output_unit,*) 'The OCTAHEDRON is inscribed into each sphere'
   call generate_octahedron(N_atom_spheres,do_cavitation,do_gradients)
   i_poly=1

@alexei-matveev
Copy link
Owner Author

AS authored a fix: 2305b37

@alexei-matveev
Copy link
Owner Author

See ref to the commit above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant