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

compilation error of awiesm-2.6-recom #1295

Open
a270105 opened this issue Feb 7, 2025 · 2 comments
Open

compilation error of awiesm-2.6-recom #1295

a270105 opened this issue Feb 7, 2025 · 2 comments

Comments

@a270105
Copy link
Collaborator

a270105 commented Feb 7, 2025

I got during compilation of awiesm-2.6-recom these warnings and errors:

/work/ab0995/a270105/esm_code/awiesm-2.6-recom/fesom-2.6/src/associate_part_def.h(1): warning #5117: Bad # preprocessor line
#if defined(__recom) && defined(__usetp)
-^
/work/ab0995/a270105/esm_code/awiesm-2.6-recom/fesom-2.6/src/associate_part_ass.h(1): warning #5117: Bad # preprocessor line
#if defined(__recom) && defined(__usetp)
-^
`/work/ab0995/a270105/esm_code/awiesm-2.6-recom/fesom-2.6/src/associate_part_ass.h(2): error #6460: This is not a component name that is defined in the encompassing structure.   [MPI_COMM_FESOM_WORLD]
MPI_COMM_FESOM_WORLD                => partit%MPI_COMM_FESOM_WORLD
----------------------------------------------^
/work/ab0995/a270105/esm_code/awiesm-2.6-recom/fesom-2.6/src/associate_part_ass.h(2): error #6795: The target must be of the same type and kind type parameters as the pointer.   [MPI_COMM_FESOM_WORLD]
MPI_COMM_FESOM_WORLD                => partit%MPI_COMM_FESOM_WORLD
^

MPI_COMM_FESOM_WORLD should be defined as pointer under this condition #if defined(__recom) && defined(__usetp). But by default __usetp is not defined and MPI_COMM_FESOM_WORLD should be not defined or used at all. I can compile and run the model on albedo as ocean-only. Are there issues with directives in fesom-2.6 reported? Shall I try with another compiler? I am using a branch 'awiesm-2.6-recom' which I created from the release version of esm-tools.

@a270105 a270105 changed the title compilation of awiesm-2.6-recom compilation error of awiesm-2.6-recom Feb 7, 2025
@mandresm
Copy link
Contributor

Hi @a270105,

This doesn't seem like an ESM-Tools issue to me as it is failing in compilation and the question is probably more for FESOM developers. But maybe @ackerlar has a better idea of what's going on.

@ackerlar
Copy link
Collaborator

Related to FESOM/fesom2#681 (comment)

One solution recommended was to check if the variable is already allocated:

if (allocated(partit%remPtr_nod2D)) then
   remPtr_nod2D  (1:npes)                => partit%remPtr_nod2D(:)
end if

but this is a FESOM issue to solve. Maybe one could switch to another compiler but maybe these errors are there for a reason? And we could try to come up with FESOM code that is suitable for any compiler?

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

No branches or pull requests

3 participants