Common problems and solutions
Here, we document common problems and solutions in compiling and running PhysiCell projects.
I get the error “clang: error: unsupported option ‘-fopenmp’” when I compile a PhysiCell Project
When compiling a PhysiCell project in OSX, you may see an error like this:
This shows that clang is being used as the compiler, instead of g++. To fix this error, edit your Makefile, and fix the CC line.
CC := g++-7 # use this if you installed g++ 7 by Homebrew
CC := g++-mp-7 # use this if you installed g++ 7 by MacPorts
If you have not installed g++ by MacPorts or Homebrew, please see the following tutorials:
When I compile, I get tons of weird “no such instruction” errors like
“no such instruction: `vmovsd (%rdx,%rax), #xmm0′” or
“no such instruction: `vfnmadd132sd (%rsi,%rax,8), $xmm5,%xmm0′”
When you compile, you may see a huge list of arcane symbols, like this:
The “no such instruction” means that the compiler is trying to send CPU instructions (like these vmovsd lines) that your system doesn’t understand. (It’s like trying SSE4 instructions on a Pentium 4.) The first solution to try is to use a safer architecture, using the ARCH definition. Open your Makefile, and search for the ARCH line. If it isn’t set to native, then try that. If it is already set to native, try a safer, older architecture like core2 by commenting out native (add a # symbol to any Makefile line to comment it out), and uncommenting the core2 line:
# ARCH := native ARCH := core2
“I don’t understand the ‘m’ flag!”
When you compile a project, you may see an error that looks like this:
This seems to be due to incompatibilities between MacPort’s gcc chain and Homebrew (especially if you installed gcc5 in MacPorts). As we showed in this tutorial, you can open a terminal window and run a single command to fix it:
echo export PATH=/usr/bin:$PATH >> ~/.profile
Note that you’ll need to restart your terminal to fully apply the fix.
Errors Running PhysiCell
My project compiles fine, but when I run it, I get errors like “illegal instruction: 4“.
This means that PhysiCell has been compiled for the wrong architecture, and it is sending unsupported instructions to your CPU. See the “no such instruction” error above for a fix.
I fixed my Makefile, and things compiled fine, but I can’t compile a different project or the sample projects.
The Makefile rules for the sample projects (e.g., make biorobots-sample) overwrite the Makefile in the PhysiCell root directory, so you’ll need to re-modify the Makefile with the correct CC (and potentially ARCH) lines any time you run a template project or sample project make rule. This will be improved in future editions of PhysiCell. Sorry!!
It compiled fine, but the project crashes with “Segmentation fault: 11″, or the program just crashes with “killed.”
Everything compiles just fine and your program starts, but you may get a segmentation fault either early on, or later in your simulation. Like this:
[Screenshot soon! This error is rare.]
Or on Linux systems it might just crash with a simple “killed” message:
This error occurs if there is not enough (contiguous) memory to run a project. If you are running in a Virtual Machine, you can solve this by increasing the amount of memory. If you are running “natively” you may need to install more RAM or decrease the problem size (the size of the simulation domain or the number of cells). To date, we have only encountered this error on virtual machines with little memory. We recommend using 8192 MB (8 GB):