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

THRCOU parameter is not correctly set for GQM implementation in w3snl1md #1126

Closed
mickaelaccensi opened this issue Nov 21, 2023 · 1 comment · Fixed by #1127
Closed

THRCOU parameter is not correctly set for GQM implementation in w3snl1md #1126

mickaelaccensi opened this issue Nov 21, 2023 · 1 comment · Fixed by #1127
Assignees
Labels
bug Something isn't working

Comments

@mickaelaccensi
Copy link
Collaborator

Describe the bug
changing the valeur of GQMTHRCOU has no effect with intel compiler with optimized option but it works in debug option or with gnu compiler

To Reproduce
./bin/run_cmake_test -f -N -S -T -w work_ST4_T707GQM -g ST4_T707 -i input_10ms -N ../model ww3_ts1

Expected behavior
it should run in 2s instead of 10s

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
replacing the code :

      DO JT1=1,GQNT1
        DO IQ_OM2=1,GQNQ_OM2
          AAA=TB_FAC(IQ_OM2,JT1,JF1)*TB_TPM(IQ_OM2,JT1,JF1)
          IF (AAA.GT.AUX) AUX=AAA
          CCC=TB_FAC(IQ_OM2,JT1,JF1)*TB_TMP(IQ_OM2,JT1,JF1)
          IF (CCC.GT.AUX) AUX=CCC
        ENDDO
      ENDDO

by :

      DO JT1=1,GQNT1
        DO IQ_OM2=1,GQNQ_OM2
          AUX=MAX(AUX,TB_FAC(IQ_OM2,JT1,JF1)*TB_TPM(IQ_OM2,JT1,JF1),TB_FAC(IQ_OM2,JT1,JF1)*TB_TMP(IQ_OM2,JT1,JF1))
        ENDDO
      ENDDO

Running with ddt software clearly show that intel has not optimized correctly the do loop and never goes in the if loops except if I add a print statement before to force intel to not optimize the do loop

@mickaelaccensi mickaelaccensi added the bug Something isn't working label Nov 21, 2023
@mickaelaccensi mickaelaccensi self-assigned this Nov 21, 2023
@mickaelaccensi mickaelaccensi mentioned this issue Nov 21, 2023
4 tasks
@ukmo-ccbunney
Copy link
Collaborator

Nice debugging skills on this one @mickaelaccensi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants