Skip to content

Commit

Permalink
DOC: misc build, psirc, compiler doc updates. py27-->py35 min
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Aug 5, 2018
1 parent c3785cc commit f936b58
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 24 deletions.
8 changes: 3 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -2,11 +2,9 @@
Provide a brief description of the PR's purpose here.

## Todos
Notable points that this PR has either accomplished or will accomplish.
* **Developer Interest**
- [ ] Feature1
* **User-Facing for Release Notes**
- [ ] Feature2
Notable points (developer or user-interest) that this PR has or will accomplish.
- [ ] Feature1
- [ ] Feature2

## Questions
- [ ] Question1
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -193,4 +193,3 @@ branches:
- 1.2.x
- 1.1.x
- 1.0.x
- scfitertopy
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -162,7 +162,7 @@ message(STATUS "Psi4 install: ${CMAKE_INSTALL_PREFIX}")
# * library: not at all

set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5) # adjust with CMake minimum FindPythonInterp
find_package(PythonLibsNew 2.7 REQUIRED)
find_package(PythonLibsNew 3.5 REQUIRED)
message(STATUS "${Cyan}Found Python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${ColourReset}: ${PYTHON_EXECUTABLE} (found version ${PYTHON_VERSION_STRING})")

set(STAGED_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/stage${CMAKE_INSTALL_PREFIX})
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxman/source/build_faq.rst
Expand Up @@ -147,7 +147,7 @@ Miscellaneous
-------------

#. :ref:`faq:writepsi4`

#. :ref:`faq:psi4logos`


.. #. :ref:`faq:getversion`
Expand Down
73 changes: 59 additions & 14 deletions doc/sphinxman/source/build_planning.rst
Expand Up @@ -180,7 +180,7 @@ What are the tools and dependencies strictly required for building Psi4

The core |PSIfour| build requires the software below. Note that
practically everything (including Python, CMake, NumPy, BLAS/LAPACK,
Libint, and even C++ compilers on Linux) can be
Libint, and even C++ compilers on Linux and Mac) can be
satisfied through conda. The links below give examples of how to configure
that software for |PSIfour| and any notes and warnings pertaining to it.

Expand All @@ -189,7 +189,7 @@ that software for |PSIfour| and any notes and warnings pertaining to it.
* :ref:`Optimized BLAS and LAPACK libraries <cmake:lapack>` (preferably NOT one supplied by a standard
Linux distribution)

* :ref:`Python interpreter and headers <cmake:python>` (2.7, 3.5, or 3.6) https://www.python.org/
* :ref:`Python interpreter and headers <cmake:python>` (3.5, 3.6, or 3.7) https://www.python.org/

* CMake (3.3+) http://www.cmake.org/download/

Expand Down Expand Up @@ -217,7 +217,7 @@ Additionally, there are runtime-only dependencies:
* networkx https://github.com/networkx/networkx

* deepdiff https://github.com/seperman/deepdiff


.. _`faq:addondepend`:

Expand Down Expand Up @@ -249,9 +249,9 @@ are available pre-built from conda.
* HDF5 https://support.hdfgroup.org/HDF5/
* zlib http://www.zlib.net/

* :ref:`libefp <cmake:libefp>` |w---w| :ref:`[what is this?] <sec:libefp>` `[min version] <https://github.com/psi4/psi4/blob/master/external/upstream/libefp/CMakeLists.txt#L1>`_
* :ref:`PylibEFP & libefp <cmake:libefp>` |w---w| :ref:`[what is this?] <sec:libefp>` `[min version] <https://github.com/psi4/psi4/blob/master/external/upstream/libefp/CMakeLists.txt#L1>`_

* :ref:`erd <cmake:erd>` |w---w| :ref:`[what is this?] <sec:erd>` `[min version] <https://github.com/psi4/psi4/blob/master/external/upstream/erd/CMakeLists.txt#L2>`_
.. * :ref:`erd <cmake:erd>` |w---w| :ref:`[what is this?] <sec:erd>` `[min version] <https://github.com/psi4/psi4/blob/master/external/upstream/erd/CMakeLists.txt#L2>`_
* :ref:`Fortran Compiler <cmake:fortran>`
Expand Down Expand Up @@ -284,6 +284,10 @@ Additionally, there are runtime-only capabilities:

* snsmp2 |w---w| :ref:`[what is this?] <sec:snsmp2>`

* resp

* gpu_dfcc

.. _`faq:setupmaxameri`:

How to configure code to use high angular momentum basis sets
Expand Down Expand Up @@ -683,7 +687,9 @@ How to run Psi4 as executable or Python module from conda installation
The configuration commands below are generic versions of the ones printed
to your screen as advice upon installing |PSIfour| into a Anaconda,
Miniconda, or Psi4conda distribution, :samp:`{condadist} =
{ana|mini|psi4}conda`. If ``which conda python psi4`` points to your
{ana|mini|psi4}conda`. To see the message again after initial installation,
with the conda environment active, run ``.psi4-post-link.sh``.
If ``which conda python psi4`` points to your
:samp:`{condadist}` and ``echo $PSI_SCRATCH`` is set, skip ahead to the
"Run |PSIfour|\" commands below. Otherwise, issue the following
commands directly in your terminal or place them into your "rc" file and
Expand Down Expand Up @@ -877,7 +883,7 @@ G. Build on Linux with specific (Intel) compilers from :envvar:`PATH`
-DCMAKE_C_FLAGS="-gnu-prefix=${CONDA_PREFIX}/bin/${HOST} --sysroot=${CONDA_PREFIX}/${HOST}/sysroot" \
-DCMAKE_CXX_FLAGS="-gnu-prefix=${CONDA_PREFIX}/bin/${HOST} --sysroot=${CONDA_PREFIX}/${HOST}/sysroot"
H. Build on Linux with specific (GCC) compilers from
H. Build on Linux with specific (GCC) compilers from
from conda in **activated** environment
(:envvar:`CONDA_PREFIX` and :envvar:`HOST` are defined upon
activation)
Expand Down Expand Up @@ -924,8 +930,39 @@ for ``gcc`` and ``g++``. Just install `XCode
<https://itunes.apple.com/us/app/xcode/id497799835>`_. Some old versions
of XCode can't handle some of the advanced C++ language features, but this
is a *software* not *hardware* limitation. Checks for version compliance
performed at build-time.
performed at build-time. Note that this "AppleClang" will not be compatible
with conda Mac packages using C++11, nor can it make use of OpenMP directives.
Another route to obtaining ``clang`` compilers without the above limitations
is through conda.
.. code-block:: bash
# Install Clang 4.0.1 into a non-primary conda environment
>>> conda create -n clang401 clangxx_osx-64 clang_osx-64 llvm-openmp intel-openmp
# To Build, activate environment (prepends PATH and defines environment variables CLANG, CLANGXX, HOST, etc):
>>> conda activate clang401
>>> echo ${CLANGXX}
/path/to/miniconda/envs/clang401/bin/x86_64-apple-darwin13.4.0-clang++
>>> echo ${HOST}
x86_64-apple-darwin13.4.0
# build with Clang
>>> cmake -H. -Bbuild \
-DCMAKE_C_COMPILER=${CLANG} \
-DCMAKE_CXX_COMPILER=${CLANGXX} \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DOpenMP_CXX_FLAG="-fopenmp=libiomp5"
# build with Intel
>>> cmake -H. -Bbuild \
-DCMAKE_C_COMPILER=icc \
-DCMAKE_CXX_COMPILER=icpc \
-DCMAKE_C_FLAGS="-clang-name=${CLANG}" \
-DCMAKE_CXX_FLAGS="-clang-name=${CLANG} -clangxx-name=${CLANGXX} -stdlib=libc++ -I${CONDA_PREFIX}/include/c++/v1"
# Configure and build
.. _`faq:modgcc`:
Expand Down Expand Up @@ -985,7 +1022,7 @@ system. The latter route, tested on Linux with Intel compilers, is below.
# Configure and build
# To Run:
>>> export LD_LIBRARY_PATH=${GCC5}/lib:$LD_LIBRARY_PATH
>>> export LD_LIBRARY_PATH=${GCC7}/lib:$LD_LIBRARY_PATH
.. _`faq:cray`:
Expand Down Expand Up @@ -1050,7 +1087,7 @@ On Linux and Mac, the following work nicely.
* Packages to install for specific OS or package managers:
* Ubuntu ``gfortran``
* conda ``gfortran_linux-64`` to get ``gfortran``
* conda ``gfortran_linux-64`` or ``gfortran_osx-64`` to get ``gfortran``
.. _`faq:macgfortran`:
Expand All @@ -1059,9 +1096,9 @@ How to obtain a Fortran compiler for Mac without Fink, MacPorts, or Homebrew
----------------------------------------------------------------------------
Xcode does not provide a Fortran compiler. A way to get one is to download
the ``gcc`` conda package. This provides ``gcc``, ``g++``, and
``gfortran`` compilers for Mac. The two former are 4.8.5 and so are too
old to compile |PSIfour|, but the Fortran compiler will work.
the ``gfortran_osx-64`` conda package. This provides
``gfortran`` compilers for Mac. The version is 4.8.5, which is quite old,
but the Fortran compiler will work.
.. Xcode does not provide a Fortran compiler. Although a Fortran compiler is
.. not required for Psi4, a broken one can prevent correct configuration. Do
Expand Down Expand Up @@ -1465,7 +1502,7 @@ How to run a subset of tests
CTest allows flexibly partitioned running of the test suite. In
the examples below, *testname* are regex of :source:`test names <tests>`,
and *testlabel* are regex of labels (*e.g.*, ``cc``, ``mints``,
``libefp`` defined `[here, for example]
``libefp`` defined `[here, for example]
<https://github.com/psi4/psi4/blob/master/tests/ci-property/CMakeLists.txt#L3)>`_.
* Run tests in parallel with ``-j`` flag. For maximum parallelism: :samp:`ctest -j\`getconf _NPROCESSORS_ONLN\`\ `
Expand Down Expand Up @@ -1574,6 +1611,14 @@ Ways to refer to |PSIfour| in text, in order of decreasing goodness:
* **NOT** ``PSI4`` or ``PSI``
.. _`faq:psi4logos`:
How to get a Psi4 logo file
---------------------------
All image files are stored in https://github.com/psi4/psi4media
.. _`faq:localaddon`:
How to use a local Add-On repository in the Psi4 build
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxman/source/conf.py.in
Expand Up @@ -390,6 +390,7 @@ rst_prolog = """

extlinks = {'source': ('https://github.com/psi4/psi4/blob/master/%s', 'psi4/'),
'srcsample': ('https://github.com/psi4/psi4/blob/master/samples/%s/input.dat', ''),
'srcsamplepy': ('https://github.com/psi4/psi4/blob/master/samples/%s/input.py', ''),
'srcbasis': ('https://github.com/psi4/psi4/blob/master/psi4/share/psi4/basis/%s.gbs', ''),
'srcplugin': ('https://github.com/psi4/psi4/blob/master/plugins/%s', ''),
'srcefpfrag':('https://github.com/ilyak/libefp/blob/master/fraglib/%s.efp', ''),
Expand Down
9 changes: 9 additions & 0 deletions doc/sphinxman/source/external.rst
Expand Up @@ -147,6 +147,15 @@ messy) flag will prevent files being deleted at the end of the run::
|psirc| File
============

.. caution:: It is very easy to forget about the |psirc| file you once
created, leading to great confusion over why all your jobs are using
the wrong memory or are suddenly not density-fit. Also be aware that
|psirc| contents count as part of your input file (invoked after
e.g. ``from psi4 import *`` and before your Psithon-->Python parsed
input commands), so these settings take priority over command-line
arguments to the ``psi4`` executable.
Please use the |psirc| file conscientiously.

If using the environment variable :envvar:`PSI_SCRATCH` is inconvenient,
or if some ``psi4_io`` commands must be present in all input files,
the |psirc| resource file can be used (example :source:`samples/example_psi4rc_file`).
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxman/source/freq.rst
Expand Up @@ -63,7 +63,7 @@ return_wfn=True)`` as the frequencies can be accessed through
info through ``psi4.core.Wavefunction.frequency_analysis``
(note no parentheses). Examples of using this data
structure can be found :srcsample:`fd-freq-gradient` and
:srcsample:`python/vibanalysis`. Formatted printing of vibrational
:srcsamplepy:`python/vibanalysis`. Formatted printing of vibrational
results is available through :py:func:`qcdb.vib.print_vibs`.

.. _`table:frequency_analysis`:
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxman/source/thermo.rst
Expand Up @@ -82,7 +82,7 @@ ENTHALPHY", "THERMAL ENERGY", "ENTHALPY", "GIBBS FREE ENERGY".
But additionally, every valid combination of {S, Cv, Cp, ZPE, E, H, G}
with {elec, trans, rot, vib, corr, tot} (e.g., vibrational entropy,
S_vib, and enthalpy correction, H_corr) is returned by dictionary
from the ``thermo`` function. See :srcsample:`python/vibanalysis`
from the ``thermo`` function. See :srcsamplepy:`python/vibanalysis`
(near the end) for an example.


Expand Down

0 comments on commit f936b58

Please sign in to comment.