Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

a segmentation fault when performing metgrid.exe

zkqholic

New member
i'm having a problem when i perform metgrid.exe in WPS. No errors occured performing geogrid.exe and ubgrib.exe. Here is the error:

[zkq@ustc WPS-4.3.1]$ ./metgrid.exe
Processing domain 1 of 3

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2B81708D5697
#1 0x2B81708D5CDE
#2 0x2B81713683FF
#3 0x2B8173949E7A
#4 0x2B81719F56E5
#5 0x2B816E9AE16F
#6 0x496E43 in ext_ncd_open_for_read_begin_
#7 0x497B7B in ext_ncd_open_for_read_
#8 0x40FC0E in __input_module_MOD_input_init
#9 0x455402 in __process_domain_module_MOD_get_static_fields
#10 0x45A807 in __process_domain_module_MOD_process_domain
Segmentation fault (core dumped)

And the namelist.wps is as follows:

&geogrid
parent_id = 1, 1, 2,
parent_grid_ratio = 1, 5, 5,
i_parent_start = 1, 12, 35,
j_parent_start = 1, 15, 40,
e_we = 45, 101, 151,
e_sn = 45, 101, 211,
geog_data_res = '30s','30s','30s'
dx = 25000,
dy = 25000,
map_proj = 'lambert',
ref_lat = 30.8,
ref_lon = 117.6,
truelat1 = 30.8,
truelat2 = 30.8,
stand_lon = 117.6,
geog_data_path = '/data/backu/local/geog/'
/

&ungrib
out_format = 'WPS',
prefix = 'FILE',
/

&metgrid
fg_name = 'FILE'
io_form_metgrid = 2,
opt_output_from_metgrid_path='./met_output/',
/

It shoud be noted that a warning ourred during ./congiure WRF-4.3.3:

NETCDF4 IO features are requested, but this installation of NetCDF
/home/abdul/Build_WRF/LIBRARIES/netcdf
DOES NOT support these IO features.

Please make sure NETCDF version is 4.1.3 or later and was built with
--enable-netcdf4

OR set NETCDF_classic variable
bash/ksh : export NETCDF_classic=1
echo csh : setenv NETCDF_classic 1

Then re-run this configure script

!!! configure.wrf has been REMOVED !!!

I set NETCDF_classic variable using csh : setenv NETCDF_classic 1
An error ocuured during ./compile WPS as well: The metgrid.exe is genertaed
I solved this problem following the instrudtion in this post.
The WRF is version 4.3.3 and the WPS is version 4.3.1. i don't konw if this can cause so many errors.
 
Is this a nested case? can you upload your full namelist.wps for me to take a look? Thanks.
My situation is exactly the same as his, including the previous unsuccessful generation of meogrid, and the solution is also based on his method, but I also ran into the same problem.By the way,No errors occured when performing geogrid.exe and ubgrib.exe.
./metgrid.exe
Processing domain 1 of 3

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2B81052F6697
#1 0x2B81052F6CDE
#2 0x2B8105D892EF
#3 0x2B81092D00FA
#4 0x2B8107BBC785
#5 0x2B81001C87E5
#6 0x4A924F in ext_ncd_read_field_
Segmentation fault
here is my namelist.wps
1 &share
2 wrf_core = 'ARW',
3 max_dom = 3,
4 start_date = '2020-07-01_06:00:00','2020-07-01_06:00:00','2020-07-01_06:00:00',
5 end_date = '2020-07-03_18:00:00','2020-07-03_18:00:00','2020-07-03_18:00:00',
6 interval_seconds = 21600
7 /
8
9 &geogrid
10 parent_id = 1, 1, 2,
11 parent_grid_ratio = 1, 3, 3,
12 i_parent_start = 1, 65, 80,
13 j_parent_start = 1, 65, 80,
14 e_we = 250, 379, 652,
15 e_sn = 250, 349, 499,
16 geog_data_res = 'default','default',
17 dx = 6000,
18 dy = 6000,
19 map_proj = 'lambert',
20 ref_lat = 43.88,
21 ref_lon = 125.33,
22 truelat1 = 43.88,
23 truelat2 = 43.88,
24 stand_lon = 125.33,
25 geog_data_path = '/public1/home/cmip6c/liuyiming/WRF/Build_WRF/WPS_GEOG'
26 /
27
28 &ungrib
29 out_format = 'WPS',
30 prefix = 'SFC',
 
Hello, I'm using WRF-4.3.1 to generate met_em* files, but I encounter the error

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x150442223880 in ???
#1 0x150442222a25 in ???
#2 0x150441e3e6ef in ???
#3 0x15044208d324 in ???
#4 0x1504427528dc in ???
#5 0x15044274c605 in ???
#6 0x15044274cea3 in ???
#7 0x150442744737 in ???
#8 0x15044277400b in ???
#9 0x150442aa86a7 in ???
#10 0x432a62 in ???
#11 0x408013 in ???
#12 0x150441e2958f in ???
#13 0x150441e2963f in ???
#14 0x4038e4 in ???
#15 0xffffffffffffffff in ???
/var/spool/slurm/slurmd/job325132/slurm_script: line 34: 203964 Segmentation fault (core dumped) ${WPS_path_p}metgrid.exe

the following is my namelist.wps

&share
wrf_core = 'ARW',
max_dom = 2,
start_date = '2011-10-22_00:00:00', '2011-10-22_00:00:00',
end_date = '2012-12-31_23:00:00', '2012-12-31_23:00:00',
interval_seconds = 3600,
io_form_geogrid = 2,
debug_level = 0,
/

&geogrid
parent_id = 1, 1,
parent_grid_ratio = 1, 3,
i_parent_start = 1, 181,
j_parent_start = 1, 93,
e_we = 332, 142,
e_sn = 240, 100,
geog_data_res = 'usgs_lakes','usgs_lakes',
dx = 12000,
dy = 12000,
map_proj = 'lambert',
ref_lat = 31.5,
ref_lon = 90,
truelat1 = 31.5,
truelat2 = 31.5,
stand_lon = 90,
geog_data_path = '/home/project/geog/WPS_GEOG/',
opt_geogrid_tbl_path = './'
/

&ungrib
out_format = 'WPS',
prefix = './sfc_ungrib/ERA5_sfc',
/

&metgrid
fg_name = './pl_ungrib/ERA5_pl','./sfc_ungrib/ERA5_sfc',
opt_output_from_metgrid_path = './met/',
opt_metgrid_tbl_path = './'
constants_name = './TAVGSFC',
io_form_metgrid = 2,
/

the geogrid.exe and ungrib.exe have been successfully completed, I tried to recompile the WPS, but the problem remained. I have no idea of this problem, would you mind provide me some suggestions? Thank you very much!
 
Segmentation fault can be caused by insufficient memory. Let's first check whether this is the reason for the crash.

Please rerun your case but just over a single domain, let me know whether metgrid.exe can run successfully.

You can also run a quick test over a small single domain. if the case still fails, then we need to check the input data.
 
Segmentation fault can be caused by insufficient memory. Let's first check whether this is the reason for the crash.

Please rerun your case but just over a single domain, let me know whether metgrid.exe can run successfully.

You can also run a quick test over a small single domain. if the case still fails, then we need to check the input data.
Thanks for your reply! I tried to reconnect the login node, and this problem solved. So I think this error might not be related to the memory and may be caused by the crash in login node.
 
Top