= Error related to netcdf/4 in my Script file = Author: S. Luyssaert [[BR]] Last revision: S. Luyssaert (2020/02/28) [[BR]] == Objective == This item should help to: (1) distinguish a real ERROR from a harmless bug in libIGCM. == Harmless bug in libIGCM Script == When completed LibIGCM writes a Script to the folder from where you launched the job. Should I always believe the LibIGCM Script-files? Probably you should but sometimes you have to look beyond the first error message. In December 2016 several users setting-up a clean installation where surprised to see their clean installation crash in LibIGCM and to find the following error message in the Script-file {{{ netcdf/4(10):ERROR:150: Module 'netcdf/4' conflicts with the currently loaded module(s) 'netcdf/4p' netcdf/4(10):ERROR:102: Tcl command execution failed: conflict netcdf/4p }}} If this is the only error-message in the script-file then the solution may indeed be described in the section 'Why would I want to install another netcdf library?'. Nevertheless, before jumping to this conclusion, have a closer look at the script-file. In December 2016, this netcdf problem reported in the script-file could not be confirmed for Obelix. The problem was caused by the users trying to use IOIPSL rather than the now default XIOS system and LibIGCM correctly reported on the issue in the script-file. {{{ IGCM_debug_Exit : IGCM_comp_Update missing executable xios_server.exe }}} Given that the need to use IOIPSL rather than XIOS is typical for older branches, the correct settings are included in the item 'How to download and compile ORCHIDEE-DOFOCO?'. == Why would I want to install another netcdf library? == You don't want to install another netcdf library. In general all is taken care of by the TCCG and the libIGCM team. Nevertheless, there was a netcdf-related problem in March 2015 and this was the procedure to load a different netcdf library, use it for the compilation and use it for running the model. Check which modules are loaded {{{ module list }}} Unload the module you no longer want to use, i.e., netcdf/4.2_hdf5_parallel. Note that there could be dependencies between modules. If so, unload whatever needs to be unloaded. {{{ module unload netcdf/4.2_hdf5_parallel (NetCDF) }}} and load the new module {{{ module load netcdf/4.3.3.1_hdf5_parallel }}} Check if the new module was loaded {{{ module list }}} Check for the library paths in the module {{{ module show netcdf/4.3.3.1_hdf5_parallel }}} for this example you will get the follow output {{{ ... setenv NETCDF_ROOT /usr/local/netcdf-4.3.3.1_hdf5_parallel setenv NETCDF_EXEDIR /usr/local/netcdf-4.3.3.1_hdf5_parallel/bin setenv NETCDF_INCDIR /usr/local/netcdf-4.3.3.1_hdf5_parallel/include setenv NETCDF_LIBDIR /usr/local/netcdf-4.3.3.1_hdf5_parallel/lib ... }}} Make sure that these paths are used in {{{ ../../modeles/IOIPSL/src/Makefile ../../modeles/ORCHIDEE/arch.path ../../modeles/LMDZ/arch.path ../../modeles/XIOS/arch/arch-X64_CURIE.path }}} When you change from library 4.2 to 4.3.3.1 you will have to change NETCDF_INC_DIR to NETCDF_INCDIR and NETCDF_LIB_DIR to NETCDF_LIBDIR in files above. Make sure that the correct modules are loaded in XIOS .env file : (you can empty this file as you already loaded the netcdf and hdf5): {{{ ../../modeles/XIOS/arch/arch-X64_CURIE.env }}} After doing so do a make clean and compile (it worked for me with fcm). If you want that these changes are permanent, remember to also change the paths in the AA_make file, that way the new path will be used when doing an ins_make. Now the model is compiled with the new libraries but the libIGCM is not aware of that, so you will have to make some changes to libIGCM as well. {{{ emacs ../../../libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh & }}} Add the module load and unload statements as follows. If this should become a lasting change you will have to change the modules in /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ks rather than in libIGCM_sys_curie.ksh {{{ #==================================================== # Set environment tools (ferret, nco, cdo) #==================================================== if [ X${TaskType} = Xcomputing ] ; then . /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ksh > /dev/null 2>&1 # to run with netcdf 3.6.3 ie compilation done before 17/2/2014 # uncomment 2 lines : # module unload netcdf # module load netcdf/3.6.3 module unload nco/4.1.0 module unload netcdf/4.2_hdf5_parallel module load netcdf/4.3.3.1_hdf5_parallel module list export PATH=${PATH}:/ccc/cont003/home/dsm/p86ipsl/AddNoise/src_X64_CURIE/bin export PATH=${PATH}:/ccc/cont003/home/dsm/p86ipsl/AddPerturbation/src_X64_CURIE/bin else . /ccc/cont003/home/dsm/p86ipsl/.atlas_env_netcdf4_curie_ksh > /dev/null 2>&1 PCMDI_MP=/ccc/work/cont003/dsm/p86ipsl/PCMDI-MP fi }}} Use libIGCM to launch the model, you can check the Script-file to see whether the modules were indeed loaded.