Re: [AMBER-Developers] configure_cmake.py

From: Gerald Monard <gerald.monard.gmail.com>
Date: Fri, 9 Apr 2021 10:05:45 +0900

Thanks Dan!
Well, quick_cmake_install was a shell script, but it can turn out more
complex and less maintainable than a python script.
And I am not familiar with getopts, so quick_cmake_install was just a huge
"case ... esac" block. Not easy to add more features imho.
Overall, I found the argparse module in python way more fun, easier to read
and tunable :-).

Gerald.

On Fri, Apr 9, 2021 at 9:54 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Hey Gerald, this is great! Charmm actually did something similar when they
> moved to cmake (in fact it is the recommended way to run cmake with
> charmm).
>
> Does it have to be python? I feel like regular POSIX sh might be a better
> choice for something simple like configuring cmake.
>
> -Dan
>
> On Thu, Apr 8, 2021 at 7:22 PM Gerald Monard <gerald.monard.gmail.com>
> wrote:
>
> > Hello,
> >
> > Given the recent threads on configure vs cmake, a new script has been
> added
> > in the master branch in the build/ directory: configure_cmake.py.
> > What I like(d) with configure is the way you can quickly configure Amber
> on
> > the command line with options like -mpi, -cuda, etc. What I don't like
> with
> > cmake is all these -DXXX=YYY you need to pass that I always forgot. The
> > wiki is nice but you need to always have the page opened somewhere to
> know
> > where to go. And I haven't found any `cmake -h` command that would give
> me
> > all available options in one go.
> > I quickly wrote last year a script called quick_cmake_install that some
> of
> > you may have used. It was a quick workaround with a few options but
> needed
> > a complete rewrite.
> > Here enters configure_cmake.py. I am adding the help (configure_cmake.py
> > -h) at the bottom of this email. It calls cmake in a "configure" kind of
> > way. It should be easily expandable to more options. Please have a test
> and
> > give me your comments on how to improve it. If you dig into the script,
> you
> > will see that it should not be too complicated to modify it also.
> >
> > Gerald.
> >
> > $ configure_cmake.py -h
> > usage: configure_cmake.py [-h] [--source SOURCE] [...] --prefix PREFIX
> >
> > Configure Amber(Tools) using cmake
> >
> > optional arguments:
> > -h, --help show this help message and exit
> >
> > Installation location (required):
> > --prefix PREFIX Location of the install directory
> >
> > Source location:
> > The Amber(Tools) source must be provided either using the AMBERHOME
> > variable or the --source optional argument.
> >
> > --source SOURCE location of the source directory, if AMBERHOME is
> > not set
> >
> > Compiler and numerical library selection:
> > --compiler {GNU,PGI,INTEL,CRAY,MSVC,CLANG,AUTO,MANUAL}
> > specify which compiler to use (default is GNU)
> > --blas {All,OpenBLAS,Goto,ACML,Apple,NAS,Generic}
> > which version of BLAS and LAPACK to look for
> > (default: All)
> >
> > Accelaration related arguments:
> > --mpi Turns on MPI parallelization
> > --cuda Turns on CUDA-accelerated version of Amber(Tools)
> > --openmp Turns on OpenMP parallelization
> >
> > Optional builds:
> > --quick Build QUICK ab initio QM code
> > --no-gui, --noX11 Do not build GUI parts of leap (default: build)
> > --disable-tools DISABLE_TOOLS
> > Comma separated list of Amber Tools not to be
> built
> >
> > Tests, examples, and benchmarks:
> > --install-tests Install tests, examples, and benchmarks (default:
> > do not install)
> > --no-install-tests
> >
> > Python related stuff:
> > --python Build related python packages (default)
> > --no-python
> > --with-python PYTHON_EXE
> > Location of the python executable (default: path
> to
> > system python, if found)
> > --miniconda Download and use the Miniconda python environment
> > (default)
> > --no-miniconda
> >
> > Handling of internal and external libraries:
> > --force-internal-libs INTERNAL_LIBS
> > Comma separated list of 3rd party libraries to be
> > built from Amber's bundled version (list printed at the end of the cmake
> > build report)
> > --force-external-libs EXTERNAL_LIBS
> > Comma separated list of 3rd party libraries to be
> > used from the system (list printed at the end of the cmake build report)
> > --force-disable-libs DISABLE_LIBS
> > Comma separated list of 3rd party libraries to be
> > disabled (list printed at the end of the cmake build report)
> >
> > Updates:
> > --check-updates Check for new patches from the Amber update
> server
> > (default)
> > --no-check-updates
> > --apply-updates
> > --no-apply-updates Do not apply available updates for Amber and
> > AmberTools (default)
> > _______________________________________________
> > AMBER-Developers mailing list
> > AMBER-Developers.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber-developers
> >
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Apr 08 2021 - 18:30:02 PDT
Custom Search