diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index bdb3a047bf..e707ce0eef 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -141,18 +141,19 @@ jobs: - name: Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.8' - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory echo $CONDA/bin >> $GITHUB_PATH - name: Install conda packages run: | - conda install setuptools cython numpy pytest mock curl + conda env update --file devtools/ci/environment.yml --name base - name: Install cpptraj run: | export PATH=$HOME/bin:${PATH} export LD_LIBRARY_PATH=$HOME/lib:${LD_LIBRARY_PATH} + export MAKE_COMMAND="make -j2" ./configure --buildlibs -openmp -shared gnu source cpptraj.sh make -j2 libcpptraj diff --git a/configure b/configure index 31e4cb7aa3..b635608b99 100755 --- a/configure +++ b/configure @@ -1031,7 +1031,7 @@ EOF fi elif [ "$MKL_FFTW" = 'yes' ] ; then # Using FFTW from MKL - TestProgram " Checking FFTW3" "$CXX" "$CXXFLAGS ${LIB_INCL[$LBLAS]}" testp.cpp "${LIB_FLAG[$LBLAS]}" + TestProgram " Checking MKL FFTW3" "$CXX" "$CXXFLAGS ${LIB_INCL[$LBLAS]}" testp.cpp "${LIB_FLAG[$LBLAS]}" else TestProgram silent " Checking FFTW3" "$CXX" "$CXXFLAGS ${LIB_INCL[$LFFTW3]}" testp.cpp "${LIB_FLAG[$LFFTW3]}" if [ $? -ne 0 ] ; then diff --git a/devtools/ci/environment.yml b/devtools/ci/environment.yml index 34d6a61f6f..4bff2d813b 100644 --- a/devtools/ci/environment.yml +++ b/devtools/ci/environment.yml @@ -1,10 +1,11 @@ channels: - - defaults + - conda-forge dependencies: - python=3.8 + - pyflakes - numpy - - mock - - pytest - cython - setuptools - - curl + - pytest + - mock + - curl diff --git a/doc/cpptraj.lyx b/doc/cpptraj.lyx index c54a2db1f6..6641ba7a18 100644 --- a/doc/cpptraj.lyx +++ b/doc/cpptraj.lyx @@ -8341,7 +8341,7 @@ The following general commands are available: \begin_layout Standard \align center \begin_inset Tabular - + @@ -8734,6 +8734,26 @@ parallelanalysis \begin_inset Text +\begin_layout Plain Layout +parsedata +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Parse timing data from CPPTRAJ output. +\end_layout + +\end_inset + + + + +\begin_inset Text + \begin_layout Plain Layout precision \end_layout @@ -11455,6 +11475,175 @@ noprefix "false" . \end_layout +\begin_layout Subsection +parsedata +\end_layout + +\begin_layout LyX-Code +parsetiming ... + [out ] [name ] +\end_layout + +\begin_layout LyX-Code + [sortby {time|cores|filename}] [includebad] [showdetails] +\end_layout + +\begin_layout LyX-Code + [type {trajproc|trajread|actframe}] [reverse] +\end_layout + +\begin_layout LyX-Code + [groupout [grouptype {prefix|name|kind}]] +\end_layout + +\begin_deeper +\begin_layout Description + Files containing CPPTRAJ output to get timing data from. +\end_layout + +\begin_layout Description +[out +\begin_inset space ~ +\end_inset + +] Write total sorted timing sets to . +\end_layout + +\begin_layout Description +[name +\begin_inset space ~ +\end_inset + +] Set name for timing data sets. +\end_layout + +\begin_layout Description +[sortby +\begin_inset space ~ +\end_inset + +{time|cores|filename}] Sort timing data sets by either time, number of cores + (MPI processes * OpenMP threads), or file name. +\end_layout + +\begin_layout Description +[includebad] If specified, include run output for which timing data cannot + be extracted (e.g. + an incomplete/failed run). +\end_layout + +\begin_layout Description +[showdetails] If specified, details about each run will be printed to STDOUT. +\end_layout + +\begin_layout Description +[type +\begin_inset space ~ +\end_inset + +{trajproc|trajread|actframe} If specified, report time other than the total + time (which is the default): +\end_layout + +\begin_deeper +\begin_layout Description +trajproc Total trajectory processing time (trajectory I/O plus action frame + time). +\end_layout + +\begin_layout Description +trajread Trajectory read time (requires compiling with '-timer' configure + option/-DTIMER compiler define). +\end_layout + +\begin_layout Description +actframe Action frame time (requires compiling with '-timer' configure option/-D +TIMER compiler define). +\end_layout + +\end_deeper +\begin_layout Description +[reverse] Instead of longest time to shortest time, sort shortest time to + longest time. +\end_layout + +\begin_layout Description +[groupout +\begin_inset space ~ +\end_inset + +] Group run output by a property and write to a file. + Additional details will be written like speedup and efficiency (relative + to the slowest run). +\end_layout + +\begin_deeper +\begin_layout Description +[grouptype +\begin_inset space ~ +\end_inset + +{prefix|name|kind}] Property to group runs by in group output file. +\end_layout + +\begin_deeper +\begin_layout Description +prefix Group by directory prefix. +\end_layout + +\begin_layout Description +name Group by run type name (see +\emph on +[name] +\emph default + below). +\end_layout + +\begin_layout Description +kind Group by run type name; OpenMP runs are separated by number of OpenMP + threads. +\end_layout + +\end_deeper +\end_deeper +\begin_layout Standard +DataSets Created: +\end_layout + +\begin_layout Description + Set containing sorted run times. +\end_layout + +\begin_layout Description +[name] Set containing shortedhand run names. + Consists of a prefix (S for serial, O for OpenMP, M for MPI, H for hybrid + MPI/OpenMP) followed by numbers indicating number of MPI processes 'x' + OpenMP threads; e.g., H16x4 means a hybrid run consisting of 16 MPI processes + and 4 OpenMP threads per process. + If CUDA is active, the name will be wrapped in 'G()', e.g. + G(H16x4). +\end_layout + +\begin_layout Description +[dir] Set containing output directory prefixes. + If no directory prefix, just contains output file name. +\end_layout + +\end_deeper +\begin_layout Standard +The +\series bold +\emph on +parsedata +\series default +\emph default + command can be used to extract timing data from CPPTRAJ output. +\end_layout + \begin_layout Subsection precision \end_layout diff --git a/src/Analysis_TICA.cpp b/src/Analysis_TICA.cpp new file mode 100644 index 0000000000..a7204be90f --- /dev/null +++ b/src/Analysis_TICA.cpp @@ -0,0 +1,157 @@ +#include "Analysis_TICA.h" +#include "CpptrajStdio.h" +#include "Matrix.h" // TODO DataSet? +#include // sqrt + +/** CONSTRUCTOR */ +Analysis_TICA::Analysis_TICA() : + TgtTraj_(0), + lag_(0), + useMass_(false) +{ + SetHidden(true); +} + +// Analysis_TICA::Help() +void Analysis_TICA::Help() const { + mprintf("[crdset ] [lag