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

error ww3_grib.o not found when i compile ww3-6.07 model with ncep2 #1239

Open
aminekhedim opened this issue Jun 2, 2024 · 10 comments
Open
Labels
bug Something isn't working

Comments

@aminekhedim
Copy link

aminekhedim commented Jun 2, 2024

I want to generate output format grib2.I change NOGRB to NCEP2 in switch and compile the libraries zlib1.2.6 g2lib-3.1.0 jasper-1.900.1 l ibpng-1.2.34 and w3lib-2.0.6 and add the path libs=" -L/home/user/libs/lib -L/home/user/g2lib.3.1.0 -lg2 -lw3 -ljasper -lpng " in the link but when i try to compile the model which NCEP2 he have error ww3_grib.o not found, i don t know how fix this error

mv: impossible d'évaluer 'ww3_grib.o': Aucun fichier ou dossier de ce type
Linking ww3_grib
*** file ww3_grib.o not found ***
*** Missing object files ***
make: *** [makefile:358 : /home/amine/WW3-6.07.1/model/exe/ww3_grib] Erreur 3

@aminekhedim aminekhedim added the bug Something isn't working label Jun 2, 2024
@JessicaMeixner-NOAA
Copy link
Collaborator

It's admittedly been a while since I've run the 6.07 release, but usually it's because you don't have environment variables set right. For example if I was using the link file here: https://github.com/NOAA-EMC/WW3/blob/main/model/bin/link.wcoss_phase2#L143-L149

After loading my modules I would do:
echo ${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB}"

and make sure each of these variables are defined.

@aminekhedim
Copy link
Author

I have all the libraries in a single directory called libs. Do I just declarein link libs=‘$libs’ or do I declare all the paths with the *.a in path ? can i have a exemple of declaration

@aminekhedim
Copy link
Author

i tried use load each libraries using libs="${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB}" in file of link but doesn t wok
i install all libraries in /NCEPLIBS/libs
amine@khedim-ThinkStation-P500:
/NCEPLIBS/lib$ lls
total 23556
-rw-r--r-- 1 amine amine 150446 juin 5 14:30 libz.a
-rwxr-xr-x 1 amine amine 126232 juin 5 14:30 libz.so.1.2.13
lrwxrwxrwx 1 amine amine 14 juin 5 14:30 libz.so.1 -> libz.so.1.2.13
lrwxrwxrwx 1 amine amine 14 juin 5 14:30 libz.so -> libz.so.1.2.13
-rwxr-xr-x 1 amine amine 775352 juin 5 14:32 libpng12.so.0.34.0
lrwxrwxrwx 1 amine amine 18 juin 5 14:32 libpng12.so.0 -> libpng12.so.0.34.0
lrwxrwxrwx 1 amine amine 18 juin 5 14:32 libpng12.so -> libpng12.so.0.34.0
-rwxr-xr-x 1 amine amine 966 juin 5 14:32 libpng12.la
-rw-r--r-- 1 amine amine 1456748 juin 5 14:32 libpng12.a
-rwxr-xr-x 1 amine amine 788504 juin 5 14:32 libpng.so.3.34.0
lrwxrwxrwx 1 amine amine 16 juin 5 14:32 libpng.so.3 -> libpng.so.3.34.0
lrwxrwxrwx 1 amine amine 11 juin 5 14:32 libpng.la -> libpng12.la
lrwxrwxrwx 1 amine amine 10 juin 5 14:32 libpng.a -> libpng12.a
lrwxrwxrwx 1 amine amine 11 juin 5 14:32 libpng.so -> libpng12.so
-rw-r--r-- 1 amine amine 484760 juin 5 14:34 libjasper.so.4.0.0
drwxrwxr-x 2 amine amine 4096 juin 5 14:34 pkgconfig
lrwxrwxrwx 1 amine amine 18 juin 5 14:34 libjasper.so.4 -> libjasper.so.4.0.0
lrwxrwxrwx 1 amine amine 14 juin 5 14:34 libjasper.so -> libjasper.so.4
-rw-r--r-- 1 amine amine 116224 juin 5 14:36 libbacio.a
-rw-r--r-- 1 amine amine 2387762 juin 5 14:54 libbufr_4.a
-rw-r--r-- 1 amine amine 3462538 juin 5 14:57 libw3emc_d.a
-rw-r--r-- 1 amine amine 3438778 juin 5 14:57 libw3emc_4.a
-rw-r--r-- 1 amine amine 1312444 juin 5 15:02 libg2_d.a
-rw-r--r-- 1 amine amine 1308556 juin 5 15:02 libg2_4.a
-rw-r--r-- 1 amine amine 2725466 juin 5 15:20 libw3nco_d.a
-rw-r--r-- 1 amine amine 2811322 juin 5 15:20 libw3nco_8.a
-rw-r--r-- 1 amine amine 2732746 juin 5 15:20 libw3nco_4.a
drwxrwxr-x 7 amine amine 4096 juin 5 15:21 cmake
i does nt know how export all library in link

@JessicaMeixner-NOAA
Copy link
Collaborator

Have you tried using CMAKE in the develop branch instead of the older release?

@aminekhedim
Copy link
Author

no i just use current version cmake (of system ubuntu 20.04) to install all libraries

@JessicaMeixner-NOAA
Copy link
Collaborator

You might try that to see if you have better luck, with the WW3 CMAKE build finding the other libraries you've installed.

@aminekhedim
Copy link
Author

can you send me link for cmake inthe branch develop because I didn t find it

@MatthewMasarik-NOAA
Copy link
Collaborator

Hi @Tobyoo, the newest version of WW3, which uses cmake for building, can be downloaded like this:

git clone https://github.com/NOAA-EMC/WW3

Here is a link to the full cmake WW3 build documentation. Within that there is a Quick Start guide. Please try following that guide to clone and build the WW3 executables, and let me know if you are successful.

@aminekhedim
Copy link
Author

i m sourced all libraries in bashrc and then I change NOGRB of switch_ifremer1 to NCEP2 hen when I execute command cmake .. -DSWITCH=$HOME/NCEPLIBS/WW3/model/bin/switch_Ifremer1 -DCMAKE=$HOME/ww3_latest -DNETCDF=ON I have his error
-- Build with switch: /home/amine/NCEPLIBS/WW3/model/bin/switch_Ifremer1
-- Found NetCDF: /home/amine/libs/include (found version "4.1.2") found components: Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.1.2]
-- - NetCDF_PARALLEL [FALSE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/home/amine/libs/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /home/amine/libs] Lib: /home/amine/libs/lib/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [NetCDF_Fortran_CONFIG_EXECUTABLE-NOTFOUND]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /home/amine/libs] Lib: /home/amine/libs/lib/libnetcdff.so
-- Found g2: /home/amine/NCEPLIBS/lib/libg2_4.a (found version "3.5.0")
-- Found bacio: /home/amine/NCEPLIBS/lib/libbacio.a (found version "2.6.0")
-- Found bacio: /home/amine/NCEPLIBS/lib/libbacio.a (found version "2.6.0")
-- Found w3emc: /home/amine/NCEPLIBS/lib/libw3emc_4.a (found version "2.11.0")
-- Copying switch.io to /home/amine/NCEPLIBS/WW3/build/regtests/unittests
-- Copying ww3_grid.inp to /home/amine/NCEPLIBS/WW3/build/regtests/unittests/ww3_grid.inp
-- Configuring done
CMake Error at model/src/CMakeLists.txt:201 (add_executable):
Target "ww3_grib" links to target "bacio::bacio_4" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
REMARK"when I install bacio library it generate just libbacio.a not like g2lib and w3emc generate libw3emc_4.a libw3emc_d.a libg2_4.a libg2_d.a"

@MatthewMasarik-NOAA
Copy link
Collaborator

I would suggest looking into whether or not the bacio library is loaded correctly. If dependencies are not satisfied, cmake will not have what it needs to complete the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants