Changeset f0da45
- Timestamp:
- Aug 30, 2012, 3:37:35 PM (13 years ago)
- Children:
- 0d2f18
- Parents:
- 59076a
- File:
-
- 1 edited
-
src/bin/mpqc/mpqc.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/bin/mpqc/mpqc.cc
r59076a rf0da45 1471 1471 // here, we may gather the results 1472 1472 // we start to fill the MPQC_Data object 1473 if (tim.nonnull()) tim->enter("gather"); 1473 1474 { 1474 1475 Ref<Wavefunction> wfn; … … 1488 1489 // } 1489 1490 // print the energy 1490 data.energies.total = mole->energy();1491 data.energies.total = wfn->energy(); 1491 1492 data.energies.nuclear_repulsion = wfn->nuclear_repulsion_energy(); 1492 1493 { … … 1613 1614 } 1614 1615 grad = NULL; 1615 {1616 // times obtain from key "mpqc" which should be the first1617 double *cpu_time = new double[tim->nregion()];1618 double *wall_time = new double[tim->nregion()];1619 double *flops = new double[tim->nregion()];1620 tim->get_cpu_times(cpu_time);1621 tim->get_wall_times(wall_time);1622 tim->get_flops(flops);1623 if (cpu_time != NULL)1624 data.times.cputime = cpu_time[0];1625 if (wall_time != NULL)1626 data.times.walltime = wall_time[0];1627 if (flops != NULL)1628 data.times.flops = flops[0];1629 delete[] cpu_time;1630 delete[] wall_time;1631 delete[] flops;1632 }1633 1616 1634 1617 { … … 1776 1759 } 1777 1760 scf = 0; 1761 if (tim.nonnull()) tim->exit("gather"); 1762 { 1763 // times obtain from key "mpqc" which should be the first 1764 const int nregion = tim->nregion(); 1765 std::cout << "There are " << nregion << " timed regions." << std::endl; 1766 double *cpu_time = new double[nregion]; 1767 double *wall_time = new double[nregion]; 1768 double *flops = new double[nregion]; 1769 const char **region_names = new const char*[nregion]; 1770 tim->get_region_names(region_names); 1771 // find "gather" 1772 size_t gather_region=0; 1773 for (;gather_region<nregion;++gather_region) { 1774 std::cout << "Comparing " << region_names[gather_region] << " and 'gather'" << std::endl; 1775 if (strcmp(region_names[gather_region], "gather") == 0) 1776 break; 1777 } 1778 if (gather_region == nregion) 1779 gather_region = nregion; 1780 tim->get_cpu_times(cpu_time); 1781 tim->get_wall_times(wall_time); 1782 tim->get_flops(flops); 1783 if (cpu_time != NULL) { 1784 data.times.total_cputime = cpu_time[0]; 1785 data.times.gather_cputime = cpu_time[nregion]; 1786 } 1787 if (wall_time != NULL) { 1788 data.times.total_walltime = wall_time[0]; 1789 data.times.gather_walltime = wall_time[nregion]; 1790 } 1791 if (flops != NULL) { 1792 data.times.total_flops = flops[0]; 1793 data.times.gather_flops = flops[nregion]; 1794 } 1795 delete[] cpu_time; 1796 delete[] wall_time; 1797 delete[] flops; 1798 } 1778 1799 1779 1800 // // GaussianShell is the actual orbital functions it seems ...
Note:
See TracChangeset
for help on using the changeset viewer.
