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

Recomp problem #1248

Closed
hajlaci opened this issue Dec 4, 2024 · 9 comments · Fixed by #1254
Closed

Recomp problem #1248

hajlaci opened this issue Dec 4, 2024 · 9 comments · Fixed by #1254

Comments

@hajlaci
Copy link

hajlaci commented Dec 4, 2024

esm_master recomp-awiesm3-v3.4/lpj_guess
    Executing commands in this order:
         mkdir -p awiesm3-v3.4
         cd awiesm3-v3.4
         sed -i 's/xios-2.5+/xios/g' oifs-48r1/bundle.yml
         sed -i 's/oasis3-mct-5.2/oasis/g' oifs-48r1/bundle.yml
         cd lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/
         rm -rf build
         cd ..
         rm -f ./bin/guess
         cd lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/
         mkdir -p /work/ab0995/a270270/model_codes/awiesm3-v3.4/lpj-guess/sources/LPJ-GUESS-lpjg_v4p1//build; cd /work/ab0995/a270270/model_codes/awiesm3-v3.4/lpj-guess/sources/LPJ-GUESS-lpjg_v4p1//build; cmake .. -DOASIS=ON; make -j8
         cd ..
         mkdir -p ./bin
         cp  lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/build/guess  bin
         cd ..
cp: cannot stat '../comp-lpj_guess-4.1.2_script.sh': No such file or directory

This part of the code is problem since it uses cd .. but actually it should use cd -

cd lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/
rm -rf build
cd ..

The used branch is feat/awiesm3-v3.4

@mandresm
Copy link
Contributor

mandresm commented Dec 4, 2024

I think this is wrong:

comp_command: "mkdir -p ${model_dir}/build; cd ${model_dir}/build; cmake ..; make -j8"

It should be comp_command: "mkdir -p build; cd build; cmake ..; make -j8"

comp_command behaves differently whether it is a standalone compilation or coupled compilation and it should all be done automatically under the hood.

Let me know if that works.

@hajlaci
Copy link
Author

hajlaci commented Dec 4, 2024

No it didn't. Same problem:

Executing commands in this order:
mkdir -p awiesm3-v3.4
cd awiesm3-v3.4
sed -i 's/xios-2.5+/xios/g' oifs-48r1/bundle.yml
sed -i 's/oasis3-mct-5.2/oasis/g' oifs-48r1/bundle.yml
cd lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/
rm -rf build
cd ..
rm -f ./bin/guess_T159
cd lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/
mkdir -p /work/ab0995/a270270/model_codes/awiesm3-v3.4/lpj-guess/sources/LPJ-GUESS-lpjg_v4p1//build; cd /work/ab0995/a270270/model_codes/awiesm3-v3.4/lpj-guess/sources/LPJ-GUESS-lpjg_v4p1//build; cmake .. -DOASIS=ON; make -j8
cd ..
mkdir -p ./bin
cp lpj-guess/sources/LPJ-GUESS-lpjg_v4p1/build/guess_T159 bin
cd ..
cp: cannot stat '../comp-lpj_guess-4.1.2_script.sh': No such file or directory

@mandresm
Copy link
Contributor

mandresm commented Dec 4, 2024

Hi @hajlaci, I made a fix for esm_master. It should start working now as you intended to use it. I have pushed directly to the branch feat/awiesm3-v3.4. Please, let me know if that solves the problem :)

@hajlaci
Copy link
Author

hajlaci commented Dec 4, 2024

Yes it's working! Thank's a lot!

@hajlaci hajlaci closed this as completed Dec 4, 2024
@mandresm
Copy link
Contributor

mandresm commented Dec 5, 2024

You are welcome! :)

@mandresm
Copy link
Contributor

mandresm commented Dec 5, 2024

I've pushed and even better solution, basically doing what you suggested at the beginning, using cd -. Originally, I thought that would break other parts of the code, but after looking at it more carefully, that solution won't break anything, and it is less error prone than the one I've implemented originally yesterday.

Feel free to pull again in the branch, and let me know if the new commit breaks anything for you.

@mandresm mandresm reopened this Dec 11, 2024
@mandresm
Copy link
Contributor

Hi @hajlaci, I made a mistake on the bugfix so I am reopening the issue

@mandresm
Copy link
Contributor

Hi @hajlaci! Please update now with release. I fixed a bug there.

@hajlaci
Copy link
Author

hajlaci commented Dec 12, 2024

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants