-
Notifications
You must be signed in to change notification settings - Fork 150
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
can compile specfem2D but failed during execute #1162
Comments
:) the backtrace is not very helpful... that's always tricky on Macs to get some readable backtrace outputs. did you get any console output when running the script? the beginning should looks like:
also, can you attach your config.log file to see how you compiled the code? please also make sure first that you can run a simple fortran code on your Mac installation. |
Thanks, Daniel, for your response. Yes, I can compile and run simple fortran code on my Macbook I tried 2 configures to compile specfem2D
when I run specfem2D on the Macbook, it looks like this: setting up example... running mesher... Program received signal SIGILL: Illegal instruction. Backtrace for this error: Illegal instruction: 4 ./xmeshfem2D Could not print backtrace: executable file is not an executable Thanks, Rongmao |
hi Rongmao, in the script output it fails immediately after calling the xmeshfem2D binary. that points to a problem with the compilation and libraries loaded. so my guess would be to check 2 things: (1) the scotch library build: on a M1 Mac, you should use a different Makefile in the scotch/ library than the default one. on my Mac, this works:
then compile without the --with-scotch-dir flag to re-compile the bundled scotch lib. that is, make sure to have a clean scotch directory first (it could be that the scotch directory you point to was compiled with a different, i.e. old intel-Mac, compiler). thus, you would compile the serial version like:
for the parallel version:
(2) if the above doesn't fix it, make sure that your mpi compiler works with a simple mpi program. |
Thanks, Daniel. Following your suggestion, when I try the serial version: "make all" and get below error, and only have one xmeshfem2D compiled in the bin/ folder. Yes, I can compile mpi program and can execute it no problem. And I can also compiled specfem3D and run the example without issues. src/specfem2D/write_wavefield_dumps.F90:405:28: |
I added "-Wno-error=format-truncation" to Makefile, now 8 executable files were compiled. But when I ran, it still has same issues. running example: Thu Nov 10 08:19:18 EST 2022 setting up example... running mesher... Program received signal SIGILL: Illegal instruction. Backtrace for this error: Could not print backtrace: executable file is not an executable |
Hi, Daniel, Found similar issue report on sepcfem3d (SPECFEM/specfem3d#1496). Based on the discussion, I change running xmeshfem2D with mpirun, it works now. Thanks again, Daniel! |
ok, thanks for figuring it out! regarding the compilation errors with the
for using the
if you find out why your compilers and MPI installation bail out with a segmentation fault, it would be great to know. |
Hi, there,
I was able to compile specfem2d on my MacBook Pro (M1). However, when I tried to run "run_this example.sh" for EXAMPLES/Tromp2005, I got below error, and no output. Any ideas? Thanks!
Program received signal SIGILL: Illegal instruction.
Backtrace for this error:
Could not print backtrace: executable file is not an executable
#0 0x10295f187
#1 0x10295e163
#2 0x1aa1e74a3
#3 0x20c0b319b
#4 0x20c0b612b
#5 0x1b2ae4aeb
#6 0x1b2ae4923
#7 0x1aa00c1b3
#8 0x1aa01b413
#9 0x1b2bb2927
#10 0x1b2ae4743
#11 0x1b2b0ee13
#12 0x1aa00c1b3
#13 0x1aa00da33
#14 0x1b2ae4513
#15 0x10402c3a3
#16 0x104032533
#17 0x20b961147
./run_this_example.sh: line 47: 50186 Illegal instruction: 4 ./xmeshfem2D
The text was updated successfully, but these errors were encountered: