[yt-svn] commit/yt: brittonsmith: Merged in atmyers/yt (pull request #1944)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Jan 27 09:39:25 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/c20ca31d9d7c/
Changeset:   c20ca31d9d7c
Branch:      yt
User:        brittonsmith
Date:        2016-01-27 17:39:16+00:00
Summary:     Merged in atmyers/yt (pull request #1944)

Adding optional unstructured mesh flag to the get_yt.sh script
Affected #:  2 files

diff -r f6d9b67a3e76eda32543a159c544c919d5e5895a -r c20ca31d9d7c34e66ab9ae02f3868af0fd08ba7f doc/get_yt.sh
--- a/doc/get_yt.sh
+++ b/doc/get_yt.sh
@@ -23,7 +23,8 @@
 DEST_SUFFIX="yt-conda"
 DEST_DIR="`pwd`/${DEST_SUFFIX/ /}"   # Installation location
 BRANCH="yt" # This is the branch to which we will forcibly update.
-INST_YT_SOURCE=0 # Do we do a source install of yt?
+INST_YT_SOURCE=1 # Do we do a source install of yt?
+INST_UNSTRUCTURED=1 # Do we want to build with unstructured mesh support?
 
 ##################################################################
 #                                                                #
@@ -40,6 +41,25 @@
 MINICONDA_VERSION="latest"
 YT_RECIPE_REPO="https://bitbucket.org/yt_analysis/yt_conda/raw/default"
 
+if [ $INST_UNSTRUCTURED -eq 1 ]
+then
+  if [ $INST_YT_SOURCE -eq 0 ]
+  then
+      echo "yt must be compiled from source to use the unstructured mesh support."
+      echo "Please set INST_YT_SOURCE to 1 and re-run."
+      exit 1
+  fi
+  if [ `uname` = "Darwin" ]
+  then
+      EMBREE="embree-2.8.0.x86_64.macosx"
+      EMBREE_URL="https://github.com/embree/embree/releases/download/v2.8.0/$EMBREE.tar.gz"
+  else
+      EMBREE="embree-2.8.0.x86_64.linux"
+      EMBREE_URL="https://github.com/embree/embree/releases/download/v2.8.0/$EMBREE.tar.gz"
+  fi
+  PYEMBREE_URL="https://github.com/scopatz/pyembree/archive/master.zip"
+fi
+
 function do_exit
 {
     echo "********************************************"
@@ -276,6 +296,11 @@
 YT_DEPS+=('mercurial')
 YT_DEPS+=('sympy')
 
+if [ $INST_UNSTRUCTURED -eq 1 ]
+then
+  YT_DEPS+=('netcdf4')   
+fi
+
 # Here is our dependency list for yt
 log_cmd conda update --yes conda
 
@@ -285,6 +310,32 @@
     log_cmd conda install --yes ${YT_DEP}
 done
 
+if [ $INST_UNSTRUCTURED -eq 1 ]
+then
+
+  echo "Installing embree"
+  mkdir ${DEST_DIR}/src
+  cd ${DEST_DIR}/src
+  ( ${GETFILE} "$EMBREE_URL" 2>&1 ) 1>> ${LOG_FILE} || do_exit
+  log_cmd tar xfz ${EMBREE}.tar.gz
+  log_cmd mv ${DEST_DIR}/src/${EMBREE}/include/embree2 ${DEST_DIR}/include
+  log_cmd mv ${DEST_DIR}/src/${EMBREE}/lib/lib*.* ${DEST_DIR}/lib
+  if [ `uname` = "Darwin" ]
+  then
+    ln -s ${DEST_DIR}/lib/libembree.2.dylib ${DEST_DIR}/lib/libembree.dylib
+    install_name_tool -id ${DEST_DIR}/lib/libembree.2.dylib ${DEST_DIR}/lib/libembree.2.dylib
+  else
+    ln -s ${DEST_DIR}/lib/libembree.so.2 ${DEST_DIR}/lib/libembree.so
+  fi
+
+  echo "Installing pyembree from source"
+  ( ${GETFILE} "$PYEMBREE_URL" 2>&1 ) 1>> ${LOG_FILE} || do_exit
+  log_cmd unzip ${DEST_DIR}/src/master.zip
+  pushd ${DEST_DIR}/src/pyembree-master
+  log_cmd python setup.py install build_ext -I${DEST_DIR}/include -L${DEST_DIR}/lib
+  popd
+fi
+
 if [ $INST_YT_SOURCE -eq 0 ]
 then
   echo "Installing yt"
@@ -294,6 +345,10 @@
     echo "Installing yt from source"
     YT_DIR="${DEST_DIR}/src/yt-hg"
     log_cmd hg clone -r ${BRANCH} https://bitbucket.org/yt_analysis/yt ${YT_DIR}
+if [ $INST_UNSTRUCTURED -eq 1 ]
+then
+    echo $DEST_DIR > ${YT_DIR}/embree.cfg
+fi
     pushd ${YT_DIR}
     log_cmd python setup.py develop
     popd
@@ -310,7 +365,7 @@
 echo "   $DEST_DIR/bin"
 echo
 echo "On Bash-style shells you can copy/paste the following command to "
-echo "temporarily activate the yt installtion:"
+echo "temporarily activate the yt installation:"
 echo
 echo "    export PATH=$DEST_DIR/bin:\$PATH"
 echo

diff -r f6d9b67a3e76eda32543a159c544c919d5e5895a -r c20ca31d9d7c34e66ab9ae02f3868af0fd08ba7f doc/source/visualizing/unstructured_mesh_rendering.rst
--- a/doc/source/visualizing/unstructured_mesh_rendering.rst
+++ b/doc/source/visualizing/unstructured_mesh_rendering.rst
@@ -7,9 +7,31 @@
 ^^^^^^^^^^^^
 
 Beginning with version 3.3, yt has the ability to volume render unstructured
-mesh data - like that created by finite element calculations, for example. 
-In order to use this capability, a few additional dependencies are required 
-beyond those you get when you run the install script. First, `embree <https://embree.github.io>`_
+mesh data like that created by finite element calculations. In order to use 
+this capability, a few additional dependencies are required. The easiest way 
+to install yt with unstructured mesh support is to use conda to install the
+most recent development version of yt from our channel:
+
+.. code-block:: bash
+
+    conda install -c http://use.yt/with_conda/ yt
+
+If you want to install from source, you can use the ``get_yt.sh`` script.
+Be sure to set the INST_YT_SOURCE and INST_UNSTRUCTURED flags to 1 at the 
+top of the script. The ``get_yt.sh`` script can be downloaded by doing:
+
+.. code-block:: bash
+
+  wget http://bitbucket.org/yt_analysis/yt/raw/yt/doc/get_yt.sh
+
+and then run like so:
+
+.. code-block:: bash
+
+  bash get_yt.sh
+
+Alternatively, you can install the additional dependencies by hand.
+First, `embree <https://embree.github.io>`_
 (a fast software ray-tracing library from Intel) must be installed, either
 by compiling from source or by using one of the pre-built binaries available
 at Embree's `downloads <https://embree.github.io/downloads.html>`_ page.

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list