devinamatthews / aquarius

Aquarius is a parallel quantum chemistry package built on the Cyclops Tensor Framework which provides high-performance structured tensor operations. Aquarius is primarily focused on iterative methods such as CC, CI, and EOMCC.
BSD 3-Clause "New" or "Revised" License
27 stars 11 forks source link

segfault in symmetric code with C60 #19

Closed jeffhammond closed 7 years ago

jeffhammond commented 7 years ago

GDB Backtrace

(gdb) run c60.aq 
Starting program: /home/jrhammon/Work/CHEMISTRY/AQUARIUS/install/bin/aquarius c60.aq
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: File "/opt/gcc/6.2.0/lib64/libstdc++.so.6.0.22-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /opt/gcc/6.2.0/lib64/libstdc++.so.6.0.22-gdb.py
line to your configuration file "/home/jrhammon/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/jrhammon/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
================================================================================

                 \ \ /\ / /                                                     
               ---- /__\ ----                                                   
             ----  /|_O|\ ----                              ||                  
              --- /______\ ---                                                  
               / __________ \    /==\   || ||  /==\   \/=\  ||  || ||  /==\     
                /_|____|___\    ||  ||  || || ||  ||  ||    ||  || || |\        
               /____|____|__\    \==||  \|=|/  \==/\\ ||    ||  \|=|/  \=\      
              /__|____|____|_\      //                                   \|     
             /|____|____|____|\     \=/                                \==/     
            /___|____|____|____\                                                
           /___|____|____|____|_\                                               
          /_|____|____|____|____|\                                              
         /____|____|____|____|____\          Novus Ordo Seclorum                
        /_|____|____|____|____|____\                                            
       /|___|____|____|____|____|___\                                           
      /__|____|____|____|____|____|__\                                          
     /__|____|____|____|____|____|____\                                         
    /|____|____|____|____|____|____|___\                                        

================================================================================

Running on 1 process with 1 thread

Tue Dec 13 08:34:44 2016: Starting task: c60-pvdz.molecule

Program received signal SIGSEGV, Segmentation fault.
0x00000000009ec143 in aquarius::input::Molecule::initSymmetry (this=0x7fffffffc418, config=..., cartpos=...)
    at ../src/input/molecule.cxx:1211
1211            for (int op = 0;op < group->getOrder();op++)
(gdb) bt
#0  0x00000000009ec143 in aquarius::input::Molecule::initSymmetry (this=0x7fffffffc418, config=..., cartpos=...)
    at ../src/input/molecule.cxx:1211
#1  0x00000000009e8d4a in aquarius::input::Molecule::Molecule (this=0x7fffffffc418, config=..., arena=...)
    at ../src/input/molecule.cxx:151
#2  0x00000000009e85a4 in aquarius::input::MoleculeTask::run (this=0x7fffffffc418, dag=..., arena=...)
    at ../src/input/molecule.cxx:140
#3  0x0000000000b1291a in aquarius::task::TaskDAG::execute (this=0x7fffffffc418, world=...) at ../src/task/task.cxx:539
#4  0x0000000000a510f4 in main (argc=2, argv=0x7fffffffd0c8) at ../src/main/main.cxx:153

Input File

section c60-pvdz
{
    molecule
    {
        coords cartesian,
        units angstrom,
        atom { C,     0.00000000,     6.57765970,     1.31474480 },
        atom { C,     0.00000000,    -6.57765970,     1.31474480 },
        atom { C,     0.00000000,     6.57765970,    -1.31474480 },
        atom { C,     0.00000000,    -6.57765970,    -1.31474480 },
        atom { C,     2.22517900,     5.72771700,     2.68998110 },
        atom { C,    -2.22517900,    -5.72771700,     2.68998110 },
        atom { C,    -2.22517900,     5.72771700,    -2.68998110 },
        atom { C,     2.22517900,    -5.72771700,    -2.68998110 },
        atom { C,    -2.22517900,    -5.72771700,    -2.68998110 },
        atom { C,     2.22517900,     5.72771700,    -2.68998110 },
        atom { C,     2.22517900,    -5.72771700,     2.68998110 },
        atom { C,    -2.22517900,     5.72771700,     2.68998110 },
        atom { C,     1.37523630,     4.35248070,     4.91516010 },
        atom { C,    -1.37523630,    -4.35248070,     4.91516010 },
        atom { C,    -1.37523630,     4.35248070,    -4.91516010 },
        atom { C,     1.37523630,    -4.35248070,    -4.91516010 },
        atom { C,    -1.37523630,    -4.35248070,    -4.91516010 },
        atom { C,     1.37523630,     4.35248070,    -4.91516010 },
        atom { C,     1.37523630,    -4.35248070,     4.91516010 },
        atom { C,    -1.37523630,     4.35248070,     4.91516010 },
        atom { C,     4.35248070,     4.91516010,     1.37523630 },
        atom { C,    -4.35248070,    -4.91516010,     1.37523630 },
        atom { C,    -4.35248070,     4.91516010,    -1.37523630 },
        atom { C,     4.35248070,    -4.91516010,    -1.37523630 },
        atom { C,    -4.35248070,    -4.91516010,    -1.37523630 },
        atom { C,     4.35248070,     4.91516010,    -1.37523630 },
        atom { C,     4.35248070,    -4.91516010,     1.37523630 },
        atom { C,    -4.35248070,     4.91516010,     1.37523630 },
        atom { C,     2.68998110,     2.22517900,     5.72771700 },
        atom { C,    -2.68998110,    -2.22517900,     5.72771700 },
        atom { C,    -2.68998110,     2.22517900,    -5.72771700 },
        atom { C,     2.68998110,    -2.22517900,    -5.72771700 },
        atom { C,    -2.68998110,    -2.22517900,    -5.72771700 },
        atom { C,     2.68998110,     2.22517900,    -5.72771700 },
        atom { C,     2.68998110,    -2.22517900,     5.72771700 },
        atom { C,    -2.68998110,     2.22517900,     5.72771700 },
        atom { C,     4.91516010,     1.37523630,     4.35248070 },
        atom { C,    -4.91516010,    -1.37523630,     4.35248070 },
        atom { C,    -4.91516010,     1.37523630,    -4.35248070 },
        atom { C,     4.91516010,    -1.37523630,    -4.35248070 },
        atom { C,    -4.91516010,    -1.37523630,    -4.35248070 },
        atom { C,     4.91516010,     1.37523630,    -4.35248070 },
        atom { C,     4.91516010,    -1.37523630,     4.35248070 },
        atom { C,    -4.91516010,     1.37523630,     4.35248070 },
        atom { C,     5.72771700,     2.68998110,     2.22517900 },
        atom { C,    -5.72771700,    -2.68998110,     2.22517900 },
        atom { C,    -5.72771700,     2.68998110,    -2.22517900 },
        atom { C,     5.72771700,    -2.68998110,    -2.22517900 },
        atom { C,    -5.72771700,    -2.68998110,    -2.22517900 },
        atom { C,     5.72771700,     2.68998110,    -2.22517900 },
        atom { C,     5.72771700,    -2.68998110,     2.22517900 },
        atom { C,    -5.72771700,     2.68998110,     2.22517900 },
        atom { C,     6.57765970,     1.31474480,     0.00000000 },
        atom { C,    -6.57765970,    -1.31474480,     0.00000000 },
        atom { C,    -6.57765970,     1.31474480,     0.00000000 },
        atom { C,     6.57765970,    -1.31474480,     0.00000000 },
        atom { C,     1.31474480,     0.00000000,     6.57765970 },
        atom { C,    -1.31474480,     0.00000000,     6.57765970 },
        atom { C,    -1.31474480,     0.00000000,    -6.57765970 },
        atom { C,     1.31474480,     0.00000000,    -6.57765970 },
        basis
            basis_set cc-pVDZ
    },
    1eints,
    #2eints,
    #localaoscf,
    #aomoints,
    #ccsd,
    #ccsd(t),
},
jeffhammond commented 7 years ago

In Molecule::initSymmetry, group never gets initialized. If I add group = &PointGroup::C1(); around https://github.com/devinamatthews/aquarius/blob/master/src/input/molecule.cxx#L334`, then the code runs and shows the molecule is C1.

I will keep debugging, but it seems that the symmetry detection logic is incomplete. At the very least, there should be an error check around https://github.com/devinamatthews/aquarius/blob/master/src/input/molecule.cxx#L1174 that prevents a segfault if group is uninitialized.

devinamatthews commented 7 years ago

The culprit is this little gem:

   399          /*
   400           * Spherical rotors: Td, Oh, Ih
   401           */
-> 402          assert(0);
   403      }

I'll work on actually implementing that.

devinamatthews commented 7 years ago

Are expecting to run in full Ih symmetry or is D2h enough?

jeffhammond commented 7 years ago

It will make it a lot easier to beat NWChem if I can run with Ih but I'll certainly settle for D2h, since that is all any other CC code supports.

Side note: I've never really understood why non-Abelian groups were hard in CC. I get that one needs to generalize a bit, but it's not that complicate. Am I missing something?

devinamatthews commented 7 years ago

It's not too hard in C++ when you make the irrep an object, but I imagine it is a PITA in Fortran. In CFOUR we can't use non-Abelian groups because we use DPD.

On 12/14/16 2:28 PM, Jeff Hammond wrote:

It will make it a lot easier to beat NWChem if I can run with Ih but I'll certainly settle for D2h, since that is all any other CC code supports.

Side note: I've never really understood why non-Abelian groups were hard in CC. I get that one needs to generalize a bit, but it's not that complicate. Am I missing something?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/devinamatthews/aquarius/issues/19#issuecomment-267147171, or mute the thread https://github.com/notifications/unsubscribe-auth/AFAMocuM9sAY5DHgm8KmWrXK4wH1-Bhfks5rIFF1gaJpZM4LL8aF.

devinamatthews commented 7 years ago

Fixed by 7bbf94f in master.