Pyroms installation error

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Pyroms installation error

#1 Unread post by ifeanyee »

Hi All,

I'm trying to install pyroms following the instruction from in the github page. Using a conda environment, I have install all the package listed in the git page. However whenever I try to use the following command,

Code: Select all

pip install -e pyroms/pyroms 
I get an error

Code: Select all

    ERROR: Command errored out with exit status 1:
     command: /net/nfs/tools/python-anaconda/Anaconda3-2021.05/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/snmor/3D_models/pyroms/pyroms/pyroms/setup.py'"'"'; __file__='"'"'/home/snmor/3D_models/pyroms/pyroms/pyroms/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /scratchu/snmor/pip-pip-egg-info-1fd8h2j7
         cwd: /home/snmor/3D_models/pyroms/pyroms/pyroms/
    Complete output (12 lines):
    running egg_info
    running build_src
    build_src
    building extension "_iso" sources
    f2py options: []
    f2py:> build/src.linux-x86_64-3.8/_isomodule.c
    IOError: [Errno 2] No such file or directory: 'pyroms/src/iso.f'. Skipping file "pyroms/src/iso.f".
    error: f2py target file 'build/src.linux-x86_64-3.8/_isomodule.c' not generated
    Reading fortran codes...
    Post-processing...
    Post-processing (stage 2)...
    Building modules...
    ----------------------------------------
WARNING: Discarding file:///home/snmor/3D_models/pyroms/pyroms/pyroms. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I don't know if anyone has encountered similar issue in the past and I would love to hear how to solve it.

Thanks

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

Re: Pyroms installation error

#2 Unread post by kate »

It says it can't find pyroms/src/iso.f. Do you have pyroms/pyroms/pyroms/src/iso.f? I have seven Fortran files in that directory, including iso.f.

ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Re: Pyroms installation error

#3 Unread post by ifeanyee »

Yes, I do have the iso.f file as well as other seven .f files.

Code: Select all

[snmor@pyroms]$ ls pyroms/pyroms/src/
interp.f  iso.f  obs_interp.f  remapping.f  remapping.f90  remapping_fast.f  remapping_fast_weighted.f
If that's not the issue, I wonder what is?

ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Re: Pyroms installation error

#4 Unread post by ifeanyee »

Hi Kate and everyone,

Now, I have been able to install pyroms but have problem with the SCRIP build. I ran into this hurdle:

Code: Select all

(model2roms)$ make DEVELOP=1 PREFIX=$PREFIX install
./netcdf.f:44: Error: Can't open included file 'netcdf.inc'
make: *** [netcdf.o] Error 1
It seem it can't find a file/obj netcdf.inc. Please is there any help to solve this issue.

Thanks

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

Re: Pyroms installation error

#5 Unread post by kate »

netcdf.inc comes with the NetCDF-Fortran prerequisite. The first question is do you have it? Where is it?

The second question is how do you get scrip to find it? There's a makefile in pyroms/pyroms/external/scrip/source
using the NETCDF_INCDIR environment variable. Mine is currently pointing to:
/usr/local/pkg/data/netCDF/4.4.1.1-foss-2016b/include
I see that that directory does *not* contain netcdf.inc, but rather the C netcdf include files. If I wanted
to compile scrip, I would have to instead point it to the Fortran netcdf include files.

ifeanyee
Posts: 14
Joined: Mon Nov 22, 2021 11:05 pm
Location: Laboratoire des sciences du climat et de l'environ

Re: Pyroms installation error

#6 Unread post by ifeanyee »

Hi Kate and others,

I can find the netcdf.inc file using the

Code: Select all

nf-config --all

Code: Select all

This netCDF-Fortran 4.4.2 has been built with the following features:

  --cc        -> gcc
  --cflags    ->  -I/opt/netcdf43/gfortran49/include

  --fc        -> gfortran
  --fflags    -> -I/opt/netcdf43/gfortran49/include
  --flibs     -> -L/opt/netcdf43/gfortran49/lib -lnetcdff  -Wl,-rpath -Wl,/opt/netcdf43/gfortran49/lib -lnetcdf -lnetcdf
  --has-f90   -> no
  --has-f03   -> yes

  --has-nc2   -> yes
  --has-nc4   -> yes

  --prefix    -> /opt/netcdf43/gfortran49
  --includedir-> /opt/netcdf43/gfortran49/include
  --version   -> netCDF-Fortran 4.4.2
If I look into the /include folder, there is indeed a netcdf.inc file there.

Code: Select all

$ ls /opt/netcdf43/gfortran49/include
netcdf4_f03.mod            netcdf_f03.mod                  netcdf.inc     netcdf_nc_data.mod        netcdf_nf_interfaces.mod
netcdf4_nc_interfaces.mod  netcdf_fortv2_c_interfaces.mod  netcdf_meta.h  netcdf_nc_interfaces.mod  typesizes.mod
netcdf4_nf_interfaces.mod  netcdf.h                        netcdf.mod     netcdf_nf_data.mod
But for some reason, the makefile seem to not be able to locate this file. I even tried to manually type this location path in the NETCDF_INCDIR of the makefile, but still the same the error.

Code: Select all

gfortran -g -fdefault-real-8 -ffixed-form -O2 -fPIC -I. -I/home/snmor/.conda/envs/model2roms/include -c ./netcdf.f
./netcdf.f:44: Error: Can't open included file 'netcdf.inc'
make: *** [netcdf.o] Error 1

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

Re: Pyroms installation error

#7 Unread post by kate »

I don't know what to say. Perhaps we should disable the building of scrip? It's not like
I use it anymore, as I've said here in these forums before. For me it builds, but doesn't load.

Post Reply