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

add new awiesm version awiesm-2.6 for fesom-2.6 #1235

Merged
merged 9 commits into from
Nov 8, 2024
Merged

Conversation

ackerlar
Copy link
Collaborator

I named the new awiesm version now "AWIESM-2.6" as a lot of development happened since awiesm-2.1 and all features are now included in one common version: wiso, icebergs, ice sheet coupling, cavities, recom, tracer

I tested for icebergs and cavities. Please check if anything needs to be added for other features.

@ackerlar ackerlar self-assigned this Oct 21, 2024
@ackerlar ackerlar marked this pull request as draft October 21, 2024 13:12
@ackerlar ackerlar marked this pull request as ready for review October 21, 2024 13:33
@ackerlar ackerlar requested a review from mandresm October 22, 2024 06:53
Copy link
Member

@pgierz pgierz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from the esm-tools side. @ackerlar, if you want, I can produce a few benchmarked examples on Albedo and Levante together with run configurations to give to new users.

@@ -27,7 +27,7 @@ def prepare_environment(config):
"MACHINE": config["computer"]["name"],
"MESH_PATH_FESOM": config["fesom"]["mesh_dir"],
"HOSING_FILE_LANDICE_LOSS": config["fesom"].get("fwf_path", config["general"]["experiment_couple_dir"]),
"HOSING_CORRECTION": config["echam"].get("hosing_correction", 0), # LA: Not needed anymore with Lu's ECHAM gfw fix
"HOSING_CORRECTION": int(config["echam"].get("hosing_correction", False)), # LA: Not needed anymore with Lu's ECHAM gfw fix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the gfw fix? Just out of curiosity...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It`s the "gfw_to_ocean" implementation. But this global "hosing" is still necessary to account for the correct ocean salinity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to use the Click library for this one, that way we can integrate the functionality into the global command line interface. See the upcoming redesign in #1232

@ackerlar
Copy link
Collaborator Author

Looks good from the esm-tools side. @ackerlar, if you want, I can produce a few benchmarked examples on Albedo and Levante together with run configurations to give to new users.

Sounds great! Thank you!

@pgierz
Copy link
Member

pgierz commented Oct 25, 2024

Build fails for fesom-2.6 on albedo:

[ 98%] Linking Fortran shared library ../lib/libfesom.so
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_getput_interface.F90.o): relocation R_X86_64_32 against `__STRLITPACK_135' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_grid.F90.o): relocation R_X86_64_32 against `__STRLITPACK_166' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_io.F90.o): relocation R_X86_64_32 against `__STRLITPACK_1005' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_method.F90.o): relocation R_X86_64_32 against `__STRLITPACK_59' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_mpi.F90.o): relocation R_X86_64_32 against `__STRLITPACK_120' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_namcouple.F90.o): relocation R_X86_64_32 against `mod_oasis_namcouple_mp_prtout_$CLINE.0.7' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_part.F90.o): relocation R_X86_64_32 against `__STRLITPACK_45' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_string.F90.o): relocation R_X86_64_32 against `__STRLITPACK_274' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_sys.F90.o): relocation R_X86_64_32S against symbol `mod_oasis_sys_mp_unitno_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_timer.F90.o): relocation R_X86_64_32 against undefined symbol `mod_oasis_data_mp_mpi_comm_local_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_var.F90.o): relocation R_X86_64_32 against `__STRLITPACK_36' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_advance.F90.o): relocation R_X86_64_32 against `__STRLITPACK_657' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_coupler.F90.o): relocation R_X86_64_32 against `__STRLITPACK_624' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/libpsmile.a(mod_oasis_data.F90.o): relocation R_X86_64_32 against `__STRLITPACK_1' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_AttrVect.F90.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_AttrVectComms.F90.o): relocation R_X86_64_32 against `__STRLITPACK_6' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_GlobalMap.F90.o): relocation R_X86_64_32 against `__STRLITPACK_5' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_GlobalSegMap.F90.o): relocation R_X86_64_32 against `__STRLITPACK_18' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_MCTWorld.F90.o): relocation R_X86_64_32 against `__STRLITPACK_4' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_MatAttrVectMul.F90.o): relocation R_X86_64_32 against `__STRLITPACK_0' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_Rearranger.F90.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_Router.F90.o): relocation R_X86_64_32 against `__STRLITPACK_1' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_SparseMatrix.F90.o): relocation R_X86_64_32 against `__STRLITPACK_33' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_SparseMatrixPlus.F90.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_SparseMatrixToMaps.F90.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_Transfer.F90.o): relocation R_X86_64_32 against `__STRLITPACK_41.0.2' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_ExchangeMaps.F90.o): relocation R_X86_64_32 against `__STRLITPACK_4' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_GlobalToLocal.F90.o): relocation R_X86_64_32 against `__STRLITPACK_5' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_Navigator.F90.o): relocation R_X86_64_32 against `__STRLITPACK_7' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_SparseMatrixComms.F90.o): relocation R_X86_64_32 against `__STRLITPACK_4' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_SparseMatrixDecomp.F90.o): relocation R_X86_64_32 against `__STRLITPACK_2' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/libmct.a(m_ConvertMaps.F90.o): relocation R_X86_64_32 against undefined symbol `m_mctworld_mp_thismctworld_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_FcComms.F90.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_List.F90.o): relocation R_X86_64_32 against `__STRLITPACK_21' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_MergeSorts.F90.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_Permuter.F90.o): relocation R_X86_64_32 against `__STRLITPACK_31' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_String.F90.o): relocation R_X86_64_32 against `__STRLITPACK_43' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_TraceBack.F90.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_die.F90.o): relocation R_X86_64_32 against symbol `m_mpout_mp_mpout_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_dropdead.F90.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_flow.F90.o): relocation R_X86_64_32S against undefined symbol `m_flow_mp_tname_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_mall.F90.o): relocation R_X86_64_32S against undefined symbol `m_mall_mp_name__' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_mpif90.F90.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_mpout.F90.o): relocation R_X86_64_32 against symbol `m_mpout_mp_upfix_' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/mct/mpeu/libmpeu.a(m_ioutil.F90.o): relocation R_X86_64_32 against `__STRLITPACK_31' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(grids.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(scrip.F.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(timers.f.o): relocation R_X86_64_32 against `__STRLITPACK_17' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(fracnnei.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_bicubic.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_bicubic_reduced.F90.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_bilinear.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_bilinear_reduced.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_conserv.F.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_distwgt.F.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_gauswgt.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_vars.F.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(remap_write.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: /albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/model_codes/awiesm-2.6/oasis/build/lib/psmile/scrip/libscrip.a(netcdf.F.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: Nonrepresentable section on output
make[2]: *** [src/CMakeFiles/fesom.dir/build.make:1786: lib/libfesom.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:120: src/CMakeFiles/fesom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Traceback (most recent call last):
  File "/albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/.direnv/python-3.10.6/bin/esm_master", line 33, in <module>
    sys.exit(load_entry_point('esm-tools', 'console_scripts', 'esm_master')())
  File "/albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/esm_tools/src/esm_master/cli.py", line 103, in main
    main_flow(parsed_args, target)
  File "/albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/esm_tools/src/esm_master/esm_master.py", line 107, in main_flow
    user_task.execute(ignore_errors)  # env)
  File "/albedo/work/user/pgierz/SciComp/Projects/esm-tools-awiesm-2p6/esm_tools/src/esm_master/task.py", line 482, in execute
    subprocess.run(
  File "/albedo/soft/sw/spack-sw/mambaforge/22.9.0-2-Linux-x86_64-cchydqq/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./comp-fesom-2.6-paleodyn_script.sh']' returned non-zero exit status 2.

I'm looking into it.

@ackerlar
Copy link
Collaborator Author

Build fails for fesom-2.6 on albedo:

Does @JanStreffing has got similar issues?

@JanStreffing
Copy link
Contributor

Build fails for fesom-2.6 on albedo:

Does @JanStreffing has got similar issues?

Did not try building on albedo, sorry.

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 7, 2024

@pgierz Did you have a look at the compile issue on Albedo? I get the same error for AWI-ESM-2.6, but AWI-ESM-2.1 works fine

@pgierz
Copy link
Member

pgierz commented Nov 7, 2024

I haven't had time to look in detail yet. I guess the CMakeLists in FESOM changed quite extensively between the one for AWIESM 2.1 and AWIESM 2.6.

-fPIC seems to be a good hint from the linker, but I haven't seen where to do that yet.

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 7, 2024

I haven't had time to look in detail yet. I guess the CMakeLists in FESOM changed quite extensively between the one for AWIESM 2.1 and AWIESM 2.6.

-fPIC seems to be a good hint from the linker, but I haven't seen where to do that yet.

Do you maybe have an idea about this, @sebastianbeyer or @mandresm ?

@pgierz
Copy link
Member

pgierz commented Nov 7, 2024

Alright, I have a bad provisional solution:

In the main CMakeLists.txt of OASIS, under lib/psmile

 set(all_headers ${src_home}/include)

 if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
-       set(OASIS_FFLAGS -ansi_alias -fp-model precise -no-fast-transcendentals)
+       set(OASIS_FFLAGS -ansi-alias -fp-model precise -no-fast-transcendentals -fPIC)
 endif()
 # depends on the mct library

Rebuild oasis, then fesom. Linking works.

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 7, 2024

 -fPIC

I just checked the oasis3mct.env.yaml. Is there a particular reason why this flag is set for levante and juwels but not for albedo?

@sebastianbeyer
Copy link

Hey :) I do not completely understand what's going on here, but my guess would be that we changed the way we build fesom to use PIC and that requires that other libraries that are linked together now do also required PIC now (PIC shared libraries can only be created from PIC objects). I am not sure if FESOM was previously built without PIC...
Anyways, in practice it's almost always a good to build with -fPIC (for x86_64 the performance hit is basically nothing, for x86_32 it might or not might be 10%, but I guess no one uses x86_32 anyways ;) )
So, I guess the solution from @ackerlar is sound!

@pgierz
Copy link
Member

pgierz commented Nov 8, 2024

Is there a particular reason why this flag is set for levante and juwels but not for albedo?

No, I guess I forgot to initially include it. Go ahead and add it to this PR, that would mean that we don't need to modify OASIS directly in the source code, which I would be happy about

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 8, 2024

Is there a particular reason why this flag is set for levante and juwels but not for albedo?

No, I guess I forgot to initially include it. Go ahead and add it to this PR, that would mean that we don't need to modify OASIS directly in the source code, which I would be happy about

As I understand, the OASIS_FFLAGS are overwritten in the CMakeLists when using an Intel compiler so it does not make any difference if the glafs are changed with the esm_tools

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 8, 2024

Is there a particular reason why this flag is set for levante and juwels but not for albedo?

No, I guess I forgot to initially include it. Go ahead and add it to this PR, that would mean that we don't need to modify OASIS directly in the source code, which I would be happy about

As I understand, the OASIS_FFLAGS are overwritten in the CMakeLists when using an Intel compiler so it does not make any difference if the glafs are changed with the esm_tools

I created a PR in the oasis repository now

@ackerlar
Copy link
Collaborator Author

ackerlar commented Nov 8, 2024

Is there a particular reason why this flag is set for levante and juwels but not for albedo?

No, I guess I forgot to initially include it. Go ahead and add it to this PR, that would mean that we don't need to modify OASIS directly in the source code, which I would be happy about

As I understand, the OASIS_FFLAGS are overwritten in the CMakeLists when using an Intel compiler so it does not make any difference if the glafs are changed with the esm_tools

I created a PR in the oasis repository now

Works now for me with the updated oasis version

Copy link
Contributor

@mandresm mandresm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, differences in the tests are the expected ones.

#bump

@mandresm
Copy link
Contributor

mandresm commented Nov 8, 2024

I said #bump !

@mandresm
Copy link
Contributor

mandresm commented Nov 8, 2024

#approve-changes

@mandresm mandresm merged commit 828b398 into release Nov 8, 2024
@mandresm mandresm deleted the feat/paleo_fesom26 branch November 9, 2024 06:52
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 this pull request may close these issues.

5 participants