flexpart / flexpart

This is the GitHib mirror of the development repository for the FLEXPART model
https://flexpart.eu
GNU General Public License v3.0
14 stars 5 forks source link

can not make flexpart #2

Open RyosukeDTomita opened 3 years ago

RyosukeDTomita commented 3 years ago

problem with timemanager.f90

When I make flexpart makefile, I got the unkown error. please help me to find solutions.

environment

path setting

In the flexpart/src/makefile, I defined directory path like this.

    INCPATH1  = /usr/local/include #eccodes_config.h eccodes.h etc.
    INCPATH2  = /usr/include # hdf5,netcdf,netcdf-fortran,zlib
    LIBPATH1 = /usr/local/lib #libeccodes_f90.so,libeccodes.so

I add to $PATH in bashrc

PATH=$PATH":/usr/local/lib/"
PATH=$PATH":/usr/lib/"

install library

jasper (1.900.1)

./configure --prefix=/usr
make check
sudo make install

eccodes(2.7.3)

mkdir build; cd build
cmake ../eccodes-2.7.3-Source -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_C_COMPILER=gcc -DCMAKE_Fortran_COMPILER=gfortran
make
ctest -jt 4
sudo make install

zlib(1.2.9)

./configure --prefix=/usr
sudo make
sudo make install

hdf5(5-1.18.17)

./configure --with-zlib=/usr/local/lib --prefix=/usr
sudo make
sudo make check
sudo make install

netcdf-c

I want to compile netcdf-c-4.4.1. But I run "sudo make check" I got unknown error. So, I use apt to get version 4.7.3

sudo apt install libnetcdf-dev

netcdf-fortran

When I "make", then unkown error occured. So, I also use apt to install version 4.5.2

sudo apt install libnetcdff-dev

flexpart

I change makefile following code.

    INCPATH1  = /usr/local/include #eccodes_config.h eccodes.h etc.
    INCPATH2  = /usr/include # hdf5,netcdf,netcdf-fortran,zlib
    LIBPATH1 = /usr/local/lib #libeccodes_f90.so,libeccodes.so

#LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)
LIBS = -leccodes_f90 -leccodes -lm -ljasper $(NCOPT)
cd flexpart/src
sudo make

timemanager.f90:583: warning: type of ‘get_wetscav’ does not match original declaration [-Wlto-type-mismatch]
  583 |             call get_wetscav(itime,lsynctime,loutnext,j,ks,grfraction,idummy,idummy,wetscav)
      | 
get_wetscav.f90:4: note: ‘get_wetscav’ was previously declared here
    4 | subroutine get_wetscav(itime,ltsample,loutnext,jpart,ks,grfraction,inc_count,blc_count,wetscav)
      | 
get_wetscav.f90:4: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used

I cannot erase this error. How can I fix it? If you know the solutions. please tell me.

ipisso commented 3 years ago

If compilation fails, it may be that a warnings are being treated as errors. Try to locate and remove a flag -Werror if set or set -Wno-error.

RyosukeDTomita commented 3 years ago

Thank you for replying.

I tried to run

sudo make -Wno-error

But, same error is occured. Are there any idea of error? If you come up with any idea, please let me know.