PYROMS installation

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
ngarg
Posts: 19
Joined: Fri Jul 12, 2013 5:46 pm
Location: NTU

PYROMS installation

#1 Unread post by ngarg »

Hi,

I am trying to install PYROMS on a desktop FEDORA machine. I have installed netcdf4, netcdf4-cxx, netcdf4-fortran and netcdf4 for python and every other prerequisite, as far as i can think of. I have been trying to install PyROMS for quite some time now and have not been able to do so. I have attached two separate errors I am getting. When i run IPython and import pyroms i get the below mentioned error. Also, when i check the log file for pyroms installation, i get another error which is also shown below. I would really appreciate if someone could guide me regarding this.


In [2]: import numpy

In [3]: import matplotlib

In [4]: import pyroms
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/nikhil/Documents/ROMS/grid/pyroms/pyroms/pyroms/<ipython console> in <module>()

/home/nikhil/Documents/ROMS/grid/pyroms/pyroms/pyroms/pyroms/__init__.pyc in <module>()
15 import grid
16 import io
---> 17 import tools
18 import remapping
19 import utility

/home/nikhil/Documents/ROMS/grid/pyroms/pyroms/pyroms/pyroms/tools.py in <module>()
3 import numpy as np
4 import _iso
----> 5 import _obs_interp
6
7 import pyroms

ImportError: No module named _obs_interp




Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1)
/usr/bin/gfortran -Wall -L$DESTDIR/lib /tmp/tmpd4mv1j/tmp/tmpd4mv1j/src.linux-x86_64-2.7/scripmodule.o /tmp/tmpd4mv1j/tmp/tmpd4mv1j/src.linux-x86_64-2.7/fortranobject.o /tmp/tmpd4mv1j/pyscrip.o kinds_mod.o constants.o iounits.o netcdf.o grids.o remap_vars.o remap_distwgt.o remap_conserv.o remap_bilinear.o remap_bicubic.o remap_read.o remap.o timers.o remap_write.o -L/usr/local/lib -L/usr/lib64 -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lpython2.7 -lgfortran -o ./scrip.so
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -L$DESTDIR/lib /tmp/tmpd4mv1j/tmp/tmpd4mv1j/src.linux-x86_64-2.7/scripmodule.o /tmp/tmpd4mv1j/tmp/tmpd4mv1j/src.linux-x86_64-2.7/fortranobject.o /tmp/tmpd4mv1j/pyscrip.o kinds_mod.o constants.o iounits.o netcdf.o grids.o remap_vars.o remap_distwgt.o remap_conserv.o remap_bilinear.o remap_bicubic.o remap_read.o remap.o timers.o remap_write.o -L/usr/local/lib -L/usr/lib64 -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lpython2.7 -lgfortran -o ./scrip.so" failed with exit status 1
make: *** [scrip.so] Error 1
/bin/cp ./scrip /usr/local/bin
/bin/cp ./scrip_test /usr/local/bin
/bin/cp ./scrip.so /usr/local/lib
/bin/cp: cannot stat `./scrip.so': No such file or directory
make: *** [install] Error 1
cp: cannot stat `scrip.so': No such file or directory

User avatar
hetland
Posts: 81
Joined: Thu Jul 03, 2003 3:39 pm
Location: TAMU,USA

Re: PYROMS installation

#2 Unread post by hetland »

Which pyroms?

User avatar
ngarg
Posts: 19
Joined: Fri Jul 12, 2013 5:46 pm
Location: NTU

Re: PYROMS installation

#3 Unread post by ngarg »

Hi Roberts,

Thanks for your reply. My current post is related to the PYROMS version from https://github.com/kshedstrom/pyroms.

I also tried to install OCTANT when i was not able to install PYROMS, but I have not been able to run OCTANT too. I manage to install it but seems like with some bugs. When i import OCTANT in python it throws an error saying csa.so is missing. I am not sure what would be the problem. Even though I am able to use csa on my machine I am not able to like it properly with OCTANT.


Any help would be highly appreciated.

User avatar
hetland
Posts: 81
Joined: Thu Jul 03, 2003 3:39 pm
Location: TAMU,USA

Re: PYROMS installation

#4 Unread post by hetland »

Did you make either package before using it? You need to do something like this:

Code: Select all

python setup.py build
sudo python setup.py install
In order for the C-libraries to be built, and to install everything in the right place. If you did this, then your build is failing somewhere, and you need to look at the error messages you get when you build.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#5 Unread post by kate »

All three of these problems are related to shared libraries. Does your PYTHONPATH include the location of _obs_interp.so or csa.so? Do you have a scrip.so?

User avatar
ngarg
Posts: 19
Joined: Fri Jul 12, 2013 5:46 pm
Location: NTU

Re: PYROMS installation

#6 Unread post by ngarg »

Thanks Kate and Robert for your replies. I managed to compile OCTANT successfully on my machine. It had the csa.so file, I just had to locate and link it and it worked after that.

Cheers

lbressan
Posts: 3
Joined: Wed Sep 02, 2015 3:40 pm
Location: ARPA Emilia Romagna

Re: PYROMS installation

#7 Unread post by lbressan »

Dear all,
I installed pyroms in a local directory ($DESTDIR) since I don't have
administrator priviledges. I got different errors, but at the end it worked.
It was a lot of work.

The error I found were:
* lpsolve55 not found in importing bathy_smoother. Solved by manually
installing lpsolve as in http://houstonthereisaproblem.blogspot.it.
* ImportError: No module named move_river_t in importing pyroms_toolbox.
Solved by modyfying setup.py.
* gridgen and libgridgen errors (some functions missing in gridgen). Solved by
installing pygridgen and using its installation of gridgen for pyroms.


I am sharing the steps to install it here. :D


* LPSOLVE (da http://houstonthereisaproblem.blogspot.it)
Check dependencies and install lpsolve55 manually.

To build lp_solve, you need to download following source files from the
lp_solve SourceForge site

lp_solve_5.5.0.15_source.tar.gz
lp_solve_5.5.0.15_Python_source.tar.gz

Then extract the source files using following command

> tar -zxvf lp_solve_5.5.0.15_source.tar.gz
> tar -zxvf lp_solve_5.5.0.15_Python_source.tar.gz

Then install with the install script in lp_solve.

> cd lp_solve
> sh ccc

Install the python part in extra/Python:

> python setup.py install

Now lpsolve should be installed. Check in python with "import lpsolve55".
It shouldn't complain.


* BATHY_SMOOTHER
Now install bathy_smoother excluding the installation of external
libraries. You need to modifying the file setup.py. I commented out all
lines of "config.add_extension('lpsolve55',..." and
"config.add_library('lpsolve55',...".
Then install it as in the instructions:

> cd bathy_smoother
> python setup.py build
> python setup.py install


* PYROMS_TOOLBOX

Modify the file pyroms_toolbox/pyroms_toolbox/setup.py.
In the external libraries, I added the reference to move_river_t.

Then install it as in the instructions:

> cd pyroms_toolbox
> python setup.py build
> python setup.py install


* GRIDGEN and PYGRIDGEN
The installation of gridgen alone is not enough, since the python part
would be missing. Then I installed pygridgen. I cloned the repository of
pygridgen from github, and I realized later that the phobson fork was more
updated. Better check all forks before.

First, you need to compile the external libraries.
I installed everything in $DESTDIR.

> cd external/nn
> ./configure --prefix==$DESTDIR
> make
> make install

> cd external/csa
> ./configure --prefix==$DESTDIR
> make
> make install

> cd external/gridutils
> ./configure --prefix=$DESTDIR CFLAGS="-fPIC -I$DESTDIR/include
-L$DESTDIR/lib" CPPFLAGS=-I$DESTDIR/include
LDFLAGS=-L$DESTDIR/lib
> make
> make install


If you use autoreconf, you need to update the configure files:
rename configure.in as configure.ac and update the semantic
of AC_DEFINE.

< AC_DEFINE(X, [], [Description])
---
> AC_DEFINE(X)

Then autoreconf -if generates configure, but in my case deletes
a necessary part. I added these lines in a file toppa.h,
to be included together with config.h in geom.h, vertlist.h and zode.h.

#if defined(HAVE_COMPLEX)
#include <complex.h>
#define zdouble _Complex double
#elif defined(HAVE__COMPLEX__)
#include <complex.h>
#define zdouble __complex__ double
#elif defined(NOCOMPLEX)
#include "c99-min/complex.h"
#define zdouble _Complex double
#endif

To include these files use:

#include "toppa.h"
#include "config.h"


If you don't use autoreconf, something like that should work.
> cd external/gridgen
> ./configure --prefix=$DESTDIR CFLAGS="-I$DESTDIR/include
-L$DESTDIR/lib" CPPFLAGS=-I$DESTDIR/include
LDFLAGS=-L$DESTDIR/lib

Modify manually the line 118 of makefile:

118c118
<libgridgen.so: $(HEADERS) triangle.t $(SHLIBOBJS)
< $(CC) -shared -o $@ $(SHLIBOBJS) triangle.t $(LIBS)
---
>libgridgen.so: $(HEADERS) triangle.t $(SHLIBOBJS)
> $(CC) $(LDFLAGS) -shared -o $@ $(SHLIBOBJS) triangle.t $(LIBS)

Then install it and put it in the pyroms directory
($DESTDIR/lib/python2.7/site-packages/pyroms/).

> make
> make lib
> make shlib
> make install


* PYROMS

Install pygridgen and gridgen.

Install scrip, and check PREFIX in the makefile.

> cd pyroms/external/scrip/source
> make
> make all
> make scrip.so
> make install

To install pyroms, scrip.so should be in
$DESTDIR/lib/python2.7/site-packages/scrip.so. I made a link since it was
installed in $DESTDIR/lib. The same for creep.so (for pyroms_toolbox).

Finally, in the pyroms directory, run:

> python setup.py build
> python setup.py install

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#8 Unread post by kate »

Thanks for all the careful notes!
  • Would anyone mind if lpsolve went away from pyroms? Does anyone use it?
  • Thanks for the move_river_t fix.
  • We hope to take out the scrip.so part and use ESMF instead.
  • I thought Fred had included stuff to call gridgen without need for outside packages.

turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

Re: PYROMS installation

#9 Unread post by turuncu »

Hi Kate,

I am actively use pyroms. It is great tool. Thanks for it. I am using lpsolve to fix the bathymetry to prevent pressure gradient errors. As you suggest, it will be great to use ESMF (ESMPy) for interpolation instead of SCRIP. If you want we could collaborate about it, i have some experience in ESMF and also python. I also wrote my own forcing tool in NCL and it uses ESMF two step interpolation (including also extrapolation due to the unmatched land-sea mask of the atmosphere and ocean models). It works nicely.

Regards,

--ufuk

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#10 Unread post by kate »

If you (or anyone else) care to send me patches, I'll include them. The same goes for my ROMS branch, even if it's not always true for the trunk.

Gabriel_Carvalho
Posts: 9
Joined: Tue Jul 05, 2011 2:47 pm
Location: Prooceano

Re: PYROMS installation

#11 Unread post by Gabriel_Carvalho »

Hi, I´m starting with pyroms, still strugling with the instalation.

"Modify the file pyroms_toolbox/pyroms_toolbox/setup.py.
In the external libraries, I added the reference to move_river_t."

Could you provide the "/pyroms_toolbox/setup.py" modification in order to fix the move_river_t issue?

thanks,

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#12 Unread post by kate »

Something like:

Code: Select all

diff --git a/pyroms_toolbox/pyroms_toolbox/setup.py b/pyroms_toolbox/pyroms_toolbox/setup.py
index 81ea70e..abae14e 100644
--- a/pyroms_toolbox/pyroms_toolbox/setup.py
+++ b/pyroms_toolbox/pyroms_toolbox/setup.py
@@ -10,6 +10,7 @@ def configuration(parent_package='',top_path=None):
     config.add_subpackage('Grid_HYCOM')
     config.add_library('_average', sources=['src/average.f90']),
     config.add_library('_move_runoff', sources=['src/move_runoff.f90']),
+    config.add_library('_move_river_t', sources=['src/move_river_t.f90']),
     config.add_extension('_average',
           sources = ['src/average.f90'],
           libraries = ['_average']

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#13 Unread post by maxblu33 »

Hello, i have been trying to install pyroms for a week and have encounter some problems, mainly with scrip.so, and although at the end I though i solved it, when i try to run and example scrip.so is still missing(the scrip.so exist and is in my PYTHONPATH). I'm working in a 64bit Linux mint 17.3 platform with gfortran and anaconda python distribution
I also have an issue with import move_river_t, could you be a little more specific about what could be the solution to such problem,

elendil@elendil-PC ~/work/python/pyroms $ python make_grid.py
Vendor: Continuum Analytics, Inc.
scrip.so not found. Remapping function will not be available
Traceback (most recent call last):
File "make_grid.py", line 8, in <module>
import pyroms_toolbox
File "/home/elendil/installs/pyroms/pyroms-install/lib/python2.7/site-packages/pyroms_toolbox/__init__.py", line 51, in <module>
from move_river_t import move_river_t
ImportError: No module named move_river_t

thanks in advance
Luis

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#14 Unread post by kate »

I thought I pushed this change. The __init__.py in pyroms_toolbox should have:

Code: Select all

from _move_river_t import move_river_t
If that doesn't help, you can just comment out this line for now.

At work my scrip.so is in:

Code: Select all

/import/u/u1/uaf/kate/Python/lib/python2.7/site-packages/pyroms/remapping
with

Code: Select all

/u1/uaf/kate/Python/lib/python2.7/site-packages
being in my PYTHONPATH.

At home, scrip.so is in:

Code: Select all

/usr/local/lib/python2.7/dist-packages
This is an Ubuntu system.

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#15 Unread post by maxblu33 »

Kate thank you very much, the change in The __init__.py did not work, but i commented the line and it works just fine( by the way, does this change have any significance)

Regarding the scrip.so, at the end I was linking the file in
/import/u/u1/uaf/kate/Python/lib/python2.7/site-packages/pyroms/remapping
from the one from
/import/u/u1/uaf/kate/Python/lib/ instead of linking it from the original building file
/external/scrip/source
again thanks a lot
luis

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#16 Unread post by kate »

move_river_t is only used if you go through the scripts in the examples/rivers directory for building a ROMS rivers file from hydrology model output.

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#17 Unread post by maxblu33 »

Dear Kate , i have an lpsolve55.so file in the pyroms-master/../bathy_smoother and also in pyroms-install/../../bathy_smother but whe a run make_grid.py this is what a i get
what can i do?

In [1]: run make_grid.py
Vendor: Continuum Analytics, Inc.
Package: mkl
Message: trial mode expires in 30 days
lpsolve55.so not found.
Linear programming method will not be available.
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/elendil/work/python/pyroms/make_grid.py in <module>()
42
43 #generate the new grid
---> 44 lonp=array([lon0, lon1, lon2, lon3])
45 latp=array([lat0, lat1, lat2, lat3])
46

NameError: name 'array' is not defined

thanks a lot

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#18 Unread post by kate »

array comes with numpy. Does your script have:

Code: Select all

import numpy as np
at the top? If so, you can invoke:

Code: Select all

lonp=np.array([lon0, lon1, lon2, lon3])
ETA: you ask about lpsolve. I don't use it. I'd be tempted to remove it from pyroms, but there is at least one fan out there.

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#19 Unread post by maxblu33 »

Dear Kate
i solved my problem with the np.array(sorry, I'm new at python)
but now I found another problem regarding the format of the topography file, does pyroms handle netcdf, because by default the format is zip??
I'm using etopo2 and have the same problem with gebco08
again thanks in advance

run make_grid.py
psolve55.so not found.
Linear programming method will not be available.
/home/elendil/anaconda/lib/python2.7/site-packages/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == 'face':
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/elendil/work/python/pyroms/make_grid.py in <module>()
76 # svn co https://matplotlib.svn.sourceforge.net/ ... hots/data/"
77 datadir = '/home/elendil/work/Modelos_numericos/Roms_tools_V3.1.1/Topo'
---> 78 topo = np.loadtxt(os.path.join(datadir, 'etopo2_original.nc'))
79 lons = np.loadtxt(os.path.join(datadir, 'lon.dat'))
80 lats = np.loadtxt(os.path.join(datadir, 'lat.dat'))

/home/elendil/anaconda/lib/python2.7/site-packages/numpy/lib/npyio.pyc in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin)
926
927 # Convert each value according to its column and store
--> 928 items = [conv(val) for (conv, val) in zip(converters, vals)]
929 # Then pack it according to the dtype's nesting
930 items = pack_items(items, packing)

/home/elendil/anaconda/lib/python2.7/site-packages/numpy/lib/npyio.pyc in floatconv(x)
657 if b'0x' in x:
658 return float.fromhex(asstr(x))
--> 659 return float(x)
660
661 typ = dtype.type

ValueError: could not convert string to float: CDF

Luis

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#20 Unread post by kate »

My bathymetry files are indeed in NetCDF. If yours are not you'll have to change your files or change the Python to read them as is.

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#21 Unread post by maxblu33 »

Kate i already solve the problem of the batimetry but i got a problem with the function griddata, any advice?
thanks in advance

In [1]: run make_grid.py
lpsolve55.so not found.
Linear programming method will not be available.

/home/elendil/anaconda/lib/python2.7/site-packages/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == 'face':
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/elendil/work/python/pyroms/make_grid.py in <module>()
92 # interpolate new bathymetry
93 lon, lat = np.meshgrid(lons, lats)
---> 94 h = griddata(lon.flat,lat.flat,topo.flat,hgrd.lon_rho,hgrd.lat_rho, method='cubic')
95
96 # insure that depth is always deeper than hmin

TypeError: griddata() got multiple values for keyword argument 'method'

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#22 Unread post by kate »

If I go into interactive python and type "griddata", I get "<function matplotlib.mlab.griddata>", which has this signature:

Code: Select all

matplotlib.mlab.griddata(x, y, z, xi, yi, interp='nn')

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#23 Unread post by maxblu33 »

dear kate, i was confused and thought that griddata belongs to scipy instead, so i changed it and I'm using matplotlib.mlab. but it does give anything at all, just a blank screen,
I'm really confused
thanks in advance

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#24 Unread post by kate »

Perhaps you should tell us exactly what you are doing (and trying to do). Is this 'ipython --pylab'?

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#25 Unread post by maxblu33 »

Dear Kate
I'm trying to create a grid for the west part of Cuba with pyroms, I'm beginning the project now so any realistic(non analytic grid) will be fine, then final purpose is to predict the behavior of sea currents and other oceanographic variables in such region with a relatively high spatial resolution(3km or so) I'm using Anaconda as my python distribution with python 2.7 on ubuntu 64 bit 14.04 system and gfortran as compiler
so after many advices from you I properly install pyroms and start to create a grid with the make_grid.py script from your github distribution, essentially i have a problem with the griddata function, I'm running the script with the default parameters of dimension(number of point in x-w direction and region) just to test if it works before staring to tune it for my personal apliccation
I'm using ipython in the linux terminal

the main error is :
In [1]: run make_grid.py
Vendor: Continuum Analytics, Inc.
lpsolve55.so not found.
Linear programming method will not be available.
/home/elendil/anaconda/lib/python2.7/site-packages/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == 'face':
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/elendil/work/python/pyroms/make_grid.py in <module>()
92 # interpolate new bathymetry
93 lon, lat = np.meshgrid(lons, lats)
---> 94 h = griddata(lon.flat,lat.flat,topo.flat,hgrd.lon_rho,hgrd.lat_rho)
95
96 # insure that depth is always deeper than hmin

NameError: name 'griddata' is not defined

So i search for the griddata function in python, but there sre several grdidata functions that belongs to matplolib, scipy etc and therefore i not sure of what is the one i should define in the start of the script
regards Luis

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#26 Unread post by kate »

You can add an import statement at the top of your script to get the griddata of your choice.

Code: Select all

from xxx import griddata

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#27 Unread post by maxblu33 »

I tried with your recommendation from matplotlib.mlab import griddata and the result after 15 minutes of computing is killed with no other information that could give a hint of what the problem could be
thanks in advance

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#28 Unread post by kate »

Actually, the grid generation stuff is usually performed in an interactive session, cutting and pasting from the script, especially if you want to do interactive land mask editing. In this case, one runs "ipython --pylab".

Having something just killed is likely running out of memory or else running into a time limit on your job.

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#29 Unread post by maxblu33 »

Dear kate
Sorry for the late response but I had a problem with my PC, and had to reinstall the system. I'm currently using ubuntu 14.04 and carefully install pyroms, But again When I try to make a grid I still encounter the same problem regarding griddata (t gives me nothing and then the process is killed after 15 minutes of a blank screen). I'm running the Yellow sea example
I believe that the problem is related with my Anaconda python distribution, but I'm not sure
Is there any other way to perform my bathimetry interpolation in python

thanks in advance
Luis Sorinas-Morales

User avatar
rdussin
Posts: 8
Joined: Wed Jul 13, 2011 12:37 pm
Location: IMCS Rutgers

Re: PYROMS installation

#30 Unread post by rdussin »

the griddata function from numpy is not working correctly. I have replaced it by the one from scipy.interpolate
the call to the function is a bit different so there is an extra-step here:

Code: Select all

import scipy.interpolate as scipyint

# interpolate new bathymetry
lon, lat = np.meshgrid(lons, lats)

sizetot_ini  = lons.shape[0]*lats.shape[0]
position_ini = np.zeros((sizetot_ini ,2))

a = lon.flat
b = lat.flat

for k in np.arange(sizetot_ini):
        position_ini[k,0] = a[k]
        position_ini[k,1] = b[k]

sizetot_final  = hgrd.lon_rho.shape[0]*hgrd.lon_rho.shape[1]
position_final = np.zeros((sizetot_final ,2))

c = hgrd.lon_rho.flat
d = hgrd.lat_rho.flat

for k in np.arange(sizetot_final):
        position_final[k,0] = c[k]
        position_final[k,1] = d[k]

h0 = scipyint.griddata(position_ini,topo.flat,position_final)
h = np.reshape(h0,hgrd.lon_rho.shape)

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#31 Unread post by maxblu33 »

Dear rdussin
Thanks a lot for your response
I try to use the solution that you gave me but it did not work either, after 15 minutes I run out of memory, I have no idea of what could go wrong, I'm triyng to run make_YELLOW_grd_v1.py , is the same prolem that i encounter using griddata from matpltlib.mlab.Do you have any script to make a grid using pyroms, any location would work, is just to test that my anaconda python distribution and my pyroms installation are working correctly
thanks in advance
Luis Sorinas-Morales

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#32 Unread post by maxblu33 »

Hello again, I fix the problem of griddata, it seems that there was an issue regarding netcdf in, when a tried to load data from etopo2 bathimetry the griddata function run out of mrmory, but I run the make_box_grid example with the default data that comes as example with Basemap an it works fine In addition i found another problem writing the grid
... wrote theta_s
... wrote theta_b
... wrote Tcline
... wrote hc
... wrote s_rho
... wrote s_w
... wrote Cs_r
... wrote Cs_w
... wrote h
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/media/elendil/LUIS_64/kate/make_box_grid.py in <module>()
56 grd_name = 'test'
57 grd = pyroms.grid.ROMS_Grid(grd_name, hgrd, vgrd)
---> 58 pyroms.grid.write_ROMS_grid(grd, filename='box.nc')
59
60

/home/elendil/installs/pyroms/pyroms-install/lib/python2.7/site-packages/pyroms/grid.pyc in write_ROMS_grid(grd, filename)
536 write_nc_var(grd.vgrid.h, 'h', ('eta_rho', 'xi_rho'), 'bathymetry at RHO-points', 'meter')
537 #ensure that we have a bath dependancy for hraw
--> 538 if len(grd.vgrid.hraw.shape) == 2:
539 hraw = np.zeros((1, grd.vgrid.hraw.shape[0], grd.vgrid.hraw.shape[1]))
540 hraw[0,:] = grd.vgrid.hraw

AttributeError: 'NoneType' object has no attribute 'shape'

thanks in advance
Luis Sorinas-Morales

hpftcb
Posts: 30
Joined: Wed Apr 13, 2016 7:37 pm
Location: OceanPact

Re: PYROMS installation

#33 Unread post by hpftcb »

Hi maxblu33,
I am also having the same error in grid generation. Did you find out the error's source?
Regards

maxblu33
Posts: 25
Joined: Wed Sep 30, 2015 8:21 pm
Location: University of South Florida

Re: PYROMS installation

#34 Unread post by maxblu33 »

hello hpftcb
Well, since the error was related to hraw, i try to find hraw variable but it did not appear
so i created my own hraw based on h

grd.vgrid.hraw=grd.vgrid.h
and then when i try to write the grid with

pyroms.grid.write_ROMS_grid(grd, filename='box.nc')
it works fine, I obtain a grid that at least seems correctly, nevertheless I'm not quite sure of why hraw was missing

best regards
Luis Sorinas-Morales

zsurenj
Posts: 9
Joined: Fri Apr 24, 2015 4:06 pm
Location: Zhongshan university

Re: PYROMS installation

#35 Unread post by zsurenj »

Hi,
I am attempting to build pyroms_tools. I have installed netcdf4, netcdf4-cxx, netcdf4-fortran and netCDF4 for python and every other prerequisite(numpy,scipy,matplotlib...), as far as i can think of. This results in compilation errors on macOS Sierra are following:
...
f2py options: []
adding 'build/src.macosx-10.12-x86_64-2.7/fortranobject.c' to sources.
adding 'build/src.macosx-10.12-x86_64-2.7' to include_dirs.
building extension "pyroms_toolbox._move_runoff" sources
f2py options: []
adding 'build/src.macosx-10.12-x86_64-2.7/fortranobject.c' to sources.
adding 'build/src.macosx-10.12-x86_64-2.7' to include_dirs.
build_src: building npy-pkg config files
running build_py
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_clib
building '_average' library
compiling Fortran sources
Fortran f77 compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/local/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
creating build/temp.macosx-10.12-x86_64-2.7
creating build/temp.macosx-10.12-x86_64-2.7/pyroms_toolbox
creating build/temp.macosx-10.12-x86_64-2.7/pyroms_toolbox/src
compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -c'
gfortran:fix: pyroms_toolbox/src/average.f90
ar: adding 1 object files to build/temp.macosx-10.12-x86_64-2.7/lib_average.a
ranlib:@ build/temp.macosx-10.12-x86_64-2.7/lib_average.a
building '_move_runoff' library
compiling Fortran sources
Fortran f77 compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/local/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -c'
gfortran:fix: pyroms_toolbox/src/move_runoff.f90
ar: adding 1 object files to build/temp.macosx-10.12-x86_64-2.7/lib_move_runoff.a
ranlib:@ build/temp.macosx-10.12-x86_64-2.7/lib_move_runoff.a
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize Gnu95FCompiler
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'pyroms_toolbox._average' extension
compiling C sources
C compiler: clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/hdf5/1.8.17/include -I/usr/local/Cellar/zlib/1.2.8/include -I/usr/local/Cellar/netcdf/4.3.3.1_5/include

creating build/temp.macosx-10.12-x86_64-2.7/build
creating build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7
creating build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox
compile options: '-Ibuild/src.macosx-10.12-x86_64-2.7 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
clang: build/src.macosx-10.12-x86_64-2.7/fortranobject.c
In file included from build/src.macosx-10.12-x86_64-2.7/fortranobject.c:2:
In file included from build/src.macosx-10.12-x86_64-2.7/fortranobject.h:13:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
^
1 warning generated.
clang: build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox/_averagemodule.c
In file included from build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox/_averagemodule.c:19:
In file included from build/src.macosx-10.12-x86_64-2.7/fortranobject.h:13:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
^
build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox/_averagemodule.c:112:12: warning: unused function 'f2py_size' [-Wunused-function]
static int f2py_size(PyArrayObject* var, ...)
^
2 warnings generated.
compiling Fortran sources
Fortran f77 compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/local/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/local/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
compile options: '-Ibuild/src.macosx-10.12-x86_64-2.7 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
gfortran:fix: pyroms_toolbox/src/average.f90
/usr/local/bin/gfortran -Wall -g -L/usr/local/Cellar/hdf5/1.8.17/lib -L/usr/local/Cellar/zlib/1.2.8/lib -L/usr/local/Cellar/netcdf/4.3.3.1_5/lib build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox/_averagemodule.o build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7/fortranobject.o build/temp.macosx-10.12-x86_64-2.7/pyroms_toolbox/src/average.o -L/usr/local/Cellar/gcc/6.2.0/lib/gcc/6/gcc/x86_64-apple-darwin16.0.0/6.2.0 -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -Lbuild/temp.macosx-10.12-x86_64-2.7 -l_average -lgfortran -o build/lib.macosx-10.12-x86_64-2.7/pyroms_toolbox/_average.so
Undefined symbols for architecture x86_64:
"_PyArg_ParseTupleAndKeywords", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
"_PyCObject_AsVoidPtr", referenced from:
_init_average in _averagemodule.o
_F2PyCapsule_AsVoidPtr in fortranobject.o
"_PyCObject_FromVoidPtr", referenced from:
_fortran_getattr in fortranobject.o
_F2PyCapsule_FromVoidPtr in fortranobject.o
"_PyCObject_Type", referenced from:
_init_average in _averagemodule.o
_F2PyCapsule_Check in fortranobject.o
"_PyComplex_Type", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PyDict_DelItemString", referenced from:
_fortran_setattr in fortranobject.o
"_PyDict_GetItemString", referenced from:
_fortran_getattr in fortranobject.o
"_PyDict_New", referenced from:
_PyFortranObject_New in fortranobject.o
_PyFortranObject_NewAsAttr in fortranobject.o
_fortran_setattr in fortranobject.o
"_PyDict_SetItemString", referenced from:
_init_average in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
_PyFortranObject_New in fortranobject.o
_fortran_getattr in fortranobject.o
_fortran_setattr in fortranobject.o
"_PyErr_Clear", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
_fortran_repr in fortranobject.o
"_PyErr_Format", referenced from:
_init_average in _averagemodule.o
_fortran_call in fortranobject.o
"_PyErr_NewException", referenced from:
_init_average in _averagemodule.o
"_PyErr_NoMemory", referenced from:
_fortran_getattr in fortranobject.o
"_PyErr_Occurred", referenced from:
_init_average in _averagemodule.o
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
"_PyErr_Print", referenced from:
_init_average in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
"_PyErr_SetString", referenced from:
_init_average in _averagemodule.o
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_fortran_setattr in fortranobject.o
_array_from_pyobj in fortranobject.o
...
"_PyExc_AttributeError", referenced from:
_init_average in _averagemodule.o
_fortran_setattr in fortranobject.o
"_PyExc_ImportError", referenced from:
_init_average in _averagemodule.o
"_PyExc_RuntimeError", referenced from:
_init_average in _averagemodule.o
_fortran_call in fortranobject.o
"_PyExc_TypeError", referenced from:
_fortran_call in fortranobject.o
_array_from_pyobj in fortranobject.o
"_PyExc_ValueError", referenced from:
_array_from_pyobj in fortranobject.o
"_PyFloat_Type", referenced from:
_double_from_pyobj in _averagemodule.o
"_PyImport_ImportModule", referenced from:
_init_average in _averagemodule.o
"_PyMem_Free", referenced from:
_fortran_dealloc in fortranobject.o
_fortran_getattr in fortranobject.o
"_PyMem_Malloc", referenced from:
_fortran_getattr in fortranobject.o
"_PyModule_GetDict", referenced from:
_init_average in _averagemodule.o
"_PyNumber_Float", referenced from:
_double_from_pyobj in _averagemodule.o
"_PyNumber_Int", referenced from:
_int_from_pyobj in _averagemodule.o
"_PyOS_snprintf", referenced from:
_fortran_getattr in fortranobject.o
"_PyObject_GetAttrString", referenced from:
_init_average in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_fortran_repr in fortranobject.o
"_PySequence_Check", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PySequence_GetItem", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PyString_AsString", referenced from:
_fortran_repr in fortranobject.o
"_PyString_ConcatAndDel", referenced from:
_fortran_getattr in fortranobject.o
"_PyString_FromFormat", referenced from:
_fortran_repr in fortranobject.o
"_PyString_FromString", referenced from:
_init_average in _averagemodule.o
_fortran_getattr in fortranobject.o
_fortran_repr in fortranobject.o
"_PyString_FromStringAndSize", referenced from:
_fortran_getattr in fortranobject.o
"_PyType_IsSubtype", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_array_from_pyobj in fortranobject.o
"_PyType_Type", referenced from:
_init_average in _averagemodule.o
"_Py_BuildValue", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
"_Py_FindMethod", referenced from:
_fortran_getattr in fortranobject.o
"_Py_InitModule4_64", referenced from:
_init_average in _averagemodule.o
"__PyObject_New", referenced from:
_PyFortranObject_New in fortranobject.o
_PyFortranObject_NewAsAttr in fortranobject.o
"__Py_NoneStruct", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_fortran_getattr in fortranobject.o
_fortran_setattr in fortranobject.o
_array_from_pyobj in fortranobject.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Undefined symbols for architecture x86_64:
"_PyArg_ParseTupleAndKeywords", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
"_PyCObject_AsVoidPtr", referenced from:
_init_average in _averagemodule.o
_F2PyCapsule_AsVoidPtr in fortranobject.o
"_PyCObject_FromVoidPtr", referenced from:
_fortran_getattr in fortranobject.o
_F2PyCapsule_FromVoidPtr in fortranobject.o
"_PyCObject_Type", referenced from:
_init_average in _averagemodule.o
_F2PyCapsule_Check in fortranobject.o
"_PyComplex_Type", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PyDict_DelItemString", referenced from:
_fortran_setattr in fortranobject.o
"_PyDict_GetItemString", referenced from:
_fortran_getattr in fortranobject.o
"_PyDict_New", referenced from:
_PyFortranObject_New in fortranobject.o
_PyFortranObject_NewAsAttr in fortranobject.o
_fortran_setattr in fortranobject.o
"_PyDict_SetItemString", referenced from:
_init_average in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
_PyFortranObject_New in fortranobject.o
_fortran_getattr in fortranobject.o
_fortran_setattr in fortranobject.o
"_PyErr_Clear", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
_fortran_repr in fortranobject.o
"_PyErr_Format", referenced from:
_init_average in _averagemodule.o
_fortran_call in fortranobject.o
"_PyErr_NewException", referenced from:
_init_average in _averagemodule.o
"_PyErr_NoMemory", referenced from:
_fortran_getattr in fortranobject.o
"_PyErr_Occurred", referenced from:
_init_average in _averagemodule.o
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
"_PyErr_Print", referenced from:
_init_average in _averagemodule.o
_F2PyDict_SetItemString in fortranobject.o
"_PyErr_SetString", referenced from:
_init_average in _averagemodule.o
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_fortran_setattr in fortranobject.o
_array_from_pyobj in fortranobject.o
...
"_PyExc_AttributeError", referenced from:
_init_average in _averagemodule.o
_fortran_setattr in fortranobject.o
"_PyExc_ImportError", referenced from:
_init_average in _averagemodule.o
"_PyExc_RuntimeError", referenced from:
_init_average in _averagemodule.o
_fortran_call in fortranobject.o
"_PyExc_TypeError", referenced from:
_fortran_call in fortranobject.o
_array_from_pyobj in fortranobject.o
"_PyExc_ValueError", referenced from:
_array_from_pyobj in fortranobject.o
"_PyFloat_Type", referenced from:
_double_from_pyobj in _averagemodule.o
"_PyImport_ImportModule", referenced from:
_init_average in _averagemodule.o
"_PyMem_Free", referenced from:
_fortran_dealloc in fortranobject.o
_fortran_getattr in fortranobject.o
"_PyMem_Malloc", referenced from:
_fortran_getattr in fortranobject.o
"_PyModule_GetDict", referenced from:
_init_average in _averagemodule.o
"_PyNumber_Float", referenced from:
_double_from_pyobj in _averagemodule.o
"_PyNumber_Int", referenced from:
_int_from_pyobj in _averagemodule.o
"_PyOS_snprintf", referenced from:
_fortran_getattr in fortranobject.o
"_PyObject_GetAttrString", referenced from:
_init_average in _averagemodule.o
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_fortran_repr in fortranobject.o
"_PySequence_Check", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PySequence_GetItem", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
"_PyString_AsString", referenced from:
_fortran_repr in fortranobject.o
"_PyString_ConcatAndDel", referenced from:
_fortran_getattr in fortranobject.o
"_PyString_FromFormat", referenced from:
_fortran_repr in fortranobject.o
"_PyString_FromString", referenced from:
_init_average in _averagemodule.o
_fortran_getattr in fortranobject.o
_fortran_repr in fortranobject.o
"_PyString_FromStringAndSize", referenced from:
_fortran_getattr in fortranobject.o
"_PyType_IsSubtype", referenced from:
_double_from_pyobj in _averagemodule.o
_int_from_pyobj in _averagemodule.o
_array_from_pyobj in fortranobject.o
"_PyType_Type", referenced from:
_init_average in _averagemodule.o
"_Py_BuildValue", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
"_Py_FindMethod", referenced from:
_fortran_getattr in fortranobject.o
"_Py_InitModule4_64", referenced from:
_init_average in _averagemodule.o
"__PyObject_New", referenced from:
_PyFortranObject_New in fortranobject.o
_PyFortranObject_NewAsAttr in fortranobject.o
"__Py_NoneStruct", referenced from:
_f2py_rout__average_avg3d in _averagemodule.o
_f2py_rout__average_avg2d in _averagemodule.o
_fortran_getattr in fortranobject.o
_fortran_setattr in fortranobject.o
_array_from_pyobj in fortranobject.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
error: Command "/usr/local/bin/gfortran -Wall -g -L/usr/local/Cellar/hdf5/1.8.17/lib -L/usr/local/Cellar/zlib/1.2.8/lib -L/usr/local/Cellar/netcdf/4.3.3.1_5/lib build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7/pyroms_toolbox/_averagemodule.o build/temp.macosx-10.12-x86_64-2.7/build/src.macosx-10.12-x86_64-2.7/fortranobject.o build/temp.macosx-10.12-x86_64-2.7/pyroms_toolbox/src/average.o -L/usr/local/Cellar/gcc/6.2.0/lib/gcc/6/gcc/x86_64-apple-darwin16.0.0/6.2.0 -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib -Lbuild/temp.macosx-10.12-x86_64-2.7 -l_average -lgfortran -o build/lib.macosx-10.12-x86_64-2.7/pyroms_toolbox/_average.so" failed with exit status 1

The above errors may be with regard to f2py compiler options, How can I fix them? I would really appreciate for your advices.

navin
Posts: 12
Joined: Mon Jun 08, 2015 4:40 pm
Location: Indian Institute of Technology Delhi

Re: PYROMS installation

#36 Unread post by navin »

I am trying to install pyroms from few days. I have installed pyroms in ubuntu 14.04 64 bit For this I am following this discussion.I am using anaconda2. During installation I found out below problem

1 I have solved the lpsolve55 issue, whenever I do "import lpsolve55" in my console or spyder console it gives no error but during execution of make_YELLOW_grd_v1.py it throws an error.
2. I have also made a shortcut file for scrip.so in lib/python2.7/site-packages/pyroms/remapping folder, but it shows an error scrip.so is not found

Here is the detail output error when i run the make_YELLOW_grd_v1.py from spyder idle

runfile('/home/navin/Downloads/pyroms/examples/Yellow_Sea/make_YELLOW_grd_v1.py', wdir='/home/navin/Downloads/pyroms/examples/Yellow_Sea')
Reloaded modules: pyroms.io, pyroms_toolbox.jview, pyroms_toolbox.get_ijcoast_line, pyroms.extern.greatcircle, pyroms_toolbox, pyroms_toolbox.BGrid_GFDL.flood, pyroms_toolbox.seawater.misc, pyroms_toolbox.seawater.heat, bathy_smoother, pyroms_toolbox._average, pyroms_toolbox.lonview, pyroms_toolbox.iso2gregorian, _interp, pyroms_toolbox.plot_coast_line_from_mask, pyroms_toolbox.TS_diagram, pyroms.tools, _move_river_t, pyroms_toolbox.remapping_bound, pyroms_toolbox.low_pass_filter, pyroms_toolbox.Grid_HYCOM.flood, pyroms_toolbox.mld_from_dens, creep, pyroms.remapping.sta2z, pyroms_toolbox.get_littoral2, pyroms.cf, _obs_interp, pyroms_toolbox.rx0, pyroms.vgrid, pyroms_toolbox.quiver, pyroms.remapping.flood2d, pyroms_toolbox.isoview, pyroms_toolbox.N2, bathy_smoother.LP_tools, pyroms_toolbox.plot_coast_line, pyroms_toolbox.sview, pyroms_toolbox.BGrid_SODA, pyroms_toolbox.BGrid_POP.flood, pyroms_toolbox.seawater.density, pyroms_toolbox.nc_create_roms_file, pyroms_toolbox.Grid_HYCOM.get_nc_Grid_HYCOM, pyroms_toolbox.remapping_tensor, pyroms.extern, _iso, pyroms_toolbox.BGrid_POP.make_remap_grid_file, pyroms_toolbox.BGrid_GFDL.BGrid_GFDL, pyroms_toolbox.shapiro_filter, pyroms_toolbox._move_runoff, pyroms_toolbox.lsq_phase_amplitude, pyroms_toolbox.BGrid_GFDL.plot_coast_line, pyroms_toolbox.ocean_in, pyroms_toolbox.transectview, pyroms.remapping.flood, pyroms_toolbox.O2_saturation, bathy_smoother.LP_bathy_tools, pyroms.remapping.z2roms, pyroms_toolbox.Grid_HYCOM.make_remap_grid_file, pyroms_toolbox.BGrid_SODA.BGrid_SODA, pyroms_toolbox.laplacian, pyroms_toolbox.Grid_HYCOM.flood_fast_weighted, pyroms_toolbox.twoDview, pyroms_toolbox.BGrid_SODA.make_remap_grid_file, pyroms_toolbox.BGrid_GFDL.get_Bgrid_proj, pyroms_toolbox.get_cell_area, pyroms.utility, pyroms_toolbox.latview, pyroms_toolbox.remapping_bound_sig, bathy_smoother.bathy_tools, _remapping, pyroms_toolbox.Grid_HYCOM.Grid_HYCOM, bathy_smoother.bathy_smoothing, pyroms.remapping.remap2, pyroms.hgrid, pyroms_toolbox.shift_SODA_data, bathy_smoother.LP_bathy_smoothing, pyroms_toolbox.rx1, pyroms_toolbox.remapping, pyroms_toolbox.plot_mask, pyroms_toolbox.BGrid_GFDL.get_nc_BGrid_GFDL, pyroms.remapping.test_remap_weights, pyroms_toolbox.jday2date, pyroms.remapping.make_remap_grid_file, pyroms_toolbox.mld_from_temp, pyroms_toolbox.compute_eke, pyroms_toolbox.get_coast_line_from_mask, pyroms.extern.pupynere, pyroms.grid, pyroms.remapping.roms2z, pyroms_toolbox.rvalue, _remapping_fast, pyroms_toolbox.smooth_1D, pyroms, pyroms.remapping, pyroms_toolbox.BGrid_POP, pyroms_toolbox.plot_ijcoast_line, pyroms_toolbox.get_littoral, pyroms_toolbox.BGrid_GFDL, pyroms_toolbox.BGrid_SODA.get_nc_BGrid_SODA, pyroms.sta_grid, pyroms_toolbox.strain_norm_old, pyroms_toolbox.get_coast_line, pyroms_toolbox.gregorian2iso, pyroms_toolbox.seawater, pyroms_toolbox.iview, pyroms_toolbox.seawater.salinity, pyroms_toolbox.zview, pyroms.remapping.remap, pyroms_toolbox.average, pyroms_toolbox.Grid_HYCOM, pyroms_toolbox.BGrid_SODA.flood, pyroms.extern.kdtree, pyroms.remapping.compute_remap_weights, pyroms_toolbox.BGrid_GFDL.make_remap_grid_file, pyroms_toolbox.BGrid_GFDL.get_coast_line, pyroms_toolbox.change, pyroms_toolbox.vorticity, pyroms_toolbox.nc_create_roms_bdry_file, _remapping_fast_weighted, pyroms_toolbox.BGrid_POP.get_nc_BGrid_POP, pyroms_toolbox.BGrid_POP.BGrid_POP, pyroms_toolbox.PCA, pyroms_toolbox.Grid_HYCOM.flood_fast, pyroms_toolbox.date2jday, pyroms_toolbox.compute_moc, pyroms_toolbox.strain_norm, pyroms.sta_hgrid
scrip.so not found. Remapping function will not be available
lpsolve55.so not found.
Linear programming method will not be available.
Exception AttributeError: "'Gridgen' object has no attribute '_libgridgen'" in <bound method Gridgen.__del__ of <pyroms.hgrid.Gridgen object at 0x7efb8514fcd0>> ignored
Traceback (most recent call last):

File "<ipython-input-2-6cbab32db6bb>", line 1, in <module>
runfile('/home/navin/Downloads/pyroms/examples/Yellow_Sea/make_YELLOW_grd_v1.py', wdir='/home/navin/Downloads/pyroms/examples/Yellow_Sea')

File "/home/navin/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 714, in runfile
execfile(filename, namespace)

File "/home/navin/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 81, in execfile
builtins.execfile(filename, *where)

File "/home/navin/Downloads/pyroms/examples/Yellow_Sea/make_YELLOW_grd_v1.py", line 32, in <module>
hgrd = pyroms.grid.Gridgen(lonp, latp, beta, (Mm+3, Lm+3), proj=map)

File "/home/navin/roms/pyroms/lib/python2.7/site-packages/pyroms/hgrid.py", line 1028, in __init__
self._libgridgen = np.ctypeslib.load_library('libgridgen', pyroms.__path__[0])

File "/home/navin/anaconda2/lib/python2.7/site-packages/numpy/ctypeslib.py", line 128, in load_library
raise OSError("no file with expected extension")

OSError: no file with expected extension



but when i run the same example directly in terminal I gets below error

/home/navin/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
scrip.so not found. Remapping function will not be available
Traceback (most recent call last):
File "make_YELLOW_grd_v1.py", line 11, in <module>
import pyroms_toolbox
File "/home/navin/roms/pyroms/lib/python2.7/site-packages/pyroms_toolbox/__init__.py", line 51, in <module>
from _move_river_t import move_river_t
ImportError: No module named _move_river_t

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#37 Unread post by kate »

Just edit this file:
File "/home/navin/roms/pyroms/lib/python2.7/site-packages/pyroms_toolbox/__init__.py", line 51, in <module>
and comment out the line with _move_river_t.

navin
Posts: 12
Joined: Mon Jun 08, 2015 4:40 pm
Location: Indian Institute of Technology Delhi

Re: PYROMS installation

#38 Unread post by navin »

/home/navin/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
Thank's kate for your reply. I did as you told me after that I am getting this error.
Further if anyone can tell me when I am imoprting lpsolve55 in console it is not showing any error, while runnin the grid file it shows error and same about scrip.so, i have already made a link of scrip.so file in the /python2.7/site-packages/pyroms/remapping folder, then why it is showing error. If any one can provide a proper documentation for the installation of pyroms in ubuntu 14.04 64 bit, I will be very helpful.

warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
scrip.so not found. Remapping function will not be available
lpsolve55.so not found.
Linear programming method will not be available.
Traceback (most recent call last):
File "make_YELLOW_grd_v1.py", line 32, in <module>
hgrd = pyroms.grid.Gridgen(lonp, latp, beta, (Mm+3, Lm+3), proj=map)
File "/home/navin/roms/pyroms/lib/python2.7/site-packages/pyroms/hgrid.py", line 1028, in __init__
self._libgridgen = np.ctypeslib.load_library('libgridgen', pyroms.__path__[0])
File "/home/navin/anaconda2/lib/python2.7/site-packages/numpy/ctypeslib.py", line 128, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension
Exception AttributeError: "'Gridgen' object has no attribute '_libgridgen'" in <bound method Gridgen.__del__ of <pyroms.hgrid.Gridgen object at 0x7efbd671d850>> ignored

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#39 Unread post by kate »

First of all, Ubuntu 14.04 is so old they are no longer providing updates for it. It is recommended that you update to the 16.x series. I have such a beast in a VirtualBox I've been meaning to install pyroms/PyCNAL into.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#40 Unread post by kate »

I just got PyCNAL to install with Anaconda3. Important, set PYTHONPATH in your .bashrc file before the Anaconda stuff:
export PYTHONPATH=/home/kate/anaconda3/lib/python3.5/site-packages
export PATH="/home/kate/anaconda3/bin:$PATH"
"import pycnal" even works for me, but now I'm having trouble with pycnal_toolbox and its "import _average". Sigh.

Anyway, check to see if you have any .so files in your .../site-packages/pyroms directory and make sure that .../site-packages directory is in your PYTHONPATH.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#41 Unread post by kate »

I think I finally fixed that move_river_t issue. Also the creep issue. As for location of the .so files, it seems to behave if I have them all where the installation scripts put them as well as one directory up, right inside the site-packages directory. :roll: :?:

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: PYROMS installation

#42 Unread post by badpa.reza »

Hi there,
I hope all is well with you.
I am a beginner at ROMS learning. I have been trying to install PYROMS for more than 10 days. But every time, I face with a problem about lpsolve. The Linux machine I have used is CentOS7, and the version of python on it is 3.8.16. When I try this command line sudo python3 setup.py install, in this directory: lp_solve_5.5/extra/Python, I receive many errors, mostly about pythonmod.c.

Code: Select all

sudo python3 setup.py install
numpy: NONUMPY
/opt/conda3/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/opt/conda3/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
lpsolve.c: In function ‘createconstant’:
lpsolve.c:264:78: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                             ((constants[i].mask != 0) && (constants[i].value == (value & constants[i].mask)))) {
                                                                              ^~
At top level:
lpsolve.c:580:13: warning: ‘impl_demo’ defined but not used [-Wunused-function]
 static void impl_demo(structlpsolve *lpsolve)
             ^~~~~~~~~
lpsolve.c:401:14: warning: ‘reallocmem’ defined but not used [-Wunused-function]
 static void *reallocmem(structlpsolve *lpsolve, void *ptr, size_t size)
              ^~~~~~~~~~
pythonmod.c:44:41: error: field name not in record or union initializer
 static PyModuleDef lpsolve_module[] = { .m_base = PyModuleDef_HEAD_INIT,
                                         ^
pythonmod.c:44:41: note: (near initialization for ‘lpsolve_module’)
pythonmod.c:44:39: warning: missing braces around initializer [-Wmissing-braces]
 static PyModuleDef lpsolve_module[] = { .m_base = PyModuleDef_HEAD_INIT,
                                       ^
pythonmod.c:44:51: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 static PyModuleDef lpsolve_module[] = { .m_base = PyModuleDef_HEAD_INIT,
                                                   ^~~~~~~~~~~~~~~~~~~~~
pythonmod.c:44:51: note: (near initialization for ‘lpsolve_module[0].m_size’)
pythonmod.c:44:39: warning: missing braces around initializer [-Wmissing-braces]
 static PyModuleDef lpsolve_module[] = { .m_base = PyModuleDef_HEAD_INIT,
                                       ^
pythonmod.c:45:1: error: field name not in record or union initializer
 .m_name = lpsolve_name,
 ^
pythonmod.c:45:1: note: (near initialization for ‘lpsolve_module’)
pythonmod.c:45:11: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 .m_name = lpsolve_name,
           ^~~~~~~~~~~~
pythonmod.c:45:11: note: (near initialization for ‘lpsolve_module[1].m_base.ob_base.ob_refcnt’)
pythonmod.c:46:1: error: field name not in record or union initializer
 .m_doc = lpsolve_doc,
 ^
pythonmod.c:46:1: note: (near initialization for ‘lpsolve_module’)
pythonmod.c:46:10: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 .m_doc = lpsolve_doc,
          ^~~~~~~~~~~
pythonmod.c:46:10: note: (near initialization for ‘lpsolve_module[2].m_base.ob_base.ob_refcnt’)
pythonmod.c:47:1: error: field name not in record or union initializer
 .m_methods = lpsolve_methods
 ^
pythonmod.c:47:1: note: (near initialization for ‘lpsolve_module’)
pythonmod.c:47:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 .m_methods = lpsolve_methods
              ^~~~~~~~~~~~~~~
pythonmod.c:47:14: note: (near initialization for ‘lpsolve_module[3].m_base.ob_base.ob_refcnt’)
pythonmod.c:44:39: warning: missing braces around initializer [-Wmissing-braces]
 static PyModuleDef lpsolve_module[] = { .m_base = PyModuleDef_HEAD_INIT,
                                       ^
pythonmod.c:52:1: error: unknown type name ‘PYMODINITI_FUNC’; did you mean ‘PyMODINIT_FUNC’?
 PYMODINITI_FUNC
 ^~~~~~~~~~~~~~~
 PyMODINIT_FUNC
In file included from /opt/conda3/include/python3.8/Python.h:137:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
pythonmod.c: In function ‘PYInit_lpsolve55’:
pythonmod.c:58:25: warning: passing argument 1 of ‘PyModule_Create2’ from incompatible pointer type [-Wincompatible-pointer-types]
     m = PyModule_Create(&lpsolve_module);
                         ^
/opt/conda3/include/python3.8/modsupport.h:223:26: note: in definition of macro ‘PyModule_Create’
         PyModule_Create2(module, PYTHON_API_VERSION)
                          ^~~~~~
/opt/conda3/include/python3.8/modsupport.h:211:24: note: expected ‘struct PyModuleDef *’ but argument is of type ‘PyModuleDef (*)[4] {aka struct PyModuleDef (*)[4]}’
 PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*,
                        ^~~~~~~~~~~~~~~~
pythonmod.c:91:35: warning: implicit declaration of function ‘PyInt_FromLong’; did you mean ‘PyLong_FromLong’? [-Wimplicit-function-declaration]
     PyDict_SetItemString(d, "EQ", PyInt_FromLong(EQ));
                                   ^~~~~~~~~~~~~~
                                   PyLong_FromLong
pythonmod.c:91:35: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:92:35: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "GE", PyInt_FromLong(GE));
                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:93:35: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "FR", PyInt_FromLong(FR));
                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:94:43: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_NONE", PyInt_FromLong(SCALE_NONE));
                                           ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:95:46: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_EXTREME", PyInt_FromLong(SCALE_EXTREME));
                                              ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:96:44: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_RANGE", PyInt_FromLong(SCALE_RANGE));
                                            ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:97:43: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_MEAN", PyInt_FromLong(SCALE_MEAN));
                                           ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:98:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_GEOMETRIC", PyInt_FromLong(SCALE_GEOMETRIC));
                                                ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:99:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_CURTISREID", PyInt_FromLong(SCALE_CURTISREID));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:100:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_QUADRATIC", PyInt_FromLong(SCALE_QUADRATIC));
                                                ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:101:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_LOGARITHMIC", PyInt_FromLong(SCALE_LOGARITHMIC));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:102:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_USERWEIGHT", PyInt_FromLong(SCALE_USERWEIGHT));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:103:45: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_POWER2", PyInt_FromLong(SCALE_POWER2));
                                             ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:104:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_EQUILIBRATE", PyInt_FromLong(SCALE_EQUILIBRATE));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:105:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_INTEGERS", PyInt_FromLong(SCALE_INTEGERS));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:106:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_DYNUPDATE", PyInt_FromLong(SCALE_DYNUPDATE));
                                                ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:107:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_ROWSONLY", PyInt_FromLong(SCALE_ROWSONLY));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:108:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "SCALE_COLSONLY", PyInt_FromLong(SCALE_COLSONLY));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:109:45: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "IMPROVE_NONE", PyInt_FromLong(IMPROVE_NONE));
                                             ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:110:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "IMPROVE_SOLUTION", PyInt_FromLong(IMPROVE_SOLUTION));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:111:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "IMPROVE_DUALFEAS", PyInt_FromLong(IMPROVE_DUALFEAS));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:112:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "IMPROVE_THETAGAP", PyInt_FromLong(IMPROVE_THETAGAP));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:113:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "IMPROVE_BBSIMPLEX", PyInt_FromLong(IMPROVE_BBSIMPLEX));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:114:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICER_FIRSTINDEX", PyInt_FromLong(PRICER_FIRSTINDEX));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:115:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICER_DANTZIG", PyInt_FromLong(PRICER_DANTZIG));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:116:45: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICER_DEVEX", PyInt_FromLong(PRICER_DEVEX));
                                             ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:117:52: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICER_STEEPESTEDGE", PyInt_FromLong(PRICER_STEEPESTEDGE));
                                                    ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:118:53: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_PRIMALFALLBACK", PyInt_FromLong(PRICE_PRIMALFALLBACK));
                                                     ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:119:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_MULTIPLE", PyInt_FromLong(PRICE_MULTIPLE));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:120:46: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_PARTIAL", PyInt_FromLong(PRICE_PARTIAL));
                                              ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:121:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_ADAPTIVE", PyInt_FromLong(PRICE_ADAPTIVE));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:122:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_RANDOMIZE", PyInt_FromLong(PRICE_RANDOMIZE));
                                                ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:123:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_AUTOPARTIAL", PyInt_FromLong(PRICE_AUTOPARTIAL));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:124:47: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_LOOPLEFT", PyInt_FromLong(PRICE_LOOPLEFT));
                                               ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:125:52: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_LOOPALTERNATE", PyInt_FromLong(PRICE_LOOPALTERNATE));
                                                    ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:126:52: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_HARRISTWOPASS", PyInt_FromLong(PRICE_HARRISTWOPASS));
                                                    ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:127:51: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRICE_TRUENORMINIT", PyInt_FromLong(PRICE_TRUENORMINIT));
                                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:128:46: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_NONE", PyInt_FromLong(PRESOLVE_NONE));
                                              ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:129:46: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_ROWS", PyInt_FromLong(PRESOLVE_ROWS));
                                              ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:130:46: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_COLS", PyInt_FromLong(PRESOLVE_COLS));
                                              ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:131:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_LINDEP", PyInt_FromLong(PRESOLVE_LINDEP));
                                                ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:132:45: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_SOS", PyInt_FromLong(PRESOLVE_SOS));
                                             ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:133:51: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_REDUCEMIP", PyInt_FromLong(PRESOLVE_REDUCEMIP));
                                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:134:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_KNAPSACK", PyInt_FromLong(PRESOLVE_KNAPSACK));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:135:49: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_ELIMEQ2", PyInt_FromLong(PRESOLVE_ELIMEQ2));
                                                 ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:136:53: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_IMPLIEDFREE", PyInt_FromLong(PRESOLVE_IMPLIEDFREE));
                                                     ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:137:51: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_REDUCEGCD", PyInt_FromLong(PRESOLVE_REDUCEGCD));
                                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:138:50: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_PROBEFIX", PyInt_FromLong(PRESOLVE_PROBEFIX));
                                                  ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:139:53: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_PROBEREDUCE", PyInt_FromLong(PRESOLVE_PROBEREDUCE));
                                                     ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:140:53: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_ROWDOMINATE", PyInt_FromLong(PRESOLVE_ROWDOMINATE));
                                                     ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:141:53: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_COLDOMINATE", PyInt_FromLong(PRESOLVE_COLDOMINATE));
                                                     ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:142:51: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_MERGEROWS", PyInt_FromLong(PRESOLVE_MERGEROWS));
                                                   ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:143:52: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_IMPLIEDSLK", PyInt_FromLong(PRESOLVE_IMPLIEDSLK));
                                                    ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:144:52: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_COLFIXDUAL", PyInt_FromLong(PRESOLVE_COLFIXDUAL));
                                                    ^~~~~~~~~~~~~~
In file included from /opt/conda3/include/python3.8/Python.h:107:0,
                 from pythonmod.h:8,
                 from lpsolvecaller.h:20,
                 from pythonmod.c:1:
/opt/conda3/include/python3.8/dictobject.h:58:17: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘int’
 PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
                 ^~~~~~~~~~~~~~~~~~~~
pythonmod.c:145:48: warning: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion]
     PyDict_SetItemString(d, "PRESOLVE_BOUNDS", PyInt_FromLong(PRESOLVE_BOUNDS));
                                                ^~~~~~~~~~~~~~
 ^
error: command '/opt/rh/devtoolset-7/root/usr/bin/gcc' failed with exit code 1
Can you guide me? Is there any easier way to use PYROMS?
I appreciate your time and help in advance.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#43 Unread post by kate »

Do you have the latest pyroms? The current README instructions say to use pip install instead.

Depending on what you plan to do with pyroms, you may not need lpsolve at all. I don't use it. What do you need pyroms for?

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: PYROMS installation

#44 Unread post by badpa.reza »

I have not used PYROMS yet. I was confused about lpsolve. I don't have the latest pyroms. Honesty, I feel I am lost. I was trying to use an instruction from Dr. Yusri Yusup. It belongs from 2 years ago. I thought I need it for creating Boundary, Climate, IC files, and Forcing files.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: PYROMS installation

#45 Unread post by kate »

None of those things need lpsolve. It is used for a very specific type of bathymetry smoothing. Bathymetry smoothing is part of grid generation, where you interpolate bathymetry to your grid, then smooth it enough so that ROMS can run.

Calling compiled code from Python has been problematic and it's just going to get worse.

badpa.reza
Posts: 11
Joined: Mon Nov 01, 2021 9:25 pm
Location: State University of New York

Re: PYROMS installation

#46 Unread post by badpa.reza »

Thank you so much for your information. For bathymetry, I think I can use GridBuilder_toolbox.mltbx.
I ignore it and continue to install pyroms.

Post Reply