Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda package for cpptraj #1125

Open
wants to merge 26 commits into
base: conda
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6c3d897
first complete cpptraj build--still needs packaging work
dacase Dec 19, 2024
0546fe9
tweaks to readline for first conda build
dacase Dec 19, 2024
3110aca
tweaks to build.sh: no -openmp, include activate
dacase Dec 19, 2024
44e4b19
to first version 0.1 on linux
dacase Dec 20, 2024
bba2b94
include <algorithm> header, needed for the copy() and fill() methods
dacase Dec 21, 2024
d81868f
defined NEED_EXTERN_PC to prevent duplicate symbols in libreadine.a. …
dacase Dec 21, 2024
ed4f9a6
use clang for Darwin, gnu for Linux
dacase Dec 21, 2024
5a0e164
fix typos in build.sh; add arpack, openmm and openmp libraries
dacase Dec 21, 2024
dbd119e
Revert "defined NEED_EXTERN_PC to prevent duplicate symbols in librea…
dacase Dec 21, 2024
3523e66
Revert "tweaks to readline for first conda build"
dacase Dec 21, 2024
8d5d4b8
use -lncurses rather than ltermcap for external readline; will this b…
dacase Dec 22, 2024
40e0ddc
look for readline headers in readline subdirectory, as I think should…
dacase Dec 22, 2024
3b476d9
add readline to build, test to package
dacase Dec 22, 2024
c4e5807
bump to version 0.3, mpi, pnetcdf, readline
dacase Dec 22, 2024
4698ed7
build mpi, cuda and serial variants on Linux
dacase Dec 23, 2024
a92de0f
fix glitch in build.sh that led to cpptraj itself not getting built
dacase Dec 23, 2024
5c28c8e
update location and sha to version 0.4
dacase Dec 23, 2024
6814bbb
minor tweaks to mkrelease
dacase Dec 23, 2024
d4344f8
only use coreutils and nvcc_linux-64 on linux
dacase Dec 23, 2024
466deca
seems to be able to compile on osx with openmp enabled
dacase Dec 25, 2024
aa8cd72
go back to using path: rather than url:/sha: for now
dacase Dec 27, 2024
1a7f1a8
mostly working, but need to get recursive headers into include/cpptra…
dacase Jan 6, 2025
07d6c59
Try to improve compatibility with system readline libraries (#1126)
drroe Jan 8, 2025
14d4b0d
no longer need to skip aarch64
dacase Jan 10, 2025
a2a43ea
Have configure and cmake install headers for libcpptraj (#1129)
drroe Jan 14, 2025
f7493ef
Merge branch 'master' into conda
dacase Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Install conda packages
run: |
which conda
conda install conda=23.11.0 python=3.10
conda install conda=24.11.0 python=3.10
conda --version
conda env update --file devtools/ci/environment.yml --name base
- name: Install cpptraj
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ unittest: config.h
# Clean up
clean: config.h
cd src && $(MAKE) clean
cd test && $(MAKE) clean
cd unitTests && $(MAKE) clean
# cd test && $(MAKE) clean
# cd unitTests && $(MAKE) clean

docs: src/cpptraj.Doxyfile
cd doc && make docs
Expand Down
69 changes: 54 additions & 15 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ LIB_D_ON[$LFFTW3]='-DFFTW_FFT'
LIB_DOFF[$LFFTW3]=''
LIB_TYPE[$LFFTW3]='cpp'

LIB_STAT[$LREADLINE]='bundled'
LIB_STAT[$LREADLINE]='enabled'
LIB_CKEY[$LREADLINE]='readline'
LIB_HOME[$LREADLINE]='readline'
LIB_HOME[$LREADLINE]=''
LIB_FLAG[$LREADLINE]='-lreadline'
LIB_STTC[$LREADLINE]='libreadline.a'
LIB_D_ON[$LREADLINE]=''
Expand Down Expand Up @@ -1073,13 +1073,42 @@ EOF
TestReadline() {
cat > testp.cpp <<EOF
#include <cstdio>
#include <readline.h>
#include <readline/readline.h>
static char *line_read = (char *)NULL;
// Do not want to actually run this so leave outside main
void Unused() { line_read = readline(""); }
int main() { return 0; }
EOF
TestProgram " Checking Readline" "$CXX" "$CXXFLAGS ${LIB_INCL[$LREADLINE]}" testp.cpp "${LIB_FLAG[$LREADLINE]}"

if [ "${LIB_STAT[$LREADLINE]}" = 'specified' ] ; then
TestProgram " Checking Readline" "$CXX" "$CXXFLAGS ${LIB_INCL[$LREADLINE]}" testp.cpp "${LIB_FLAG[$LREADLINE]}"
else
# Test with just -lreadline
TestProgram silent " Checking Readline" "$CXX" "$CXXFLAGS ${LIB_INCL[$LREADLINE]}" testp.cpp "${LIB_FLAG[$LREADLINE]}"
lreadline_err=$?
if [ $lreadline_err -ne 0 ] ; then
# Try -ltermcap
TestProgram silent " Checking Readline with termcap" "$CXX" "$CXXFLAGS ${LIB_INCL[$LREADLINE]}" testp.cpp "${LIB_FLAG[$LREADLINE]} -ltermcap"
lreadline_err=$?
if [ $lreadline_err -eq 0 ] ; then
LIB_FLAG[$LREADLINE]="${LIB_FLAG[$LREADLINE]} -ltermcap"
fi
fi
if [ $lreadline_err -ne 0 ] ; then
# Try -lncurses
TestProgram silent " Checking Readline with ncurses" "$CXX" "$CXXFLAGS ${LIB_INCL[$LREADLINE]}" testp.cpp "${LIB_FLAG[$LREADLINE]} -lncurses"
lreadline_err=$?
if [ $lreadline_err -eq 0 ] ; then
LIB_FLAG[$LREADLINE]="${LIB_FLAG[$LREADLINE]} -lncurses"
fi
fi
if [ $lreadline_err -ne 0 ] ; then
echo "No readline available; using bundled readline."
LIB_STAT[$LREADLINE]='bundled'
LIB_FLAG[$LREADLINE]='readline/libreadline.a'
LIB_INCL[$LREADLINE]='-I.'
fi
fi
}

TestXdrfile() {
Expand Down Expand Up @@ -1503,22 +1532,22 @@ SetupLibraries() {
lflag="-L$lhdir ${LIB_FLAG[$i]}"
fi
# Library-specific CPPTRAJ_INC fixes when home specified.
if [ $i -eq $LREADLINE ] ; then
linc="$linc/readline"
fi
#if [ $i -eq $LREADLINE ] ; then
# linc="$linc/readline"
#fi
if [ $i -eq $LXDRFILE ] ; then
linc="$linc/xdrfile"
fi
fi
# Library-specific flag fixes
if [ $i -eq $LREADLINE ] ; then
# if [ $i -eq $LREADLINE ] ; then
# For external readline, we need to link libtermcap for windows
# and libncurses for Linux
#if [ $USE_WINDOWS -eq 1 ]; then
if [ $USE_WINDOWS -eq 1 ]; then
lflag="$lflag -ltermcap"
#else
# lflag="$lflag -lncurses"
#fi
else
lflag="$lflag -lncurses"
fi
elif [ $i -eq $LSANDER ] ; then
# Always specify libsander location to prevent pulling in
# other amber libraries.
Expand Down Expand Up @@ -1662,7 +1691,7 @@ SetupCompilers() {
if [ -z "$FC" ]; then FC=gfortran; fi
hostflags=''
optflags='-O3'
ompflag='-fopenmp'
ompflag='-Xclang -fopenmp'
freefmtflag='-ffree-form'
foptflags='-O3'
FLINK='-lgfortran'
Expand All @@ -1671,8 +1700,8 @@ SetupCompilers() {
# Check the GNU compiler version
CheckCompilerVersion gcc
# Set version-specific flags
if [ $cc_version_major -ge 14 ] ; then
# Needed for readline with gcc >= 14
if [ $cc_version_major -ge 13 ] ; then
# Needed for readline with gcc >= 13
CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_XOPEN_SOURCE"
fi
;;
Expand Down Expand Up @@ -2565,6 +2594,12 @@ if [ -z "`which grep`" ] ; then
Err "CPPTRAJ configure requires 'grep'."
fi

# Check for the 'install/ binary
INSTALL=`which install`
if [ -z "$INSTALL" ] ; then
Err "CPPTRAJ configure requires 'install'."
fi

#echo "Path to configure: $WORKDIR"
#echo "Current dir : $CURRENTDIR"

Expand Down Expand Up @@ -2953,6 +2988,10 @@ CPPTRAJDAT="$CPPTRAJDAT"

INSTALL_TARGETS=$INSTALL_TARGETS

INSTALL=$INSTALL
INSTALL_PROGRAM=$INSTALL
INSTALL_DATA=$INSTALL -m 644

EOF
if [ ! -z "$DBGFLAGS" ] ; then
echo "DBGFLAGS=$DBGFLAGS" >> config.h
Expand Down
23 changes: 23 additions & 0 deletions devtools/GetHeaders.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Get all header files

WORKDIR=`pwd`
BASEDIR=`basename $WORKDIR`
if [ "$BASEDIR" != 'src' ] ; then
echo "Should be executed from the CPPTRAJ src directory."
exit 1
fi

OUTFILE='cpptrajheaders'
echo "# All cpptraj headers that should be installed for the cpptraj library." > $OUTFILE
echo "CPPTRAJ_HEADERS = \\" >> $OUTFILE

for DIR in . Cluster Structure Energy ; do
for FILE in `ls $DIR/*.h` ; do
echo " $FILE \\" >> $OUTFILE
done
done
echo "" >> $OUTFILE

exit 0
20 changes: 5 additions & 15 deletions doc/CpptrajManual.lyx
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 620
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\maintain_unincluded_children no
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto-legacy
\fontencoding auto
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_roman_osf false
\font_sans_osf false
\font_typewriter_osf false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
Expand Down Expand Up @@ -64,9 +62,7 @@
\suppress_date false
\justification true
\use_refstyle 1
\use_formatted_ref 0
\use_minted 0
\use_lineno 0
\index Index
\shortcut idx
\color #008000
Expand All @@ -82,16 +78,11 @@
\papercolumns 1
\papersides 1
\paperpagestyle default
\tablestyle default
\tracking_changes false
\output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header

\begin_body
Expand Down Expand Up @@ -133,7 +124,6 @@ LatexCommand tableofcontents
\begin_inset CommandInset include
LatexCommand input
filename "cpptraj.lyx"
literal "true"

\end_inset

Expand Down
Binary file modified doc/CpptrajManual.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions doc/DocumentChecksums.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
b37726e7a841f6fc695ecd7fb040ffbf CpptrajDevelopmentGuide.lyx
786c4aec62d60a3f9265dec52b767e02 cpptraj.lyx
07c4039e732fc2eb1df0c1e0863cb949 CpptrajManual.lyx
1f4d9c647b6717314560290a4d3f9f06 cpptraj.lyx
5d9b5b5ed47a3ded57b6464df99b3585 CpptrajManual.lyx
Loading