3
$\begingroup$

I need to install ESMF-5.2.0rp3 version. I have downloaded it from https://github.com/esmf-org/esmf/releases/tag/ESMF_5_2_0rp3. Also I installed the following prerequisites: Fortran95, GCC & C++ 7.5.0, netcdf-bin, libnetcdf-dev, libnetcdff-dev, Open MPI 3.1.1, LAPACK 3.9.0, Perl v5.26.1 and GNU Make 4.1.

Building of ESMF using make all failing and shows the following error in terminal

/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:31: error: no match for ‘operator==’ (operand types are ‘std::fstream {aka std::basic_fstream<char>}’ and ‘long int’)
  if ((fin == NULL)  ||  (fout == NULL))
                               ^

The output of make all is large so I can't paste it here. Finally the building interrupted by showing the following last lines

/usr/include/c++/7/bits/stl_iterator.h:302:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Util.h:25,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_LogErr.h:34,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/include/ESMCI_Comp.h:33,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/../include/ESMCI_WebServNetEsmfServer.h:23,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:28:
/usr/include/c++/7/bits/stl_pair.h:448:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:448:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/rpc/netdb.h:42:0,
                 from /usr/include/netdb.h:32,
                 from /home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:31:
/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src/ESMCI_WebServNetEsmfServer.C:1798:34: note:   ‘std::fstream {aka std::basic_fstream<char>}’ is not derived from ‘const std::pair<_T1, _T2>’
  if ((fin == NULL)  ||  (fout == NULL))
                                  ^
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2994: recipe for target '/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o' failed
make[8]: *** [/home/user/esmf-ESMF_5_2_0rp3/obj/objO/Linux.gfortran.64.openmpi.default/ESMCI_WebServNetEsmfServer.o] Error 1
make[8]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1528: recipe for target 'esmflib' failed
make[7]: *** [esmflib] Error 2
make[7]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/mod/modO/Linux.gfortran.64.openmpi.default'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1524: recipe for target 'tree_lib' failed
make[6]: *** [tree_lib] Error 2
make[6]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[5]: *** [tree] Error 1
make[5]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure/WebServices'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[4]: *** [tree] Error 1
make[4]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src/Superstructure'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[3]: *** [tree] Error 1
make[3]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3/src'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:2922: recipe for target 'tree' failed
make[2]: *** [tree] Error 1
make[2]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1501: recipe for target 'build_libs' failed
make[1]: *** [build_libs] Error 2
make[1]: Leaving directory '/home/user/esmf-ESMF_5_2_0rp3'
/home/user/esmf-ESMF_5_2_0rp3/build/common.mk:1494: recipe for target 'lib' failed
make: *** [lib] Error 2

Where is my mistake? Am I missing anything in the building procedure? I have also tried to install ESMF using GCC&G++-8.1.0, but the same error came up. If somebody reccomend a solution for this problem it will be a great help. Thanks in advance.

$\endgroup$
2
  • $\begingroup$ Not a solution, but (1) Why are you using such an archaic version of a software library that appears to be well-maintained to this very date? The version you are using is from 2012; this is 2021. (2) Why are you using a nonstandard version of a software library? The rp3 suffix strongly suggests that this is something you should not be using. (3) Since that release was made in 2012, are you using an equally archaic version of C++ that is compatible with that archaic release? (4) Did you thoroughly read the build instructions for that release, including compiler version and compiler flags? $\endgroup$ Commented Mar 26, 2021 at 7:28
  • $\begingroup$ @DavidHammen I am working with a ocean model and in the model document they have mentioned that the model code is tested and verified with ESMF-5.2.0rp3. That's the reason for using this specific version. However, is there any chance to work the model codes with the newer ESMF? What is rp3 and why it is unstable? Now I understand that my issue was due to the C++ version and I'll try installing older C++ version. Thank you very much for the advice. $\endgroup$
    – AKASH
    Commented Mar 26, 2021 at 8:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.