Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install nceplibs-wrf_io on Linux machine? #39

Open
Bayu-Risanto opened this issue Dec 14, 2022 · 9 comments
Open

How to install nceplibs-wrf_io on Linux machine? #39

Bayu-Risanto opened this issue Dec 14, 2022 · 9 comments

Comments

@Bayu-Risanto
Copy link

Hello. I am trying to install nceplibs-wrf_io on our linux machine. Following the "build" instruction, I have done cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. . Then it prompted .-- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0.
Then to install it, I tried make but it generated error make: *** No targets specified and no makefile found. Stop. Could you please advise me on how to install the package in our library?

@edwardhartnett
Copy link
Contributor

Please post the full output of cmake and make.

@Bayu-Risanto
Copy link
Author

Here are the files I found in the cmake directory - I copied them into txt files.
FindNetCDF.cmake.txt
PackageConfig.cmake.in.txt

And here is the Makefile from the top directory -- I copied it into a txt file
Makefile.txt

Here is the Makefile2 from the CMakeFiles directory -- I copied it into a txt file
Makefile2.txt

Thank you.

@edwardhartnett
Copy link
Contributor

What I need you to do is try to do the build, and then cut and paste the screen which will include both the commands you used, and the output you got back.

For example, here's how it works for me:


ed@koko:~/NCEPLIBS-wrf_io$ mkdir build
ed@koko:~/NCEPLIBS-wrf_io$ cd build
ed@koko:~/NCEPLIBS-wrf_io/build$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/wrf_io .. && make && sudo make install
-- The C compiler identification is GNU 9.4.0
-- The Fortran compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Setting build type to 'Release' as none was specified.
-- Found NetCDF: /usr/include (found version "4.7.3") found components: Fortran 
-- FindNetCDF defines targets:
--   - NetCDF_VERSION [4.7.3]
--   - NetCDF_PARALLEL [FALSE]
--   - NetCDF_C_CONFIG_EXECUTABLE [/usr/bin/nc-config]
--   - NetCDF::NetCDF_C [SHARED] [Root: /usr] Lib: /usr/lib/x86_64-linux-gnu/libnetcdf.so 
--   - NetCDF_Fortran_CONFIG_EXECUTABLE [/usr/bin/nf-config]
--   - NetCDF::NetCDF_Fortran [SHARED] [Root: /usr] Lib: /usr/lib/x86_64-linux-gnu/libnetcdff.so 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ed/NCEPLIBS-wrf_io/build
[ 14%] Building Fortran object src/CMakeFiles/wrf_io.dir/module_driver_constants.F90.o
[ 28%] Building Fortran object src/CMakeFiles/wrf_io.dir/module_machine.F90.o
[ 42%] Building Fortran object src/CMakeFiles/wrf_io.dir/wrf_io.f90.o
/home/ed/NCEPLIBS-wrf_io/src/wrf_io.f90:1427:36:

 1427 |   CALL ext_ncd_open_for_read_begin( DatasetName, Comm1, Comm2, SysDepInfo, DataHandle, Status )
      |                                    1
Warning: Dummy argument ‘datasetname’ with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)
/home/ed/NCEPLIBS-wrf_io/src/wrf_io.f90:7285:71:

 7285 |                                                    ,i1,i2,j1,j2,k1,k2 )
      |                                                                       1
Warning: Type mismatch in argument ‘field’ at (1); passed INTEGER(4) to REAL(8) [-Wargument-mismatch]
[ 57%] Building Fortran object src/CMakeFiles/wrf_io.dir/field_routines.F90.o
[ 71%] Building Fortran object src/CMakeFiles/wrf_io.dir/io_int_stubs.f90.o
[ 85%] Building C object src/CMakeFiles/wrf_io.dir/pack_utils.c.o
[100%] Linking Fortran static library libwrf_io.a
[100%] Built target wrf_io
[sudo] password for ed: 
[100%] Built target wrf_io
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/wrf_io/include
-- Installing: /usr/local/wrf_io/include/module_driver_constants.mod
-- Installing: /usr/local/wrf_io/include/ext_ncd_support_routines.mod
-- Installing: /usr/local/wrf_io/include/module_machine.mod
-- Installing: /usr/local/wrf_io/include/wrf_data.mod
-- Installing: /usr/local/wrf_io/include/module_message.mod
-- Installing: /usr/local/wrf_io/lib/libwrf_io.a
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-config.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-config-version.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-targets.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-targets-release.cmake
ed@koko:~/NCEPLIBS-wrf_io/build$ 

@Bayu-Risanto
Copy link
Author

Here is what I got.

[bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install
-- Found NetCDF: /st6/bayu/opt/include (found version "4.8.1") found components: Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.8.1]
-- - NetCDF_PARALLEL [FALSE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nf-config]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdff.so
-- Configuring done
-- Generating done
-- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0
make: *** No targets specified and no makefile found. Stop.

@edwardhartnett
Copy link
Contributor

Your output says:

Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0

But that is not the directory you indicate you are in:

[bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install

What directory are you in when you issue the cmake command?

@Bayu-Risanto
Copy link
Author

I issued the cmake command in this directory /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0/build

@edwardhartnett
Copy link
Contributor

Are you sure?

Mine says:
Build files have been written to: /home/ed/NCEPLIBS-wrf_io/build

Yours says:
Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0

Where's the /build?

@Bayu-Risanto
Copy link
Author

I am sure it is in /build. I typed pwd command and it shows that the cmake command is issued in /build. Here is what I did:

[bayu@stratus build]$ pwd
/st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0/build
[bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install
-- Found NetCDF: /st6/bayu/opt/include (found version "4.8.1") found components: Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.8.1]
-- - NetCDF_PARALLEL [FALSE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nf-config]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdff.so
-- Configuring done
-- Generating done
-- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0
make: *** No targets specified and no makefile found. Stop.
[bayu@stratus build]$

@edwardhartnett
Copy link
Contributor

Sorry I was stumped at the time but rereading this, could it be that your build directory is not a subdirectory of /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants