Sph_ Mac OS

  1. Sph_ Mac Os X
  2. Mac Os Catalina
  3. Sph_ Mac Os Catalina
  4. Sph Osha


Most appropriate print drivers for Hewlet Packard (HP) and Xerox MFP/Copiers are already installed in all SPH-MacOSx build computers, but if you need to find print drivers for other branded printers, visit the printer manufacturers website to obtain the most recent drivers.

Custom elevation data import, Photogrammetry, LIDAR, Magnetometer and GPR linear and areal survey planning tools with terrain following mode - a must have toolset for safe and efficient UAV land surveying and industrial inspections! Mac OS X Network Printer Installation. Most appropriate print drivers for Hewlet Packard (HP) and Xerox MFP/Copiers are already installed in all SPH-MacOSx build computers, but if you need to find print drivers for other branded printers, visit the printer manufacturers website to obtain the most recent drivers.

Sph_ Mac Os X

For Brother MFP you can find drivers here.

*For best results, please make sure your computer is up-to-date with the latest patches and updates.
*The following instructions apply to SPH-MacOSX build computers

Install the Printer

  1. Add (+) the printer:
    1. Go to System Preferences --> Printers & Scanners
    2. Click the '+'
    3. Fill out the window accordingly
      1. Make sure you have 'Default' selected
      2. In the Search Field type the name of your Department, and from the list of printers displayed, select the one you need to install. The fields will populate accordingly (all except Location are required)
      3. The 'Use' field denotes the driver. 'Click on Choose a Driver…'
    4. Once you click on 'Choose a Driver…' --> click on 'Select Software' , narrow down your choices by typing the model of your printer: e.g. 'brother' as shown below:
      1. e.g. typing ‘8850’ will bring up the drivers for the 'Brother MFC-L8850CDW' --> where you’ll almost always select the Postscript driver to install.
      2. You can find the name of the printer directly on the printer itself. Look for the white label. If you still can't find it, contact your department.
      3. Once you select the corresponding driver for the printer you need to use click Ok, and this will take you back to the previous Pop-Up (shown above), where you will click 'Add'.

Configure the Printer

*From the application you most frequently use, select 'Print' under the File pull-down menu and select the Printer you’ll be using. To customize the printer settings, click on the field 'Copies & Pages' and choose 'Printer Features' where you can customize the settings for the printer. (Sample below is for the Brother-HLL8260CDW)

If your department has 'account track' enabled, you have to contact your department Administrator to obtain a code).

Media and Computing Services does not keep track of or control any account information or codes.

To install PySPH, you need a working Python environment with the requireddependencies installed. You may use any of the available Python distributions.Note that PySPH is currently tested with Python-2.x and not with 3.x (yet). Ifyou are new to Python we recommend Enthought Canopy. PySPH will workfine with Anaconda or other environments like WinPython. The followinginstructions should help you get started.

Since there is a lot of information here, we suggest that you skim the sectionon Dependencies and then directly jump to one of the “Installing thedependencies on xxx” sections below depending on your operating system.Depending on your chosen Python distribution, simply follow the instructionsand links referred therein.

Core dependencies¶

The core dependencies are:

  • Cython (version 0.20 and above)
  • nose for running the unit tests.

These packages can be installed from your Python distribution’s packagemanager, or using pip or easy_install. For more detailed instructions onhow to do this for different distributions, see below.

Running PySPH requires a working C/C++ compiler on your machine. On Linux/OS Xthe gcc toolchain will work well. On Windows, you will need to have MicrosoftVisual C++ Compiler for Python 2.7 or anequivalent compiler. More details are available below.

Note

PySPH generates high-performance code and compiles it on the fly. Thisrequires a working C/C++ compiler even after installing PySPH.

Optional dependencies¶

The optional dependencies are:

  • OpenMP: PySPH can use OpenMP if it is available. Installation instructionsare available below.
  • Mayavi: PySPH provides a convenient viewer to visualize the output ofsimulations. This viewer is called pysph_viewer and requires Mayavi tobe installed. Since this is only a viewer it is optional for use, however,it is highly recommended that you have it installed as the viewer is veryconvenient.
  • mpi4py and Zoltan: If you want to use PySPH in parallel, you will needmpi4py and the Zoltan data management library. PySPH will work in serialwithout mpi4py or Zoltan. Simple build instructions for Zoltan areincluded below.

Mayavi is packaged with all the major distributions and is easy to install.Zoltan is very unlikely to be already packaged and will need to be compiled.

Building and linking PyZoltan on OSX/Linux¶

We’ve provided a simple Zoltan build script in the repository. This works onLinux and OS X but not on Windows. It can be used as:

where the INSTALL_PREFIX is where the library and includes will beinstalled. You may edit and tweak the build to suit your installation.However, this script is what we use to build Zoltan on our continuousintegration servers on Drone and Shippable.

After Zoltan is build, set the environment variable ZOLTAN to point to theINSTALL_PREFIX that you used above:

Note that replace $INSTALL_PREFIX with the directory you specified above.After this, follow the instructions to build PySPH. The PyZoltan wrappers willbe compiled and available.

Note

The installation will use $ZOLTAN/include and $ZOLTAN/lib to findthe actual directories, if these do not work for your particularinstallation for whatever reason, set the environment variablesZOLTAN_INCLUDE and ZOLTAN_LIBRARY explicitly without setting upZOLTAN. If you used the above script, this would be:

GNU/Linux is probably the easiest platform to install PySPH. On Ubuntu one mayinstall the dependencies using:

OpenMP is typically available but can be installed with:

If you need parallel support:

On Linux it is probably best to install PySPH into its own virtualenvironment. This will allow you to install PySPH as a user without anysuperuser priviledges. See the section below on Using a virtualenv for PySPH. Inshort do the following:

You should be set now and should skip to Downloading PySPH andBuilding and Installing PySPH.

If you are using Enthought Canopy or Anaconda the instructions in thesection Installing the dependencies on Mac OS X will be useful as the instructions aresimilar.

Note

If you wish to see a working build/test script please see ourshippable.yml. Or youcould see the build script hosted at Drone.io.

On OS X, your best bet is to install Enthought Canopy or Anaconda or someother Python distribution. Ensure that you have gcc or clang installed byinstalling XCode. See thisif you installed XCode but can’t find clang or gcc.

OpenMP on OSX¶

If you need to use OpenMP, the default clang compiler on OSX does not supportit. There are some experimental versions available. One easy to installoption is to use brew to install gcc. For example you can try:

The build may not see omp.h and you can work around this by manuallylinking to it like so (modify this to suit your installation):

Once this is done, you need to use this as your default compiler, you can tellthe Python to use this by setting:

Using Canopy¶

Download the Canopy express installer for your platform (the full installer isalso fine). Launch Canopy after you install it so it initializes your userenvironment. If you have made Canopy your default Python, all should be well,otherwise launch the Canopy terminal from the Tools menu of the Canopy editorbefore typing your commands below.

NumPy ships by default but Cython does not. Mako and Cython can be installedwith pip easily (pip will be available in your Canopy environment):

Mayavi is best installed with the Canopy package manager:

Note

If you are a subscriber you can also enpkgcython to installEnthought’s build.

If you need parallel support, please see Installing mpi4py and Zoltan on OS X, otherwise,skip to Downloading PySPH and Building and Installing PySPH.

Using Anaconda¶

After installing Anaconda, you will need to make sure the dependencies areinstalled:

If you need parallel support, please see Installing mpi4py and Zoltan on OS X, otherwise,skip to Downloading PySPH and Building and Installing PySPH.

Installing mpi4py and Zoltan on OS X¶

In order to build/install mpi4py one first has to install the MPI library.This is easily done with Homebrew as follows (you need to have brewinstalled for this but that is relatively easy to do):

After this is done, one can install mpi4py by hand. First download mpi4pyfrom here. Then run the following(modify these to suit your XCode installation and version of mpi4py):

Change the above environment variables to suite your SDK version. If thisinstalls correctly, mpi4py should be available. You can now build Zoltan,(the script to do this is in the pysph sources, see Downloading PySPH)

You should be set now and should move to Building and Installing PySPH.

While it should be possible to use mpi4py and Zoltan on Windows, we do not atthis point have much experience with this. Feel free to experiment and let usknow if you’d like to share your instructions. The following instructionsare all without parallel support.

Using Canopy¶

Download and install Canopy Express for you Windows machine (32 or 64 bit).Launch the Canopy editor at least once so it sets up your user environment.Make the Canopy Python the default Python when it prompts you. If you havealready skipped that option, you may enable it in the Edit->Preferencesmenu. With that done you may install the required dependencies. You caneither use the Canopy package manager or use the command line. We will usethe command line for the rest of the instructions. To start a command line,click on “Start” and navigate to the AllPrograms/EnthoughtCanopy menu.Select the “Canopy command prompt”, if you made Canopy your default Python,just starting a command prompt (via cmd.exe) will also work.

On the command prompt, Mako and Cython can be installed with pip easily(pip should be available in your Canopy environment):

Mayavi is best installed with the Canopy package manager:

Once you are done with this, please skip ahead toInstalling Visual C++ Compiler for Python 2.7.

Note

If you are a subscriber you can also enpkgcython to installEnthought’s build.

Using WinPython¶

Instead of Canopy or Anaconda you could try WinPython 2.7.x.x. To obtain thecore dependencies, download the corresponding binaries from Christoph Gohlke’sUnofficial Windows Binaries for Python Extension Packages. Mayavi is available throughthe binary ETS.

You can now add these binaries to your WinPython installation by going toWinPython Control Panel. The option to add packages is available under thesection Install/upgrade packages.

Make sure to set your system PATH variable pointing to the location of thescripts as required. If you have installed WinPython 2.7.6 64-bit, make sureto set your system PATH variables to <pathtoinstallationfolder>/python-2.7.6.amd64 and <pathtoinstallationfolder>/python-2.7.6.amd64/Scripts/.

Once you are done with this, please skip ahead toInstalling Visual C++ Compiler for Python 2.7.

Using Anaconda¶

Install Anaconda for your platform, make it the default and then install therequired dependencies:

Once you are done with this, please skip ahead toInstalling Visual C++ Compiler for Python 2.7.

Mac os download

Installing Visual C++ Compiler for Python 2.7¶

For all of the above Python distributions, it is highly recommended that youbuild PySPH with Microsoft’s Visual C++ for Python 2.7. Werecommend that you download and install the VCForPython27.msi availablefrom the link. Make sureyou install the system requirements specified on that page. For example, onWindows 7 you will need to install the Microsoft Visual C++ 2008 SP1Redistributable Package for your platform (x86 for 32 bit or x64 for 64 bit)and on Windows 8 you will need to install the .NET framework 3.5. Please lookat the link given above, it should be fairly straightforward. Note that doingthis will also get OpenMP working for you.

After you do this, you will find a “Microsoft Visual C++ Compiler Package forPython 2.7” in your Start menu. Choose a suitable command prompt from thismenu for your architecture and start it (we will call this the MSVC commandprompt). You may make a short cut to it as you will need to use this commandprompt to build PySPH and also run any of the examples.

See section Downloading PySPH and get a copy of PySPH. On the MSVCcommand prompt, do the following (replace the pysph with the path to whereyou have downloaded and unzipped the pysph sources):

One this is done, you may follow section Building and Installing PySPH. You maynotice that the windows_env.bat convenience batch file merely sets uptwo environment variables:

If you are using pip to directly install PySPH you will need to set thesemanually.

Warning

On 64 bit Windows, do not build PySPH with mingw64 as it does not workreliably at all and frequently crashes. YMMV with mingw32 but it is saferand just as easy to use the MS VC++ compiler.

A virtualenv allows you to create an isolated environment for PySPH and itsrelated packages. This is useful in a variety of situations.

  • Your OS does not provide a recent enough Cython version (say you arerunning Debian stable).
  • You do not have root access to install any packages PySPH requires.
  • You do not want to mess up your system files and wish to localizeany installations inside directories you control.
  • You wish to use other packages with conflicting requirements.
  • You want PySPH and its related packages to be in an “isolated” environment.

You can either install virtualenv (or ask your system administrator to) orjust download the virtualenv.py script and useit (run pythonvirtualenv.py after you download the script).

Create a virtualenv like so:

This creates a directory called pysph_env which contains all the relevantfiles for your virtualenv, this includes any new packages you wish to installinto it. You can delete this directory if you don’t want it anymore for somereason. This virtualenv will also “inherit” packages from your system. Henceif your system administrator already installed NumPy it may be imported fromyour virtual environment and you do not need to install it. This isvery useful for large packages like Mayavi, Qt etc.

Note

If your version of virtualenv does not support the--system-site-packages option, please use the virtualenv.py scriptmentioned above.

Once you create a virtualenv you can activate it as follows (on a bashshell):

On Windows you run a bat file as follows:

This sets up the PATH to point to your virtualenv’s Python. You may now runany normal Python commands and it will use your virtualenv’s Python. Forexample you can do the following:

Now PySPH will be installed into myenv. You may deactivate yourvirtualenv using the deactivate command:

On Windows, use myenvScriptsactivate.bat andmyenvScriptsdeactivate.bat.

If for whatever reason you wish to delete myenv just remove the entiredirectory:

Note

With a virtualenv, one should be careful while running things likeipython or nosetests as these are sometimes also installed on thesystem in /usr/bin. If you suspect that you are not running thecorrect Python, you could simply run (on Linux/OS X):

to be absolutely sure.

Using Virtualenv on Canopy¶

If you are using Enthought Canopy, it already bundles virtualenv for you butyou should use the venv script. For example:

The rest of the steps are the same as above.

One way to install PySPH is to use pip

This will install PySPH, and you should be able to import it and use themodules with your Python scripts that use PySPH. This will not give youaccess to the examples. The best way to get those is to get PySPH fromgit or download a tarball or ZIP as described below.

To get PySPH using git type the following

If you do not have git or do not wish to bother with it, you can get a ZIP ortarball from the pysph site.You can unzip/untar this and use the sources.

In the instructions, we assume that you have the pysph sources in thedirectory pysph and are inside the root of this directory. For example:

or if you cloned the repository:

Once you have downloaded PySPH you should be ready to build and install it,see Building and Installing PySPH.

Once you have the dependencies installed you can install PySPH with:

If you downloaded PySPH using git or used a tarball you can do:

You could also do:

This is useful if you are tracking the latest version of PySPH via git. Withgit you can update the sources and rebuild using:

You should be all set now and should next consider Running the tests.

If you installed PySPH using pythonsetup.pydevelop you can run the tests as:

If you installed PySPH using pythonsetup.pyinstall you should run thetests as:

This is because nosetests will incorrectly will pick up the local pysphpackages instead of the installed version. The -w option just changes theactive directory to docs. Alternatively, change directory to some otherdirectory that does not contain the directory pysph in it and run the firstcommand above.

If you see errors you might want more verbose reporting which you can getwith:

Sph_ mac os download

This should run all the tests that do not take a long while to complete. Ifthis fails, please contact the pysph-users mailing list or send us email.

Once you run the tests, you should see the section onRunning the examples.

Note

We use python-mnose.core instead of nosetests as this ensuresthat the right Python executable is used. nostests is sometimesinstalled in the system in /usr/bin/nosetests and running that wouldpick up the system Python instead of the one in a virtualenv. Thisresults in incorrect test errors leading to confusion.

You can verify the installation by exploring some examples:

Try this:

to see the different options supported by each example. You can view the datagenerated by the simulation (after the simulation is complete or during thesimulation) by running the pysph_viewer application. To view thesimulated data you may do:

If you have Mayavi installed this should show a UI that looks like:

Mac Os Catalina

There are other examples like those in the transport_velocity directory:

Sph_ Mac Os Catalina

This runs the driven cavity problem using the transport velocity formulationof Adami et al. You can verify the results for this problem using the helperscript examples/transport_velocity/ldcavity_results.py to plot, for examplethe streamlines:

If you want to use PySPH for elastic dynamics, you can try some of theexamples from Gray et al., Comput. Methods Appl. Mech. Engrg. 190(2001), 6641-6662:

Which runs the problem of the collision of two elastic rings:

The auto-generated code for the example resides in the directory~/.pysph/source. A note of caution however, it’s not for the faint hearted.

Running the examples with OpenMP¶

If you have OpenMP available run any of the examples as follows:

Sph Osha

This should run faster if you have multiple cores on your machine. Ifyou wish to change the number of threads to run simultaneously, you cantry the following:

You may need to set the number of threads to about 4 times the number ofphysical cores on your machine to obtain the most scale-up. If you wishto time the actual scale up of the code with and without OpenMP you maywant to disable any output (which will be serial), you can do thislike:

Running the examples with MPI¶

If you compiled PySPH with Zoltan and have mpi4py installed you may run anyof the examples with MPI as follows:

This may not give you significant speedup if the problem is too small. You canalso combine OpenMP and MPI if you wish. You should take care to setup the MPIhost information suitably to utilize the processors effectively.

PySPH is organized into several sub-packages. These are:

  • pysph.base: This subpackage defines thepysph.base.particle_array.ParticleArray,pysph.base.carray.CArray (which are used by the particlearrays), the various SPH Kernels, the nearest neighborparticle search (NNPS) code, and the Cython code generation utilities.
  • pysph.sph: Contains the various SPH equations, theIntegrator module and associated integration steppers, and thecode generation for the SPH looping. pysph.sph.wc contains theequations for the weakly compressible formulation.pysph.sph.solid_mech contains the equations for solid mechanics andpysph.sph.misc has miscellaneous equations.
  • pysph.solver: Provides the pysph.solver.solver.Solver, thepysph.solver.application.Application and a convenient way tointeract with the solver as it is running.
  • pysph.parallel: Provides the parallel functionality.
  • pysph.tools: Provides some useful tools including the pysph_viewerwhich is based on Mayavi.