Project

General

Profile

Intallation of CDO 1.9.8 does not work

Added by Herman Caron over 4 years ago

Hi all,

I tried 3 times to install CDO 1.9.8 with netcdf and eccodes support but I'm still stuck on CDO 1.9.3 according to the CDO -V output. The CDO -V file, config.log and make check output file are attached.

Any help is much appreciated as I'm really stuck.

make check output.txt (44.2 KB) make check output.txt Make check output
config.log (87.4 KB) config.log Config.log
CDO -V.txt (1.07 KB) CDO -V.txt CDO -V

Replies (15)

RE: Intallation of CDO 1.9.8 does not work - Added by Karin Meier-Fleischer over 4 years ago

Did you do 'make install'?

-Karin

RE: Intallation of CDO 1.9.8 does not work - Added by Herman Caron over 4 years ago

Hi Karin, I used "sudo make install"

RE: Intallation of CDO 1.9.8 does not work - Added by Karin Meier-Fleischer over 4 years ago

Is the bindir set in your PATH environment variable? How does it look like?

bindir = /usr/local/mypackages/cdo-1.9.8/build/bin

RE: Intallation of CDO 1.9.8 does not work - Added by Herman Caron over 4 years ago

The binary is here; /usr/local/mypackages/cdo-1.9.8/build/bin

My /ETC/environment is

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export ECCODES_DIR="/tmp/build_eccodes.2.14.1"
TMPDIR="/var/tmp"

RE: Intallation of CDO 1.9.8 does not work - Added by Karin Meier-Fleischer over 4 years ago

Yes, the binary is where it should be installed setting --prefix=/usr/local/mypackages/cdo-1.9.8/build/ but the bindir path is not set in your PATH environment variable. The system is looking for cdo and it still finds an old version in one of the given PATH directories ('which cdo' resturns the location of cdo).

You have to add the bindir path to the PATH environment variable.

For bash or sh:
export PATH="/usr/local/mypackages/cdo-1.9.8/build/bin:${PATH}"

or for csh, tcsh:
setenv PATH "/usr/local/mypackages/cdo-1.9.8/build/bin:${PATH}"

RE: Intallation of CDO 1.9.8 does not work - Added by Herman Caron over 4 years ago

Hi Karin, I have added the line for bash as requested in ETC/environment, saved the file and exited Ubuntu. After restarting Ubuntu console and typing CDO -V gives "CDO: command not found".

Contents of ETC/environment;

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export ECCODES_DIR="/tmp/build_eccodes.2.14.1"
TMPDIR="/var/tmp"
export PATH="/usr/local/mypackages/cdo-1.9.8/build/bin:${PATH}"

RE: Intallation of CDO 1.9.8 does not work - Added by Karin Meier-Fleischer over 4 years ago

I'm not an Ubuntu user but I would guess that you have to add the path to your local PATH environment variable in your user .profile or .login file in $HOME. BTW, you don't have to restart your system you can activate the file content, e.g. .login, with

. $HOME/.login

But this is more about bash and Ubuntu than cdo.

RE: Intallation of CDO 1.9.8 does not work - Added by Ralf Mueller over 4 years ago

the .bashrc file in $HOME is also a good option to set the PATH variable.

RE: Intallation of CDO 1.9.8 does not work - Added by Herman Caron over 4 years ago

Hi Karin & Ralf, thanks for your tips. I have added the line

export CDO_PATH=usr/local/mypackages/cdo-1.9.8

in /etc/profile.d/extra_parameters_Herman.sh

and added the line

export CDO_DIR="/usr/local/mypackages/cdo-1.9.8"

in /etc/environment

If I run . /etc/environment to implement the changes and run ENV to see the environment variables I get the full output as per attachment. The relevant snippets are;

CDO_PATH=/usr/local/mypackages/cdo-1.9.8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:usr/local/mypackages/cdo-1.9.8/bin
CDO_DIR=/usr/local/mypackages/cdo-1.9.8

But still I'm at cdo 1.9.3 according to cdo -V. I don't understand.

RE: Intallation of CDO 1.9.8 does not work - Added by Karin Meier-Fleischer over 4 years ago

As mentioned above you have to add the new path at the beginning of PATH.

You can do it like this

PATH="/usr/local/mypackages/cdo-1.9.8/build/bin:${PATH}"

or

PATH=/usr/local/games:usr/local/mypackages/cdo-1.9.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

RE: Intallation of CDO 1.9.8 does not work - Added by Ralf Mueller over 4 years ago

Herman Caron wrote:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:usr/local/mypackages/cdo-1.9.8/bin

There is a '/' missing before the last usr. I am not an ubuntu expert, but I would add the following line to ~/.bashrc or ~/.profile

export PATH=/usr/local/mypackages/cdo-1.9.8/bin:$PATH

that should be sufficient

RE: Intallation of CDO 1.9.8 does not work - Added by Ralf Mueller over 4 years ago

if you want to know, which files are read at startup of bash, take a look into the FILES paragraph of the man-page.

hth
ralf

RE: Intallation of CDO 1.9.8 does not work - Added by Herman Caron over 4 years ago

Thanks you both again for your help and patience, I finally got 1.9.8 up and running! I forgot that the binary was created in a subdirectory "build" under the main directory "cdo-1.9.8" - which is more or less standard practice according to [[https://askubuntu.com/]].

So I have added the line (with slash for usr) and the subdirectory to the path;

PATH="/usr/local/games:/usr/local/mypackages/cdo-1.9.8/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

in the /etc/environment. Et voila!

Thanks again for your help!

cdo -V
Climate Data Operators version 1.9.8 (https://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: g++ -g -O2 -fopenmp
CXX version : g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
C Compiler: gcc -fPIC -fopenmp
C version : gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
F77 Compiler: f77 -g -O2
F77 version : unknown
Features: 15GB 8threads C++14 Fortran DATA PTHREADS OpenMP SSE2
Libraries:
Filetypes: srv ext ieg grb1 grb2 nc1 nc5
CDI library version : 1.9.8
cgribex library version : 1.9.4
ecCodes library version : 2.14.1
NetCDF library version : 4.6.0 of Feb 9 2018 19:21:24 $
exse library version : 1.4.1
FILE library version : 1.8.3

RE: Intallation of CDO 1.9.8 does not work - Added by Matteo Bruno Ricozzi about 4 years ago

Herman Caron wrote:

Thanks you both again for your help and patience, I finally got 1.9.8 up and running! I forgot that the binary was created in a subdirectory "build" under the main directory "cdo-1.9.8" - which is more or less standard practice according to [[https://askubuntu.com/]].

So I have added the line (with slash for usr) and the subdirectory to the path;

PATH="/usr/local/games:/usr/local/mypackages/cdo-1.9.8/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

in the /etc/environment. Et voila!

Thanks again for your help!

cdo -V
Climate Data Operators version 1.9.8 (https://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: g++ -g -O2 -fopenmp
CXX version : g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
C Compiler: gcc -fPIC -fopenmp
C version : gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
F77 Compiler: f77 -g -O2
F77 version : unknown
Features: 15GB 8threads C++14 Fortran DATA PTHREADS OpenMP SSE2
Libraries:
Filetypes: srv ext ieg grb1 grb2 nc1 nc5
CDI library version : 1.9.8
cgribex library version : 1.9.4
ecCodes library version : 2.14.1
NetCDF library version : 4.6.0 of Feb 9 2018 19:21:24 $
exse library version : 1.4.1
FILE library version : 1.8.3

Dear Mr. Caron,

I'm a Linux newbie and I'm really struggling to get my hands on CDO.

I'm using Ubuntu 18.04 LTS and I must install CDO 1.9.8 on my PC. After many unsuccessful trials I'm surrendering to the fact I'll have to use cdo 1.9.3 (which i get through atp-get install...) hoping that everything will workout.

Could you be so king in helping me going through the installation process that you followed?

Best Regards

Matteo B. Ricozzi

RE: Intallation of CDO 1.9.8 does not work - Added by Ralf Mueller about 4 years ago

cdo-1.9.3 coming from the the base system should be fine.

cheers
ralf

    (1-15/15)