Closed amstokely closed 1 month ago
@amstokely , I sourced gnu-derecho.csh
before compile. I compiled bufr
library successfully, but got failure when compile obs2ioda
:
obs2ioda_20241001/build> make
Scanning dependencies of target v2
[ 6%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/kinds.f90.o
[ 13%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/ufo_variables_mod.F90.o
[ 20%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o
f951: Fatal Error: Reading module '/glade/work/jban/pandac/obs2ioda_20241001/obs2ioda/obs2ioda-v2/src/kinds.mod' at line 1 column 2: Unexpected EOF
compilation terminated.
make[2]: *** [obs2ioda-v2/CMakeFiles/v2.dir/build.make:75: obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: obs2ioda-v2/CMakeFiles/v2.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I must miss something. Do you have any idea? Many thanks (my build dir: /glade/work/jban/pandac/obs2ioda_20241001/build)
@amstokely , I sourced
gnu-derecho.csh
before compile. I compiledbufr
library successfully, but got failure when compileobs2ioda
:obs2ioda_20241001/build> make Scanning dependencies of target v2 [ 6%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/kinds.f90.o [ 13%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/ufo_variables_mod.F90.o [ 20%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o f951: Fatal Error: Reading module '/glade/work/jban/pandac/obs2ioda_20241001/obs2ioda/obs2ioda-v2/src/kinds.mod' at line 1 column 2: Unexpected EOF compilation terminated. make[2]: *** [obs2ioda-v2/CMakeFiles/v2.dir/build.make:75: obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:100: obs2ioda-v2/CMakeFiles/v2.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
I must miss something. Do you have any idea? Many thanks (my build dir: /glade/work/jban/pandac/obs2ioda_20241001/build)
Could rebuild with -DCMAKE_VERBOSE_MAKEFILE and send me the cmake and make output?
@amstokely , I sourced
gnu-derecho.csh
before compile. I compiledbufr
library successfully, but got failure when compileobs2ioda
:obs2ioda_20241001/build> make Scanning dependencies of target v2 [ 6%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/kinds.f90.o [ 13%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/ufo_variables_mod.F90.o [ 20%] Building Fortran object obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o f951: Fatal Error: Reading module '/glade/work/jban/pandac/obs2ioda_20241001/obs2ioda/obs2ioda-v2/src/kinds.mod' at line 1 column 2: Unexpected EOF compilation terminated. make[2]: *** [obs2ioda-v2/CMakeFiles/v2.dir/build.make:75: obs2ioda-v2/CMakeFiles/v2.dir/src/define_mod.f90.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:100: obs2ioda-v2/CMakeFiles/v2.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
I must miss something. Do you have any idea? Many thanks (my build dir: /glade/work/jban/pandac/obs2ioda_20241001/build)
@junmeiban 27f887f5Should fix this problem!
@amstokely It works. Thank you so much!
TYPE: enhancement
KEYWORDS: cmake, build system, compiler compatibility
DESCRIPTION OF CHANGES:
Problem:
The
obs2ioda-v2
library lacked support for CMake-based builds, which complicated the build process across different platforms and made compiler compatibility (GNU and Intel) more difficult to manage.Solution:
obs2ioda-v2
using CMake, leveraging the modern build system to streamline cross-platform integration.obs2ioda-v2
README with instructions on how to build the library using CMake and provided additional guidance for building the NCEP BUFR library.hsd.f90
to ensureobs2ioda-v2
compiles successfully on both GNU and Intel compilers.These changes improve the ease of configuration and build process, while maintaining compatibility with multiple compilers.