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

cce noah_hydro #599

Closed
hkershaw-brown opened this issue Dec 11, 2023 · 3 comments
Closed

cce noah_hydro #599

hkershaw-brown opened this issue Dec 11, 2023 · 3 comments
Assignees
Labels
Derecho issues related to running on NCAR's new supercomputer

Comments

@hkershaw-brown
Copy link
Member

hkershaw-brown commented Dec 11, 2023

cce complaining about noad_hydro_mod. Not sure if this is a code error or the compiler falling over.

ftn -O2  -I/glade/u/apps/derecho/23.06/spack/opt/spack/netcdf/4.9.2/cce/15.0.1/cuko/include  -c	/glade/derecho/scratch/hkershaw/build_everything/DART.cce/models/wrf_hydro/noah_hydro_mod.f90
   Error message      ::  _expr_type: Invalid table type
   Error detected     ::  File '/home/jenkins/crayftn/pdgcs/v_expr_utl.c', line 7360
   Initiated from     ::  Line 1280 (v_main.c)
   Optimizer built    ::  2023-01-20 (production)

   File               ::  /glade/derecho/scratch/hkershaw/build_everything/DART.cce/models/wrf_hydro/noah_hydro_mod.f90
   Function           ::  getchannelgridcoords
   at or near line    ::  660

   Compiler hash      ::  66f7391d6a03cf932f321b9f6b1d8612ef5f362c
   Target             ::  x86-milan

Creating internal compiler error backtrace (please wait):
[0x00000000c75a43] linux_backtrace ??:?
[0x00000000c76931] pdgcs_internal_error(char const*, char const*, int) ??:?
[0x0000000125c2d0] _expr_type(EXP_INFO) ??:?
[0x000000011d67e7] expr_mult(TYPE) ??:?
[0x00000000f7edd2] expr_replace_section(EXP_INFO, int, int, int, int, AS_LOOP*) v_as_conv.c:?
[0x00000000f7ef37] expr_replace_section(EXP_INFO, int, int, int, int, AS_LOOP*) v_as_conv.c:?
[0x00000000f7eb01] expr_replace_section(EXP_INFO, int, int, int, int, AS_LOOP*) v_as_conv.c:?
[0x00000000f7e519] replace_array_reduction(int, int, int, int, int, AS_LOOP*, TYPE, EXP_INFO, void (*)(TYPE), EXP_OP) v_as_conv.c:?
[0x00000000f7ffa3] expr_replace_section(EXP_INFO, int, int, int, int, AS_LOOP*) v_as_conv.c:?
[0x00000000f7eb22] expr_replace_section(EXP_INFO, int, int, int, int, AS_LOOP*) v_as_conv.c:?
[0x00000000f81e3a] convert_array_syntax_stmt(AS_STMT*, int, int) v_as_conv.c:?
[0x00000000f82f5a] build_loops_for_statements(int, int*, unsigned long) v_as_conv.c:?
[0x00000000f8813f] process_array_syntax_stmts() [clone .part.0] v_as_conv.c:?
[0x00000000f8a076] array_syntax_conversion() ??:?
[0x00000000873320] pdgcs_main ??:?
[0x00000000809fc2] PDGCS_do_proc ??:?
[0x0000000074bbf3] cvrt_proc_to_pdg m_cvrt.c:?
[0x0000000074c50f] m_cvrt_to_pdg ??:?
[0x000000007831b4] m_start_ipa ??:?
[0x00000000674da7] main ??:?
[0x007f23f98a329c] ?? ??:0
[0x00000000729d09] _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:120

Note:  This is a non-debug compiler.  Technical support should
       continue problem isolation using a compiler built for
       debugging.

ftn-7991 ftn: INTERNAL GETCHANNELGRIDCOORDS, File = ../../../build_everything/DART.cce/models/wrf_hydro/noah_hydro_mod.f90, Line = 660 
  INTERNAL COMPILER ERROR:  "_expr_type: Invalid table type" (/home/jenkins/crayftn/pdgcs/v_expr_utl.c, line 7360, version 66f7391d6a03cf932f321b9f6b1d8612ef5f362c)
make: *** [Makefile:72: noah_hydro_mod.o] Error 1

models/noah
models/wrf_hydro

@hkershaw-brown hkershaw-brown added the Derecho issues related to running on NCAR's new supercomputer label Dec 11, 2023
@hkershaw-brown hkershaw-brown mentioned this issue Dec 12, 2023
15 tasks
@mjs2369 mjs2369 self-assigned this Dec 28, 2023
@mjs2369
Copy link
Contributor

mjs2369 commented Jan 3, 2024

@mgharamti Helen and I were going over this issue and just wanted to clarify the intent behind the line producing this error:

n_link = sum(CH_NETRT*0+1, mask = CH_NETRT >= 0)

The line is summing the value of all of the elements in the CH_NETRT array that are greater than or equal to 0, but all the elements in the array are set to 1, so it's essentially just counting the number of elements that fit that criteria. This can be done in a much simpler way n_link = count(CH_NETRT>=0), and using this line instead fixes the error and allows the module to compile successfully.

I just wanted to see if you can confirm that this is what the original line intended to do, since it is a complicated way to do this and is difficult to follow. Thanks!

@mjs2369 mjs2369 mentioned this issue Jan 10, 2024
15 tasks
@mgharamti
Copy link
Contributor

@mjs2369 you're right. This is just counting the positive (and zero) links. And I agree with you; what a very complicated way to do it! I like your solution a lot more.

@mjs2369
Copy link
Contributor

mjs2369 commented Feb 13, 2024

Closed as completed via #619

@mjs2369 mjs2369 closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Derecho issues related to running on NCAR's new supercomputer
Projects
None yet
Development

No branches or pull requests

3 participants