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

Segmentation fault when using openmp #138

Open
svigerske opened this issue Feb 26, 2019 · 4 comments
Open

Segmentation fault when using openmp #138

svigerske opened this issue Feb 26, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: rbubley

Original creation time: 2015-02-03 17:14:24

Assignee: @tkralphs

Version: trunk (SVN)

I am running SYMPHONY 5.5.6 (Rev 2384), on a Mac, compiled with gcc (both version 4.8.4 and 4.9.2).

When running a MILP problem from the command line, I get a seg fault if I have compiled with OpenMP (and none if I have compiled without it).

The seg fault occurs after all the processing, and at the end of the output. Running it through a debugger, the offending line is line 819 of master_wrapper.c

It seg faults with -O3 and -O2 optimization flags, but didn't with -O0. It seems that it doesn't always seg fault, suggesting some sort of race condition, perhaps.

thread 1: tid = 0x53cd0b, 0x0000000100013219 symphony`free_master_u(env=0x0000000101002400) + 521 at master_wrapper.c:819, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xd4000000db)
    frame #0: 0x0000000100013219 symphony`free_master_u(env=0x0000000101002400) + 521 at master_wrapper.c:819
   816 	      if (env->warm_start->cuts){
   817 		 for (i = env->warm_start->cut_num - 1; i >= 0; i--){
   818 		    if (env->warm_start->cuts[i]){
-> 819 		       FREE(env->warm_start->cuts[i]->coef);
   820 		    }
   821 		    FREE(env->warm_start->cuts[i]);
   822 		 }
@svigerske svigerske added bug Something isn't working Not Sure labels Feb 26, 2019
@svigerske
Copy link
Member Author

Comment by @tkralphs created at 2015-02-03 17:23:53

Can you try just updating to SYMPHONY 5.6.6? I fixed a lot of bugs related to OpenMP between 5.5 and 5.6 (the difference between the two versions is mostly in the stability of the parallel mode).

@svigerske
Copy link
Member Author

Comment by rbubley created at 2015-02-03 17:28:03

Apologies - that was a typo. I meant 5.6.6 not 5.5.6. I downloaded it fresh from svn this morning.

@svigerske
Copy link
Member Author

Comment by @tkralphs created at 2015-02-03 17:46:36

OK, I will see if I can replicate this. Does it happen consistently with all problems or just with one? Did you run it through valgrind by chance?

@svigerske
Copy link
Member Author

Comment by @tkralphs created at 2015-02-03 22:21:39

I have been able to replicate this seg fault. I will see what I can do. It seems to happen even with -p 0, which should be identical to the build without OpenMP.

@tkralphs tkralphs removed the Not Sure label Mar 14, 2019
@tkralphs tkralphs self-assigned this Jul 30, 2019
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

No branches or pull requests

2 participants