Segmentation fault occurred in MCIP

Hi all,

I encountered a segmentation fault when I tried to run MCIP, the error shows like following:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
mcip.exe 000000000057AFB3 Unknown Unknown Unknown
libpthread-2.17.s 00002AC2D8AD05D0 Unknown Unknown Unknown
mcip.exe 000000000057AB97 Unknown Unknown Unknown
libpthread-2.17.s 00002AC2D8AD05D0 Unknown Unknown Unknown
Error running mcip

I am not sure what the error comes from, is anyone could help me with this issue?

Thanks,
Kai

@copycky28

Would you please clean the MCIP directory of the .o files and recompile with the debugging options on? Specifically, if there is an option for “traceback” or something similar for your compiler, then that would be particularly helpful. After you’ve done that, please post the updated information from what you had in your initial inquiry.

Thank you!
Tanya

Hi tlspero,

Thanks for your reply. But it has same error after I recompile MCIP. FFLAGS in my Makefile is:
FFLAGS = -g -O0 -check all -C -traceback -FR -I$(NETCDF)/include -I$(IOAPI_ROOT)/Linux2_x86_64ifort

Thanks,
K

Look at the log file again. Instead of “Unknown Unknown Unknown” it should list routine names and line numbers. If if does not, try one more time. In the MCIP build directory, issue this command:
make clean
Do an ls of files in that directory and verify that .o, .mod, and mcip.exe have all been deleted.

Then recompile using the make command, redirecting the make output to a log file. If you’re using csh, this will work: make >& make.log. Examine the log file and verify that the -g -O0 -traceback flags are getting used. Then rerun mcip, check the log file. Post the entire mcip log file and make.log file.

One more thing: please specify what version of MCIP you are using as well as the compiler version.

Hi cgnote,

Thanks for your suggestion.
I recompiled as your suggestion and still got error with the routine source and line of “unknown”. in mcip.log file as beginning. I checked the make log file and I am sure the -g -O0 -traceback flags were used when compiling.
I used both MCIP 5.0 and 4.1 and got same error.

K

Please post the log files. They should not be too large.

Hi cgnolte,

Log files are attached. Thanks.

Best,
K

make.log.txt (22.9 KB) mcip.log.txt (499 Bytes)

I did not realize the program failed immediately, and the little snippet you had posted essentially was the entire log file!

You compiled with mpif90. The run script specifies to execute mcip.exe, without invoking mpirun. That is likely the problem.

Since MCIP is an entirely serial code, there is no reason to compile it with mpi. I suggest changing the Makefile so that the “regular” ifort (or gcc) compiler is used instead.

Thanks for your kindly help and answer. I recompiled MCIP with “ifort” but still got the same error. And I tried to compile with different fflags but all have same error.

I’m pretty mystified as to what could be wrong. There isn’t much to go on in your log file.

Maybe you are running out of memory. If it is not already in your run script, trying adding limit stacksize unlimited near the top of the run script.

I don’t have any idea about the source of this segmentation fault neither since the only error I got is shown as “SIGSEGV, segmentation fault occurred”. I added limit stacksize unlimited, but it did not solve the problem, unfortunately.