Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Segmentation fault problem

Ajay Bhadran

Ajay Bhadran
New Member
Hi all,
I am contacting you regarding a segmentation fault issue I encountered while running the cice+icepack configuration.
Specifically, I have configured the model with 15 layers of sea ice thickness and one layer of snow. However, when attempting to write internal snow temperatures to the history file, I am facing a segmentation fault problem. I am unable to pinpoint the root cause of the problem. It would be beneficial for me if anyone could offer suggestions or insights into where the issue might lie.

I have attached the ice_in file and the error message I received to provide more context.
 

Attachments

  • cice.runlog.240218-114525.txt
    25.6 KB · Views: 5
  • ice_in.txt
    15.1 KB · Views: 4

Philippe Blain

New Member
Hello Ajay,

I've looked at your runlog and namelist. I tried running CICE6.1.0 (the version indicated in your runlog) with your namelist. It does not work outside the box because you seem to have custom forcing (NICE_2015) in NetCDF format. You also have two additions to the zbgc_nml namelist (Limiting_factors_file and Bottom_turb_mix.

I ran the model with these namellist modifications with respect to yours:

Diff:
diff --git 1/ice_in.txt 2/ice_in
index da16f6a..e9acb60 100644
--- 1/ice_in.txt
+++ 2/ice_in
@@ -179,12 +179,12 @@ &forcing_nml
     ice_data_type   = 'default'
     fyear_init      = 2015
     ycycle          = 1
-    atm_data_format = 'nc'
-    atm_data_dir    = '/home/ajaybhadran/cice-dirs/input/peduro_data/NICE_2015/'
-    bgc_data_dir    = '/home/ajaybhadran/cice-dirs/input/peduro_data/NICE_2015/'
-    ocn_data_format = 'nc'
-    ocn_data_dir    = '/home/ajaybhadran/cice-dirs/input/peduro_data/NICE_2015/'
-    oceanmixed_file = 'oceanmixed_daily.nc'
+    atm_data_format = 'bin'
+    atm_data_dir    = '/path/to/CICE_data/forcing/gx3/NCAR_bulk'
+    bgc_data_dir    = 'unknown_bgc_data_dir'
+    ocn_data_format = 'bin'
+    ocn_data_dir    = '/path/to/CICE_data/forcing/gx3/'
+    oceanmixed_file = 'unknown_oceanmixed_file'
 /
 
 &domain_nml
@@ -351,8 +351,6 @@ &zbgc_nml
     F_abs_chl_sp       = 4.0
     F_abs_chl_phaeo    = 5.0
     ratio_C2N_proteins = 7.0
-    Limiting_factors_file = .true.
-    Bottom_turb_mix = .false.
 /
 
 &icefields_nml

and it ran correctly.

To try to debug your segfault, you should first recompile with debug symbols (-g) and without optimization (-O0). With these flags, the runlog should contain a useful backtrace when it segfaults, instead of just memory adresses like in your runlog above. This will tell you in which subroutine the code segfaults.

Since you are running with a single MPI task, you could also try running the model without MPI (set up the case with ./cice.setup -p 1x1 ...), and run it in a debugger, i.e. gdb --args ./cice, see section "Running with a Debugger" in the doc.
 
Top