hillclimber 0.1.5__cp313-cp313-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hillclimber/__init__.py +39 -0
- hillclimber/actions.py +53 -0
- hillclimber/analysis.py +590 -0
- hillclimber/biases.py +293 -0
- hillclimber/calc.py +22 -0
- hillclimber/cvs.py +1070 -0
- hillclimber/interfaces.py +133 -0
- hillclimber/metadynamics.py +325 -0
- hillclimber/nodes.py +6 -0
- hillclimber/opes.py +359 -0
- hillclimber/selectors.py +230 -0
- hillclimber/virtual_atoms.py +341 -0
- hillclimber-0.1.5.dist-info/METADATA +210 -0
- hillclimber-0.1.5.dist-info/RECORD +472 -0
- hillclimber-0.1.5.dist-info/WHEEL +5 -0
- hillclimber-0.1.5.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.5.dist-info/licenses/LICENSE +165 -0
- hillclimber-0.1.5.dist-info/sboms/auditwheel.cdx.json +1 -0
- hillclimber.libs/libgcc_s-2d945d6c.so.1 +0 -0
- hillclimber.libs/libgomp-1ede7ee7.so.1.0.0 +0 -0
- hillclimber.libs/libstdc++-85f2cd6d.so.6.0.33 +0 -0
- plumed/__init__.py +104 -0
- plumed/_lib/bin/plumed +0 -0
- plumed/_lib/bin/plumed-config +9 -0
- plumed/_lib/bin/plumed-patch +9 -0
- plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
- plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
- plumed/_lib/include/plumed/asmjit/arch.h +228 -0
- plumed/_lib/include/plumed/asmjit/arm.h +43 -0
- plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
- plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
- plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
- plumed/_lib/include/plumed/asmjit/base.h +56 -0
- plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
- plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
- plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
- plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
- plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
- plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
- plumed/_lib/include/plumed/asmjit/func.h +1327 -0
- plumed/_lib/include/plumed/asmjit/globals.h +370 -0
- plumed/_lib/include/plumed/asmjit/inst.h +137 -0
- plumed/_lib/include/plumed/asmjit/logging.h +317 -0
- plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
- plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
- plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
- plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
- plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
- plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
- plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
- plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
- plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
- plumed/_lib/include/plumed/asmjit/x86.h +45 -0
- plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
- plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
- plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
- plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
- plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
- plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
- plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
- plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
- plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
- plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
- plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
- plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
- plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
- plumed/_lib/include/plumed/bias/Bias.h +82 -0
- plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
- plumed/_lib/include/plumed/blas/blas.h +253 -0
- plumed/_lib/include/plumed/blas/def_external.h +61 -0
- plumed/_lib/include/plumed/blas/def_internal.h +97 -0
- plumed/_lib/include/plumed/blas/real.h +49 -0
- plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
- plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
- plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
- plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
- plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
- plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
- plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
- plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
- plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
- plumed/_lib/include/plumed/config/Config.h +118 -0
- plumed/_lib/include/plumed/config/version.h +9 -0
- plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
- plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
- plumed/_lib/include/plumed/contour/FindContour.h +67 -0
- plumed/_lib/include/plumed/core/Action.h +540 -0
- plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
- plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
- plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
- plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
- plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
- plumed/_lib/include/plumed/core/ActionSet.h +163 -0
- plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
- plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
- plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
- plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
- plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
- plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
- plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
- plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
- plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
- plumed/_lib/include/plumed/core/CLTool.h +177 -0
- plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
- plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
- plumed/_lib/include/plumed/core/Colvar.h +115 -0
- plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
- plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
- plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
- plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
- plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
- plumed/_lib/include/plumed/core/GREX.h +61 -0
- plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
- plumed/_lib/include/plumed/core/Group.h +41 -0
- plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
- plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
- plumed/_lib/include/plumed/core/PbcAction.h +61 -0
- plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
- plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
- plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
- plumed/_lib/include/plumed/core/TargetDist.h +48 -0
- plumed/_lib/include/plumed/core/Value.h +547 -0
- plumed/_lib/include/plumed/core/WithCmd.h +93 -0
- plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
- plumed/_lib/include/plumed/drr/DRR.h +383 -0
- plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
- plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
- plumed/_lib/include/plumed/function/Custom.h +54 -0
- plumed/_lib/include/plumed/function/Function.h +85 -0
- plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
- plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
- plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
- plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
- plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
- plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
- plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
- plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
- plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
- plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
- plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
- plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
- plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
- plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
- plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
- plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
- plumed/_lib/include/plumed/lapack/def_external.h +207 -0
- plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
- plumed/_lib/include/plumed/lapack/lapack.h +899 -0
- plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
- plumed/_lib/include/plumed/lapack/real.h +50 -0
- plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
- plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
- plumed/_lib/include/plumed/lepton/Exception.h +93 -0
- plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
- plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
- plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
- plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
- plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
- plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
- plumed/_lib/include/plumed/lepton/Parser.h +111 -0
- plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
- plumed/_lib/include/plumed/mapping/Path.h +44 -0
- plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
- plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
- plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
- plumed/_lib/include/plumed/maze/Core.h +65 -0
- plumed/_lib/include/plumed/maze/Loss.h +86 -0
- plumed/_lib/include/plumed/maze/Member.h +66 -0
- plumed/_lib/include/plumed/maze/Memetic.h +799 -0
- plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
- plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
- plumed/_lib/include/plumed/maze/Tools.h +183 -0
- plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
- plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
- plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
- plumed/_lib/include/plumed/molfile/fastio.h +683 -0
- plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
- plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
- plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
- plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
- plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
- plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
- plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
- plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
- plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
- plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
- plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
- plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
- plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
- plumed/_lib/include/plumed/tools/Angle.h +52 -0
- plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
- plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
- plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
- plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
- plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
- plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
- plumed/_lib/include/plumed/tools/Citations.h +74 -0
- plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
- plumed/_lib/include/plumed/tools/Communicator.h +316 -0
- plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
- plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
- plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
- plumed/_lib/include/plumed/tools/Exception.h +406 -0
- plumed/_lib/include/plumed/tools/File.h +28 -0
- plumed/_lib/include/plumed/tools/FileBase.h +153 -0
- plumed/_lib/include/plumed/tools/FileTools.h +37 -0
- plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
- plumed/_lib/include/plumed/tools/Grid.h +638 -0
- plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
- plumed/_lib/include/plumed/tools/IFile.h +117 -0
- plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
- plumed/_lib/include/plumed/tools/Keywords.h +380 -0
- plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
- plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
- plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
- plumed/_lib/include/plumed/tools/Log.h +41 -0
- plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
- plumed/_lib/include/plumed/tools/Matrix.h +721 -0
- plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
- plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
- plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
- plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
- plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
- plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
- plumed/_lib/include/plumed/tools/OFile.h +286 -0
- plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
- plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
- plumed/_lib/include/plumed/tools/PDB.h +154 -0
- plumed/_lib/include/plumed/tools/Pbc.h +139 -0
- plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
- plumed/_lib/include/plumed/tools/RMSD.h +493 -0
- plumed/_lib/include/plumed/tools/Random.h +80 -0
- plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
- plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
- plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
- plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
- plumed/_lib/include/plumed/tools/Tensor.h +724 -0
- plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
- plumed/_lib/include/plumed/tools/Tools.h +638 -0
- plumed/_lib/include/plumed/tools/Torsion.h +55 -0
- plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
- plumed/_lib/include/plumed/tools/Tree.h +61 -0
- plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
- plumed/_lib/include/plumed/tools/Units.h +167 -0
- plumed/_lib/include/plumed/tools/Vector.h +433 -0
- plumed/_lib/include/plumed/tools/View.h +296 -0
- plumed/_lib/include/plumed/tools/View2D.h +100 -0
- plumed/_lib/include/plumed/tools/h36.h +39 -0
- plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
- plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
- plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
- plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
- plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
- plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
- plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
- plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
- plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
- plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
- plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
- plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
- plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
- plumed/_lib/include/plumed/ves/VesBias.h +545 -0
- plumed/_lib/include/plumed/ves/VesTools.h +142 -0
- plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
- plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
- plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
- plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
- plumed/_lib/lib/PythonCVInterface.so +0 -0
- plumed/_lib/lib/libplumed.a +0 -0
- plumed/_lib/lib/libplumed.so +0 -0
- plumed/_lib/lib/libplumedKernel.so +0 -0
- plumed/_lib/lib/libplumedWrapper.a +0 -0
- plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
- plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
- plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
- plumed/_lib/lib/plumed/modulefile +69 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
- plumed/_lib/lib/plumed/patches/patch.sh +500 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
- plumed/_lib/lib/plumed/plumed-config +9 -0
- plumed/_lib/lib/plumed/plumed-mklib +9 -0
- plumed/_lib/lib/plumed/plumed-newcv +9 -0
- plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
- plumed/_lib/lib/plumed/plumed-patch +9 -0
- plumed/_lib/lib/plumed/plumed-runtime +0 -0
- plumed/_lib/lib/plumed/plumed-selector +9 -0
- plumed/_lib/lib/plumed/plumed-vim2html +9 -0
- plumed/_lib/lib/plumed/scripts/config.sh +126 -0
- plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
- plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
- plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
- plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
- plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
- plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
- plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
- plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
- plumed/_lib/lib/plumed/src/config/config.txt +179 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake +8 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc +8 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +5 -0
- plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
- plumed/_plumed_core.cpython-311-aarch64-linux-musl.so +0 -0
- plumed/_plumed_core.cpython-312-aarch64-linux-musl.so +0 -0
- plumed/_plumed_core.cpython-313-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-311-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-312-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-313-aarch64-linux-musl.so +0 -0
- plumedCommunications.pyi +431 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
University of Illinois Open Source License
|
|
3
|
+
Copyright 2003 Theoretical and Computational Biophysics Group,
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Developed by: Theoretical and Computational Biophysics Group
|
|
7
|
+
University of Illinois at Urbana-Champaign
|
|
8
|
+
http://www.ks.uiuc.edu/
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
11
|
+
this software and associated documentation files (the Software), to deal with
|
|
12
|
+
the Software without restriction, including without limitation the rights to
|
|
13
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
14
|
+
of the Software, and to permit persons to whom the Software is furnished to
|
|
15
|
+
do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
Redistributions of source code must retain the above copyright notice,
|
|
18
|
+
this list of conditions and the following disclaimers.
|
|
19
|
+
|
|
20
|
+
Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimers in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
Neither the names of Theoretical and Computational Biophysics Group,
|
|
25
|
+
University of Illinois at Urbana-Champaign, nor the names of its contributors
|
|
26
|
+
may be used to endorse or promote products derived from this Software without
|
|
27
|
+
specific prior written permission.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
32
|
+
THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
33
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
34
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
35
|
+
OTHER DEALINGS WITH THE SOFTWARE.
|
|
36
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
37
|
+
#ifndef __PLUMED_molfile_fastio_h
|
|
38
|
+
#define __PLUMED_molfile_fastio_h
|
|
39
|
+
/***************************************************************************
|
|
40
|
+
*cr
|
|
41
|
+
*cr (C) Copyright 1995-2016 The Board of Trustees of the
|
|
42
|
+
*cr University of Illinois
|
|
43
|
+
*cr All Rights Reserved
|
|
44
|
+
*cr
|
|
45
|
+
***************************************************************************/
|
|
46
|
+
/***************************************************************************
|
|
47
|
+
* RCS INFORMATION:
|
|
48
|
+
*
|
|
49
|
+
* $RCSfile: fastio.h,v $
|
|
50
|
+
* $Author: johns $ $Locker: $ $State: Exp $
|
|
51
|
+
* $Revision: 1.34 $ $Date: 2016/11/28 05:01:53 $
|
|
52
|
+
*
|
|
53
|
+
***************************************************************************
|
|
54
|
+
* DESCRIPTION:
|
|
55
|
+
* This is a simple abstraction layer for system-dependent I/O calls
|
|
56
|
+
* that allow plugins to do binary I/O using the fastest possible method.
|
|
57
|
+
*
|
|
58
|
+
* This code is intended for use by binary trajectory reader plugins that
|
|
59
|
+
* work with multi-gigabyte data sets, reading only binary data.
|
|
60
|
+
*
|
|
61
|
+
***************************************************************************/
|
|
62
|
+
|
|
63
|
+
#define FIO_READ 0x01
|
|
64
|
+
#define FIO_WRITE 0x02
|
|
65
|
+
#define FIO_DIRECT 0x04 /* emulate Unix O_DIRECT flag */
|
|
66
|
+
|
|
67
|
+
/* Compiling on windows */
|
|
68
|
+
#if defined(_MSC_VER) || defined(__MINGW32__)
|
|
69
|
+
|
|
70
|
+
#if 1
|
|
71
|
+
/* use native Windows I/O calls */
|
|
72
|
+
#define FASTIO_NATIVEWIN32 1
|
|
73
|
+
|
|
74
|
+
#include <stdio.h>
|
|
75
|
+
#include <string.h>
|
|
76
|
+
#include <windows.h>
|
|
77
|
+
|
|
78
|
+
namespace PLMD{
|
|
79
|
+
namespace molfile{
|
|
80
|
+
|
|
81
|
+
typedef HANDLE fio_fd;
|
|
82
|
+
typedef LONGLONG fio_size_t;
|
|
83
|
+
typedef void * fio_caddr_t;
|
|
84
|
+
|
|
85
|
+
typedef struct {
|
|
86
|
+
fio_caddr_t iov_base;
|
|
87
|
+
int iov_len;
|
|
88
|
+
} fio_iovec;
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
#define FIO_SEEK_CUR FILE_CURRENT
|
|
92
|
+
#define FIO_SEEK_SET FILE_BEGIN
|
|
93
|
+
#define FIO_SEEK_END FILE_END
|
|
94
|
+
|
|
95
|
+
static int fio_win32convertfilename(const char *filename, char *newfilename, int maxlen) {
|
|
96
|
+
int i;
|
|
97
|
+
int len=strlen(filename);
|
|
98
|
+
|
|
99
|
+
if ((len + 1) >= maxlen)
|
|
100
|
+
return -1;
|
|
101
|
+
|
|
102
|
+
for (i=0; i<len; i++) {
|
|
103
|
+
if (filename[i] == '/')
|
|
104
|
+
newfilename[i] = '\\';
|
|
105
|
+
else
|
|
106
|
+
newfilename[i] = filename[i];
|
|
107
|
+
}
|
|
108
|
+
newfilename[len] = '\0'; /* NUL terminate the string */
|
|
109
|
+
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static int fio_open(const char *filename, int mode, fio_fd *fd) {
|
|
114
|
+
HANDLE fp;
|
|
115
|
+
char winfilename[8192];
|
|
116
|
+
DWORD access;
|
|
117
|
+
DWORD sharing;
|
|
118
|
+
LPSECURITY_ATTRIBUTES security;
|
|
119
|
+
DWORD createmode;
|
|
120
|
+
DWORD flags;
|
|
121
|
+
|
|
122
|
+
if (fio_win32convertfilename(filename, winfilename, sizeof(winfilename)))
|
|
123
|
+
return -1;
|
|
124
|
+
|
|
125
|
+
access = 0;
|
|
126
|
+
if (mode & FIO_READ)
|
|
127
|
+
access |= GENERIC_READ;
|
|
128
|
+
if (mode & FIO_WRITE)
|
|
129
|
+
access |= GENERIC_WRITE;
|
|
130
|
+
#if 0
|
|
131
|
+
access = FILE_ALL_ACCESS; /* XXX hack if above modes fail */
|
|
132
|
+
#endif
|
|
133
|
+
#if 1
|
|
134
|
+
if (mode & FIO_DIRECT)
|
|
135
|
+
flags = FILE_FLAG_NO_BUFFERING;
|
|
136
|
+
else
|
|
137
|
+
flags = FILE_ATTRIBUTE_NORMAL;
|
|
138
|
+
#else
|
|
139
|
+
if (mode & FIO_DIRECT)
|
|
140
|
+
return -1; /* not supported yet */
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
sharing = 0; /* disallow sharing with other processes */
|
|
144
|
+
security = NULL; /* child processes don't inherit anything */
|
|
145
|
+
|
|
146
|
+
/* since we never append, blow away anything that's already there */
|
|
147
|
+
if (mode & FIO_WRITE)
|
|
148
|
+
createmode = CREATE_ALWAYS;
|
|
149
|
+
else
|
|
150
|
+
createmode = OPEN_EXISTING;
|
|
151
|
+
|
|
152
|
+
fp = CreateFile(winfilename, access, sharing, security,
|
|
153
|
+
createmode, flags, NULL);
|
|
154
|
+
|
|
155
|
+
if (fp == NULL) {
|
|
156
|
+
return -1;
|
|
157
|
+
} else {
|
|
158
|
+
*fd = fp;
|
|
159
|
+
return 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
static int fio_fclose(fio_fd fd) {
|
|
165
|
+
BOOL rc;
|
|
166
|
+
rc = CloseHandle(fd);
|
|
167
|
+
if (rc)
|
|
168
|
+
return 0;
|
|
169
|
+
else
|
|
170
|
+
return -1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
static fio_size_t fio_fread(void *ptr, fio_size_t size,
|
|
174
|
+
fio_size_t nitems, fio_fd fd) {
|
|
175
|
+
BOOL rc;
|
|
176
|
+
DWORD len;
|
|
177
|
+
DWORD readlen;
|
|
178
|
+
|
|
179
|
+
len = size * nitems;
|
|
180
|
+
|
|
181
|
+
rc = ReadFile(fd, ptr, len, &readlen, NULL);
|
|
182
|
+
if (rc) {
|
|
183
|
+
if (readlen == len)
|
|
184
|
+
return nitems;
|
|
185
|
+
else
|
|
186
|
+
return 0;
|
|
187
|
+
} else {
|
|
188
|
+
return 0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static fio_size_t fio_readv(fio_fd fd, const fio_iovec * iov, int iovcnt) {
|
|
193
|
+
int i;
|
|
194
|
+
fio_size_t len = 0;
|
|
195
|
+
|
|
196
|
+
for (i=0; i<iovcnt; i++) {
|
|
197
|
+
fio_size_t rc = fio_fread(iov[i].iov_base, iov[i].iov_len, 1, fd);
|
|
198
|
+
if (rc != 1)
|
|
199
|
+
break;
|
|
200
|
+
len += iov[i].iov_len;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return len;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static fio_size_t fio_fwrite(void *ptr, fio_size_t size,
|
|
207
|
+
fio_size_t nitems, fio_fd fd) {
|
|
208
|
+
BOOL rc;
|
|
209
|
+
DWORD len;
|
|
210
|
+
DWORD writelen;
|
|
211
|
+
|
|
212
|
+
len = size * nitems;
|
|
213
|
+
|
|
214
|
+
rc = WriteFile(fd, ptr, len, &writelen, NULL);
|
|
215
|
+
if (rc) {
|
|
216
|
+
if (writelen == len)
|
|
217
|
+
return nitems;
|
|
218
|
+
else
|
|
219
|
+
return 0;
|
|
220
|
+
} else {
|
|
221
|
+
return 0;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static fio_size_t fio_fseek(fio_fd fd, fio_size_t offset, int whence) {
|
|
226
|
+
#if 1
|
|
227
|
+
/* code that works with older MSVC6 compilers */
|
|
228
|
+
LONGLONG finaloffset;
|
|
229
|
+
LARGE_INTEGER bigint;
|
|
230
|
+
LARGE_INTEGER finalint;
|
|
231
|
+
|
|
232
|
+
bigint.QuadPart = offset;
|
|
233
|
+
finalint = bigint; /* set the high part, which will be overwritten */
|
|
234
|
+
finalint.LowPart = SetFilePointer(fd, bigint.LowPart, &finalint.HighPart, whence);
|
|
235
|
+
if (finalint.LowPart == -1) {
|
|
236
|
+
/* if (finalint.LowPart == INVALID_SET_FILE_POINTER) { */
|
|
237
|
+
/* INVALID_SET_FILE_POINTER is a possible "ok" low order result when */
|
|
238
|
+
/* working with 64-bit offsets, so we have to also check the system */
|
|
239
|
+
/* error value for this thread to be sure */
|
|
240
|
+
if (GetLastError() != ERROR_SUCCESS) {
|
|
241
|
+
return -1;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
finaloffset = finalint.QuadPart;
|
|
246
|
+
return 0;
|
|
247
|
+
#else
|
|
248
|
+
BOOL rc;
|
|
249
|
+
LONGLONG finaloffset;
|
|
250
|
+
|
|
251
|
+
/* SetFilePointerEx() only exists with new .NET compilers */
|
|
252
|
+
rc = SetFilePointerEx(fd, offset, &finaloffset, whence);
|
|
253
|
+
|
|
254
|
+
if (rc)
|
|
255
|
+
return 0;
|
|
256
|
+
else
|
|
257
|
+
return -1;
|
|
258
|
+
#endif
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
static fio_size_t fio_ftell(fio_fd fd) {
|
|
262
|
+
/* code that works with older MSVC6 compilers */
|
|
263
|
+
LONGLONG finaloffset;
|
|
264
|
+
LARGE_INTEGER bigint;
|
|
265
|
+
LARGE_INTEGER finalint;
|
|
266
|
+
|
|
267
|
+
bigint.QuadPart = 0;
|
|
268
|
+
finalint = bigint; /* set the high part, which will be overwritten */
|
|
269
|
+
|
|
270
|
+
finalint.LowPart = SetFilePointer(fd, bigint.LowPart, &finalint.HighPart, FILE_CURRENT);
|
|
271
|
+
if (finalint.LowPart == -1) {
|
|
272
|
+
/* if (finalint.LowPart == INVALID_SET_FILE_POINTER) { */
|
|
273
|
+
/* INVALID_SET_FILE_POINTER is a possible "ok" low order result when */
|
|
274
|
+
/* working with 64-bit offsets, so we have to also check the system */
|
|
275
|
+
/* error value for this thread to be sure */
|
|
276
|
+
if (GetLastError() != ERROR_SUCCESS) {
|
|
277
|
+
return -1;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
finaloffset = finalint.QuadPart;
|
|
282
|
+
|
|
283
|
+
return finaloffset;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
#else
|
|
288
|
+
|
|
289
|
+
/* Version for machines with plain old ANSI C */
|
|
290
|
+
|
|
291
|
+
#include <stdio.h>
|
|
292
|
+
#include <string.h>
|
|
293
|
+
|
|
294
|
+
typedef FILE * fio_fd;
|
|
295
|
+
typedef size_t fio_size_t; /* MSVC doesn't uinversally support ssize_t */
|
|
296
|
+
typedef void * fio_caddr_t; /* MSVC doesn't universally support caddr_t */
|
|
297
|
+
|
|
298
|
+
typedef struct {
|
|
299
|
+
fio_caddr_t iov_base;
|
|
300
|
+
int iov_len;
|
|
301
|
+
} fio_iovec;
|
|
302
|
+
|
|
303
|
+
#define FIO_SEEK_CUR SEEK_CUR
|
|
304
|
+
#define FIO_SEEK_SET SEEK_SET
|
|
305
|
+
#define FIO_SEEK_END SEEK_END
|
|
306
|
+
|
|
307
|
+
static int fio_open(const char *filename, int mode, fio_fd *fd) {
|
|
308
|
+
char * modestr;
|
|
309
|
+
FILE *fp;
|
|
310
|
+
|
|
311
|
+
if (mode & FIO_READ)
|
|
312
|
+
modestr = "rb";
|
|
313
|
+
|
|
314
|
+
if (mode & FIO_WRITE)
|
|
315
|
+
modestr = "wb";
|
|
316
|
+
|
|
317
|
+
if (mode & FIO_DIRECT)
|
|
318
|
+
return -1; /* not supported yet */
|
|
319
|
+
|
|
320
|
+
fp = fopen(filename, modestr);
|
|
321
|
+
if (fp == NULL) {
|
|
322
|
+
return -1;
|
|
323
|
+
} else {
|
|
324
|
+
*fd = fp;
|
|
325
|
+
return 0;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
static int fio_fclose(fio_fd fd) {
|
|
330
|
+
return fclose(fd);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
static fio_size_t fio_fread(void *ptr, fio_size_t size,
|
|
334
|
+
fio_size_t nitems, fio_fd fd) {
|
|
335
|
+
return fread(ptr, size, nitems, fd);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
static fio_size_t fio_readv(fio_fd fd, const fio_iovec * iov, int iovcnt) {
|
|
339
|
+
int i;
|
|
340
|
+
fio_size_t len = 0;
|
|
341
|
+
|
|
342
|
+
for (i=0; i<iovcnt; i++) {
|
|
343
|
+
fio_size_t rc = fread(iov[i].iov_base, iov[i].iov_len, 1, fd);
|
|
344
|
+
if (rc != 1)
|
|
345
|
+
break;
|
|
346
|
+
len += iov[i].iov_len;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
return len;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
static fio_size_t fio_fwrite(void *ptr, fio_size_t size,
|
|
353
|
+
fio_size_t nitems, fio_fd fd) {
|
|
354
|
+
return fwrite(ptr, size, nitems, fd);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
static fio_size_t fio_fseek(fio_fd fd, fio_size_t offset, int whence) {
|
|
358
|
+
return fseek(fd, offset, whence);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
static fio_size_t fio_ftell(fio_fd fd) {
|
|
362
|
+
return ftell(fd);
|
|
363
|
+
}
|
|
364
|
+
#endif /* plain ANSI C */
|
|
365
|
+
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
#else
|
|
370
|
+
|
|
371
|
+
/* Version for UNIX machines */
|
|
372
|
+
#if defined(__linux)
|
|
373
|
+
#ifndef _GNU_SOURCE
|
|
374
|
+
#define _GNU_SOURCE /* required for O_DIRECT */
|
|
375
|
+
#endif
|
|
376
|
+
#endif
|
|
377
|
+
#include <unistd.h>
|
|
378
|
+
#include <stdio.h>
|
|
379
|
+
#include <sys/types.h>
|
|
380
|
+
#include <sys/stat.h>
|
|
381
|
+
#include <fcntl.h>
|
|
382
|
+
#include <string.h>
|
|
383
|
+
|
|
384
|
+
namespace PLMD{
|
|
385
|
+
namespace molfile{
|
|
386
|
+
|
|
387
|
+
typedef int fio_fd;
|
|
388
|
+
typedef off_t fio_size_t; /* off_t is 64-bits with LFS builds */
|
|
389
|
+
|
|
390
|
+
/*
|
|
391
|
+
* Enable use of kernel readv() if available and reliable
|
|
392
|
+
*
|
|
393
|
+
* Note: Some Linux implementations incorporate readv() code in libc
|
|
394
|
+
* that does userspace copying of I/O vectors to internal temporary
|
|
395
|
+
* buffers in order to meet the atomicity requirements of the POSIX standard.
|
|
396
|
+
* Such copies make the use of vectorized I/O APIs much less useful for
|
|
397
|
+
* large trajectory files because the internal buffer allocations can fail
|
|
398
|
+
* badly when performing large aggregate I/O operations. It may be that
|
|
399
|
+
* other implementations of vector I/O have similar problems, and in these
|
|
400
|
+
* cases it is probably best not to use it at all, and to fall back to
|
|
401
|
+
* non-vectorized I/O APIs to avoid such extra copies.
|
|
402
|
+
*/
|
|
403
|
+
#if defined(__sun) || defined(__APPLE_CC__) || defined(__linux)
|
|
404
|
+
#define USE_KERNEL_READV 1
|
|
405
|
+
#endif
|
|
406
|
+
|
|
407
|
+
typedef void * fio_caddr_t;
|
|
408
|
+
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
#if defined(USE_KERNEL_READV)
|
|
413
|
+
#include <errno.h>
|
|
414
|
+
#include <sys/uio.h>
|
|
415
|
+
namespace PLMD{
|
|
416
|
+
namespace molfile{
|
|
417
|
+
typedef struct iovec fio_iovec;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
#else
|
|
421
|
+
|
|
422
|
+
namespace PLMD{
|
|
423
|
+
namespace molfile{
|
|
424
|
+
typedef struct {
|
|
425
|
+
fio_caddr_t iov_base;
|
|
426
|
+
int iov_len;
|
|
427
|
+
} fio_iovec;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
#endif
|
|
431
|
+
|
|
432
|
+
#define FIO_SEEK_CUR SEEK_CUR
|
|
433
|
+
#define FIO_SEEK_SET SEEK_SET
|
|
434
|
+
#define FIO_SEEK_END SEEK_END
|
|
435
|
+
|
|
436
|
+
namespace PLMD{
|
|
437
|
+
namespace molfile{
|
|
438
|
+
|
|
439
|
+
static int fio_open(const char *filename, int mode, fio_fd *fd) {
|
|
440
|
+
int nfd;
|
|
441
|
+
int oflag = 0;
|
|
442
|
+
|
|
443
|
+
if (mode & FIO_READ)
|
|
444
|
+
oflag = O_RDONLY;
|
|
445
|
+
|
|
446
|
+
if (mode & FIO_WRITE)
|
|
447
|
+
oflag = O_WRONLY | O_CREAT | O_TRUNC;
|
|
448
|
+
|
|
449
|
+
#if defined(__linux)
|
|
450
|
+
/* enable direct I/O, requires block-aligned buffers and I/O sizes */
|
|
451
|
+
if (mode & FIO_DIRECT)
|
|
452
|
+
oflag |= O_DIRECT;
|
|
453
|
+
#else
|
|
454
|
+
if (mode & FIO_DIRECT)
|
|
455
|
+
return -1; /* not supported yet */
|
|
456
|
+
#endif
|
|
457
|
+
|
|
458
|
+
nfd = open(filename, oflag, 0666);
|
|
459
|
+
if (nfd < 0) {
|
|
460
|
+
return -1;
|
|
461
|
+
} else {
|
|
462
|
+
*fd = nfd;
|
|
463
|
+
return 0;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
static int fio_fclose(fio_fd fd) {
|
|
468
|
+
return close(fd);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
static fio_size_t fio_fread(void *ptr, fio_size_t size,
|
|
472
|
+
fio_size_t nitems, fio_fd fd) {
|
|
473
|
+
fio_size_t i;
|
|
474
|
+
fio_size_t len = 0;
|
|
475
|
+
fio_size_t cnt = 0;
|
|
476
|
+
|
|
477
|
+
#if 1
|
|
478
|
+
/*
|
|
479
|
+
* On Linux individual calls to read() can end up doing short reads when
|
|
480
|
+
* reading more than 2GB in a single read call, even on 64-bit machines.
|
|
481
|
+
* For large structures, e.g. 240M-atoms or larger, we have to use a loop
|
|
482
|
+
* to continue reading into the memory buffer until completion.
|
|
483
|
+
*/
|
|
484
|
+
for (i=0; i<nitems; i++) {
|
|
485
|
+
fio_size_t szleft = size;
|
|
486
|
+
fio_size_t rc = 0;
|
|
487
|
+
for (szleft=size; szleft > 0; szleft -= rc) {
|
|
488
|
+
rc = read(fd, ((char*) ptr) + (cnt*size) + (size-szleft), szleft);
|
|
489
|
+
if (rc == 0) {
|
|
490
|
+
return cnt; /* end of file scenario */
|
|
491
|
+
}
|
|
492
|
+
// if (rc != szleft) {
|
|
493
|
+
// printf("fio_fread(): rc %ld sz: %ld\n", rc, szleft);
|
|
494
|
+
// }
|
|
495
|
+
if (rc < 0) {
|
|
496
|
+
printf("fio_fread(): rc %ld sz: %ld\n", rc, size);
|
|
497
|
+
perror(" perror fio_fread(): ");
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
len += rc;
|
|
502
|
+
cnt++;
|
|
503
|
+
}
|
|
504
|
+
#else
|
|
505
|
+
for (i=0; i<nitems; i++) {
|
|
506
|
+
fio_size_t rc = read(fd, (void*) (((char *) ptr) + (cnt * size)), size);
|
|
507
|
+
if (rc != size) {
|
|
508
|
+
// printf("fio_fread(): rc %ld sz: %ld\n", rc, size);
|
|
509
|
+
// perror(" perror fio_fread(): ");
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
len += rc;
|
|
513
|
+
cnt++;
|
|
514
|
+
}
|
|
515
|
+
#endif
|
|
516
|
+
|
|
517
|
+
return cnt;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
static fio_size_t fio_readv(fio_fd fd, const fio_iovec * iov, int iovcnt) {
|
|
521
|
+
fio_size_t len;
|
|
522
|
+
int i;
|
|
523
|
+
|
|
524
|
+
#if 0
|
|
525
|
+
fio_size_t tlen;
|
|
526
|
+
for (tlen=0,i=0; i<iovcnt; i++) {
|
|
527
|
+
tlen += iov[i].iov_len;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
#if defined(USE_KERNEL_READV)
|
|
531
|
+
len = readv(fd, iov, iovcnt);
|
|
532
|
+
if (len != tlen) {
|
|
533
|
+
printf("fio_readv(): readv() rc: %ld sz: %ld\n", len, tlen);
|
|
534
|
+
printf("fio_readv(): readv() errno %d\n", errno);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if ((len < 0 && errno == ENOSYS) ||
|
|
538
|
+
(len != tlen && errno == EINVAL))
|
|
539
|
+
#endif
|
|
540
|
+
{
|
|
541
|
+
/* XXX this loop doesn't meet the atomicity requirements of
|
|
542
|
+
* real POSIX readv(), since we don't need that feature
|
|
543
|
+
*/
|
|
544
|
+
len = 0;
|
|
545
|
+
for (i=0; i<iovcnt; i++) {
|
|
546
|
+
void *ptr = iov[i].iov_base;
|
|
547
|
+
fio_size_t sz = iov[i].iov_len;
|
|
548
|
+
fio_size_t szleft = sz;
|
|
549
|
+
fio_size_t rc=0;
|
|
550
|
+
|
|
551
|
+
for (szleft=sz; szleft > 0; szleft -= rc) {
|
|
552
|
+
rc = read(fd, ((char*) ptr)+(sz-szleft), szleft);
|
|
553
|
+
if (rc == 0) {
|
|
554
|
+
return len; /* end of file scenario */
|
|
555
|
+
}
|
|
556
|
+
if (rc != szleft) {
|
|
557
|
+
printf("fio_readv(): read() rc %ld sz: %ld\n", rc, szleft);
|
|
558
|
+
}
|
|
559
|
+
if (rc < 0) {
|
|
560
|
+
printf("fio_readv(): read() rc %ld sz: %ld\n", rc, szleft);
|
|
561
|
+
perror(" perror fio_readv(): ");
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
len += iov[i].iov_len;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
#else
|
|
569
|
+
#if defined(USE_KERNEL_READV)
|
|
570
|
+
len = readv(fd, iov, iovcnt);
|
|
571
|
+
if (len < 0 && errno == ENOSYS)
|
|
572
|
+
#endif
|
|
573
|
+
{
|
|
574
|
+
/* XXX this loop doesn't meet the atomicity requirements of
|
|
575
|
+
* real POSIX readv(), since we don't need that feature
|
|
576
|
+
*/
|
|
577
|
+
len = 0;
|
|
578
|
+
for (i=0; i<iovcnt; i++) {
|
|
579
|
+
fio_size_t rc = read(fd, iov[i].iov_base, iov[i].iov_len);
|
|
580
|
+
if (rc != iov[i].iov_len)
|
|
581
|
+
break;
|
|
582
|
+
len += iov[i].iov_len;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
#endif
|
|
586
|
+
|
|
587
|
+
return len;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
static fio_size_t fio_fwrite(void *ptr, fio_size_t size,
|
|
591
|
+
fio_size_t nitems, fio_fd fd) {
|
|
592
|
+
fio_size_t i;
|
|
593
|
+
fio_size_t len = 0;
|
|
594
|
+
fio_size_t cnt = 0;
|
|
595
|
+
|
|
596
|
+
#if 1
|
|
597
|
+
/*
|
|
598
|
+
* On Linux individual calls to write() can end up doing short writes when
|
|
599
|
+
* writing more than 2GB in a single write call, even on 64-bit machines.
|
|
600
|
+
* For large structures, e.g. 240M-atoms or larger, we have to use a loop
|
|
601
|
+
* to continue writing the memory buffer until completion.
|
|
602
|
+
*/
|
|
603
|
+
int writecalls=0;
|
|
604
|
+
for (i=0; i<nitems; i++) {
|
|
605
|
+
fio_size_t szleft = size;
|
|
606
|
+
fio_size_t rc = 0;
|
|
607
|
+
for (szleft=size; szleft > 0; szleft -= rc) {
|
|
608
|
+
fio_size_t writesz = szleft;
|
|
609
|
+
|
|
610
|
+
#if 0
|
|
611
|
+
/* On some kernel versions write calls beyond 2GB may not do */
|
|
612
|
+
/* a partial write and may just return an error immediately. */
|
|
613
|
+
/* Clamp maximum write size to 1GB per write call. */
|
|
614
|
+
if (writesz > (1024L * 1024L * 1024L))
|
|
615
|
+
writesz = (1024L * 1024L * 1024L);
|
|
616
|
+
#endif
|
|
617
|
+
|
|
618
|
+
writecalls++;
|
|
619
|
+
rc = write(fd, ((char*) ptr)+(size-szleft), writesz);
|
|
620
|
+
if (rc < 0) {
|
|
621
|
+
printf("fio_fwrite(): rc %ld sz: %ld szleft: %ld calls: %d\n",
|
|
622
|
+
rc, size, szleft, writecalls);
|
|
623
|
+
perror(" perror fio_fwrite(): ");
|
|
624
|
+
return cnt;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
len += rc;
|
|
628
|
+
cnt++;
|
|
629
|
+
}
|
|
630
|
+
#else
|
|
631
|
+
for (i=0; i<nitems; i++) {
|
|
632
|
+
fio_size_t rc = write(fd, ptr, size);
|
|
633
|
+
if (rc != size) {
|
|
634
|
+
printf("fio_fwrite(): rc %ld sz: %ld\n", rc, size);
|
|
635
|
+
perror(" perror fio_fwrite(): ");
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
len += rc;
|
|
639
|
+
cnt++;
|
|
640
|
+
}
|
|
641
|
+
#endif
|
|
642
|
+
|
|
643
|
+
return cnt;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
static fio_size_t fio_fseek(fio_fd fd, fio_size_t offset, int whence) {
|
|
647
|
+
if (lseek(fd, offset, whence) >= 0)
|
|
648
|
+
return 0; /* success (emulate behavior of fseek) */
|
|
649
|
+
else
|
|
650
|
+
return -1; /* failure (emulate behavior of fseek) */
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
static fio_size_t fio_ftell(fio_fd fd) {
|
|
654
|
+
return lseek(fd, 0, SEEK_CUR);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
#endif
|
|
661
|
+
|
|
662
|
+
namespace PLMD{
|
|
663
|
+
namespace molfile{
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
/* higher level routines that are OS independent */
|
|
667
|
+
|
|
668
|
+
static int fio_write_int32(fio_fd fd, int i) {
|
|
669
|
+
return (fio_fwrite(&i, 4, 1, fd) != 1);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
static int fio_read_int32(fio_fd fd, int *i) {
|
|
673
|
+
return (fio_fread(i, 4, 1, fd) != 1);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
static int fio_write_str(fio_fd fd, const char *str) {
|
|
677
|
+
int len = strlen(str);
|
|
678
|
+
return (fio_fwrite((void *) str, len, 1, fd) != 1);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
#endif
|