-
Notifications
You must be signed in to change notification settings - Fork 25
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
Octant on Windows #1
Comments
@hetland, I thought you separated the binary grid generation stuff out so that folks like Charles could just use the 'other' stuff? Is there some trick? |
We have attempted to run setup.py on windows using the --compiler option to tell it to use mingw, the command line was this: This was mainly based on the optimistic assumption that the c code might be portable enough to run on Windows. The source compiled, but in the linking stage, there were numerous link errors concerning undefined references to stderr in triangle.c. |
As I understand it, the setup.py will not work on windows as it currently stands because the code being compiled has already been run through the C-preprocessor on Linux. So it's really not set up for a multi-platform build process. But you don't need that C stuff anyway for basic use -- I think that is only for grid generation. |
The pre-processor issue is fixed, but I think it is still not working on PCs. -r On Mar 11, 2014, at 11:32 AM, Rich Signell [email protected] wrote:
Robert Hetland, Professor |
I noticed that in addition to gridgen, there are extensions 'iso', which uses a fortran source file, and 'csa', which uses c source files. are these just things that gridgen relies on, or are they needed by other modules? I tried running setup.py using only the 'iso' and 'csa' extensions and the install ran without error, however, when I try to import octant from within Python, I get this error: |
CSA is certainly a stand-alone utility. It is a wrapper of Pavel Sakov's utility for fast interpolation. It is useful for interpolating many many points, like interpolating millions of soundings onto a grid. The iso stuff is for finding properties along an isosurface. The most obvious use case is to find isosurfaces in z. I.e., get the salinity at 50 m depth. There is no fast way to do this in pure python, so the grunt work is done by FORTRAN. You should be able to use essentially all of octant without either of these things. It would be nice to have an option to install or not to install compiled modules, but I am not that good at distutils. For now, it is easy just to comment those things out. You should get something that works just with those things missing. |
We did get Octant to install with the extensions turned off after we realized that it was dependent on Matplotlib's Basemap library. I haven't done much testing, but it's now possible to import octant without errors. |
Awesome. Perhaps we could make a setup-basic.py file that could be used instead that would not use any compiled code. I still need to refactor to make explicit all the dependencies in the code. I think basemap is used for the finding the great circle distance in the grid generation software, so it might not be necessary for you either. |
Having Octant be dependent on Basemap isn't a problem since we use basemap anyway. Since CSA is a fast-resampling program, it would be very beneficial to us to have that working under Windows. Even though we could probably write something without it, there's a good chance that it could make our application faster if we used it. |
I'm trying to install this on a new computer, which is still Windows. It's
I have included the setup.py file that I used. On Wed, Mar 19, 2014 at 2:04 PM, Rob Hetland [email protected]
Requires: Contains:
""" classifiers = """ #from numpy.distutils.core import Extension #iso = Extension(name = '_iso', sources = ['octant/src/iso.f'])csa = Extension(name = '_csa',sources=["octant/src/csa/csa.c","octant/src/csa/svd.c"])doclines = doc.split("\n") if name == 'main': |
Does your windows machine have a fortran compiler? That would be required to build the iso module. Perhaps the import should be wrapped in a try/except, and then it will at least import correctly. On Jul 31, 2014, at 1:42 PM, ccarleton-noaa [email protected] wrote:
Robert Hetland, Professor |
@pelson, we are struggling a bit (okay, a lot!) here to support windows users. Octant has both C and Fortran wrapped python modules. Could we use something like the approach here: It would be so great if windows users could just do "conda install octant" |
Supreme timing. We are just about to embark (tomorrow) on a fortnight of effort pulling together our building and uploading of the scitools dependencies on linux-64, osx-64 (via travis-ci) and Windows (32 bit initially, but the approach will be applicable 64 bit Windows) via Appveyor.
Yes, the approach is effectively that which we will be taking. In fact, I've already got a proof of concept package (https://github.com/pelson/Obvious-CI) which should encapsulate all of the hard work (like setting up the dev environment and installing miniconda) and allow the user to focus on the actual build steps. Please don't copy it just yet (as it will change significantly in the next few days/weeks), but my current progress can be seen in https://github.com/pelson/conda-recipes-scitools/compare/SciTools:master...appveyor - with the key file being https://github.com/pelson/conda-recipes-scitools/blob/da95f054f114232038cf9a11c7fe80921c5b7242/appveyor.yml. I have a sum total of about 2 weeks worth of time building software on Windows, so don't see me as an expert, but I'm pretty hopeful that the approach we are going to take can be repeated by other packages for automated building of distributions for multiple OSes. |
@pelson , that sounds awesome! We can definitely wait a few weeks until you guys have finished your work on this -- we've waited years already. You may have seen that I posted a "how-do-I-build-on-windows" question on the conda google group here https://groups.google.com/a/continuum.io/forum/#!topic/conda/yHevuIBaqtI In any case, thank you from the community for doing this! |
Yes, indeed, this is very welcome. I have exactly zero weeks of experience On Mon, Dec 8, 2014 at 10:46 AM, Rich Signell [email protected]
Prof. Rob Hetland |
@pelson (et al) just chiming in to let you know that this is a library I use -- specifically just to generate grids for 3-D hydrodynamic models. So if you need any testing on Windows or any other system, do give me a shout. Presently I have to do everything in a Linux VM, which is fine, but |
In order to install and use octant on windows with cygwin, two simple fixes
and hopefully it should compile and run as desired. |
I'd like to be able to install Octant on windows. Is there a way to do so using its current install.py? Is it possible to install just the pure python parts to avoid incompatibilities?
The text was updated successfully, but these errors were encountered: