Action_Thermostats
        Add_AtomRandomPerturbation
        Add_RotateAroundBondAction
        Add_SelectAtomByNameAction
        Adding_Graph_to_ChangeBondActions
        Adding_MD_integration_tests
        Adding_StructOpt_integration_tests
        AutomationFragmentation_failures
        Candidate_v1.6.0
        Candidate_v1.6.1
        Candidate_v1.7.0
        ChangeBugEmailaddress
        ChangingTestPorts
        ChemicalSpaceEvaluator
        Combining_Subpackages
        Debian_Package_split
        Debian_package_split_molecuildergui_only
        Disabling_MemDebug
        Docu_Python_wait
        EmpiricalPotential_contain_HomologyGraph_documentation
        Enable_parallel_make_install
        Enhance_userguide
        Enhanced_StructuralOptimization
        Enhanced_StructuralOptimization_continued
        Example_ManyWaysToTranslateAtom
        Exclude_Hydrogens_annealWithBondGraph
        FitPartialCharges_GlobalError
        Fix_ChronosMutex
        Fix_StatusMsg
        Fix_StepWorldTime_single_argument
        Fix_Verbose_Codepatterns
        ForceAnnealing_goodresults
        ForceAnnealing_oldresults
        ForceAnnealing_tocheck
        ForceAnnealing_with_BondGraph
        ForceAnnealing_with_BondGraph_continued
        ForceAnnealing_with_BondGraph_continued_betteresults
        ForceAnnealing_with_BondGraph_contraction-expansion
        GeometryObjects
        Gui_displays_atomic_force_velocity
        IndependentFragmentGrids_IntegrationTest
        JobMarket_RobustOnKillsSegFaults
        JobMarket_StableWorkerPool
        JobMarket_unresolvable_hostname_fix
        PartialCharges_OrthogonalSummation
        PythonUI_with_named_parameters
        QtGui_reactivate_TimeChanged_changes
        Recreated_GuiChecks
        RotateToPrincipalAxisSystem_UndoRedo
        StoppableMakroAction
        TremoloParser_IncreasedPrecision
        TremoloParser_MultipleTimesteps
        Ubuntu_1604_changes
        stable
      
      
      
| Rev | Line |   | 
|---|
| [0b990d] | 1 | /*!
 | 
|---|
 | 2 | ** \file done.cc
 | 
|---|
 | 3 | ** \ingroup (PSIO)
 | 
|---|
 | 4 | */
 | 
|---|
 | 5 | 
 | 
|---|
 | 6 | #include <stdlib.h>
 | 
|---|
 | 7 | #include <util/psi3/libpsio/psio.h>
 | 
|---|
 | 8 | 
 | 
|---|
 | 9 | #ifdef PSIO_STATS
 | 
|---|
 | 10 | #include <time.h>
 | 
|---|
 | 11 | #endif
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | namespace psi3 {
 | 
|---|
 | 14 | namespace libpsio {
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | /*!
 | 
|---|
 | 17 | ** \ingroup (PSIO)
 | 
|---|
 | 18 | **
 | 
|---|
 | 19 | ** PSIO_DONE(): Frees global data used by the I/O routines.
 | 
|---|
 | 20 | **
 | 
|---|
 | 21 | ** No arguments.
 | 
|---|
 | 22 | */
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | int psio_done(void)
 | 
|---|
 | 25 | {
 | 
|---|
 | 26 | #ifdef PSIO_STATS
 | 
|---|
 | 27 |   int i;
 | 
|---|
 | 28 |   ULI total_read=0, total_write=0;
 | 
|---|
 | 29 |   FILE *io_out;
 | 
|---|
 | 30 |   time_t my_time;
 | 
|---|
 | 31 |   my_time = time(NULL);
 | 
|---|
 | 32 |   io_out = fopen("psio.dat", "a+");
 | 
|---|
 | 33 |   fprintf(io_out, "\nLIBPSIO Read/Write Statistics\n\n");
 | 
|---|
 | 34 |   fprintf(io_out, "Run at: %s\n", ctime(&my_time));
 | 
|---|
 | 35 |   fprintf(io_out, "Unit      Read(kB)    Write(kB)\n");
 | 
|---|
 | 36 |   fprintf(io_out, "-------------------------------\n");
 | 
|---|
 | 37 |   for(i=0; i < PSIO_MAXUNIT; i++) {
 | 
|---|
 | 38 |       total_read += psio_readlen[i];
 | 
|---|
 | 39 |       total_write += psio_writlen[i];
 | 
|---|
 | 40 |       
 | 
|---|
 | 41 |       if(psio_readlen[i] || psio_writlen[i])
 | 
|---|
 | 42 |           fprintf(io_out, "%3d   %10.1f   %10.1f\n",i,
 | 
|---|
 | 43 |                   ((double) psio_readlen[i])/((double) 1024),
 | 
|---|
 | 44 |                   ((double) psio_writlen[i])/((double) 1024));
 | 
|---|
 | 45 |     }
 | 
|---|
 | 46 |   fprintf(io_out, "-------------------------------\n");
 | 
|---|
 | 47 |   fprintf(io_out, "Total %10.1f   %10.1f\n",
 | 
|---|
 | 48 |           ((double) total_read)/((double) 1024),
 | 
|---|
 | 49 |           ((double) total_write)/((double) 1024));
 | 
|---|
 | 50 |   fclose(io_out);
 | 
|---|
 | 51 |   free(psio_readlen);
 | 
|---|
 | 52 |   free(psio_writlen);
 | 
|---|
 | 53 | #endif  
 | 
|---|
 | 54 | 
 | 
|---|
 | 55 |   free(psio_unit);
 | 
|---|
 | 56 | 
 | 
|---|
 | 57 |   _psi3_libpsio_state_ = 0;
 | 
|---|
 | 58 | 
 | 
|---|
 | 59 |   return(0);
 | 
|---|
 | 60 | }
 | 
|---|
 | 61 | 
 | 
|---|
 | 62 | }
 | 
|---|
 | 63 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.