esm-tools / esm_tools

Simple Infrastructure for Earth System Simulations
https://esm-tools.github.io/
GNU General Public License v2.0
25 stars 12 forks source link

DSO missing from command line #698

Closed chrisdane closed 1 year ago

chrisdane commented 2 years ago

Hi

Describe the bug I am trying to install the setup awicm-1.0-recom on levante. Installing the echam component stops with this error:

esm_master comp-awicm-1.0-recom
...
support/libsupport.a(util_file.c.o): In function `util_tmpnam':
util_file.c:(.text+0xa8): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ld: cdi/libcdi.a(pio_posixasynch.c.o): undefined reference to symbol 'aio_write@@GLIBC_2.2.5'
//usr/lib64/librt.so.1: error adding symbols: DSO missing from command line
make[2]: *** [src/echam/CMakeFiles/echam6.dir/build.make:5355: src/echam/echam6] Error 1
make[1]: *** [CMakeFiles/Makefile2:226: src/echam/CMakeFiles/echam6.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

To Reproduce

esm_master comp-awicm-1.0-recom

Expected behavior Successful compile.

System (please complete the following information):

Thanks! Chris

denizural commented 2 years ago

Hi @chrisdane , I solved that problem. This requires a change in the awicm CMake file. We are currently on the Climate Dynamics retreat but I will show you the solution when I have a stable internet.

pgierz commented 2 years ago

I'm not sure if recom support on levante is in release yet. Deniz can you check and please put that in very soon if not?

pgierz commented 2 years ago

@chrisdane if you have a small script who spits out your branch, hash, etc info I would be very interested in recycling this.

mandresm commented 2 years ago

No is not released yet, @denizural is taking care of it, but there is no PR yet. Neither is AWICM-REcoM in release (not supported in release for any of the HPCs).

chrisdane commented 2 years ago

Eeh sorry I should have added this: the error occurs in the echam compiling step, so independent on recom? But if Deniz already has a solution its ok anyway.

@pgierz:

    esm_tools_info() {
        if command -v esm_tools > /dev/null 2>&1; then
            #echo "run 'esm_tools --version' ..."
            esm_tools_version=$(esm_tools --version) # e.g. "esm_tools, 6.1.3"
            esm_master_bin=$(which esm_master) # e.g. ~/.local/bin/esm_master
            esm_master_py_bin=$(head -1 $esm_master_bin) # "#!/path"
            esm_master_py_bin=${esm_master_py_bin:2} # "/path"
            esm_tools_src_path=$($esm_master_py_bin -c "import site; print(site.getusersitepackages())") # e.g. ~/.local/lib/python3.8/site-packages
            esm_tools_src_path=$(head -1 $esm_tools_src_path/esm-tools.egg-link) # /path/to/esm_tools/src/
            esm_tools_src_path=$(dirname $esm_tools_src_path) # without /src
            owd=$(pwd); cd $esm_tools_src_path
            esm_tools_src_path=$(pwd) # normalize path; better than readlink -f
            esm_tools_branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
            esm_tools_hash=$(git rev-parse --short HEAD)
            cd $owd
            echo "version = $esm_tools_version"
            echo "branch  = $esm_tools_branch"
            echo "hash    = $esm_tools_hash"
            echo "src     = $esm_tools_src_path"
        else
            echo "could not find esm-tools"
            return 1
        fi
    } # esm_tools_info
pgierz commented 2 years ago

Thanks. It's shell. Merp.

Which echam are you using? We will have some time this evening to get back to you

chrisdane commented 2 years ago

Thanks. It's shell. Merp.

If the esm_tools are not shipped with a needed functionality the users need to help themselves :P

Which echam are you using?

co2_coupling

pgierz commented 2 years ago

If the esm_tools are not shipped with a needed functionality the users need to help themselves :P

Already in progress ;-) https://github.com/esm-tools/esm_tools/pull/690

pgierz commented 2 years ago

co2_coupling

Which remote host is that? There are some changes required to the compilation of ECHAM, and that needs to happen on the ECHAM side, not the esm-tools side.

chrisdane commented 2 years ago

Dont know if this answers your question: https://gitlab.dkrz.de/modular_esm/echam6/-/commits/co2_coupling

chrisdane commented 2 years ago

Aaaaaah sorry my mistake: I should have just cherry picked 2334507d into my echam branch facepalm

denizural commented 2 years ago

I am reopening this issue again. The fixes to corresponding ECHAM, FESOM, Recom branches are implemented. I will make a PR on the DKRZ GitLab from my forks. The issue will be closed after esm_master successfully installs everything (currently does on my branch) in the release branch. All related PRs will be mentioned here.

github-actions[bot] commented 1 year ago

This issue has been inactive for the last 365 days. It will now be marked as stale and closed after 30 days of further inactivity. Please add a comment to reset this automatic closing of this issue or close it if solved.

pgierz commented 1 year ago

Closing, this is no longer relevant. I was just able to run on levante with no compile-time issues:

$ esm_master install-awicm-1.0-recom