neperfepx / neper

Polycrystal generation and meshing
http://neper.info
GNU General Public License v3.0
199 stars 53 forks source link

Neper 4.3.1 mac installation #384

Closed xshang93 closed 2 years ago

xshang93 commented 2 years ago

Describe the bug

  1. Neper 4.3.1 not working on mac os. It compiles fine, but when running make test, many tests does not pass.
  2. Neper 4.2.1 does not post process simulation results (more specifically, -S works but -V doesn't) generated by fepx 1.3.0. I re-ran the same calculations with fepx 1.2.2 and everything was fine with the same neper commands. I can't get neper 4.3.1 to run so I don't know if the results from fepx 1.3.0 can be read at all by all neper versions.

To Reproduce

  1. Just make test neper 4.3.1 on mac os. I'm running Catalina 10.15.7. The test logs are attached below.
  2. Calculate something with fepx 1.3.0, and visualize the results with neper 4.2.1
    
    neper -V ../1_4_3_125.sim -simstep 4 -datanodecoo coo -showelt1d all -dataelt1drad 0.00 -dataelt3dedgerad 0.00 -datanodecoofact 1 -dataelt3dcol stress-eq -dataeltscaletitle "Stress eq (MPa)" -dataeltscale 0:850 -showelt1d all -cameracoo 0.5:0.5:5 -camerasky 0:1:0 -imagesize 800:800 -print 1_seq_deform

======================== N e p e r ======================= Info : A software package for polycrystal generation and meshing. Info : Version 4.2.1-27 Info : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full) Info : Running on 32 threads. Info : https://neper.info Info : Copyright (C) 2003-2021, and GNU GPL'd, by Romain Quey. Info : No initialization file found (`/home/xshang93/.neperrc'). Info : --------------------------------------------------------------- Info : MODULE -V loaded with arguments: Info : [ini file] (none) Info : [com line] ../1_4_3_125.sim -simstep 4 -datanodecoo coo -showelt1d all -dataelt1drad 0.00 -dataelt3dedgerad 0.00 -datanodecoofact 1 -dataelt3dcol stress-eq -dataeltscaletitle Stress eq (MPa) -dataeltscale 0:850 -showelt1d all -cameracoo 0.5:0.5:5 -camerasky 0:1:0 -imagesize 800:800 -print 1_seq_deform Info : --------------------------------------------------------------- Aborted


[LastTest.log](https://github.com/rquey/neper/files/8021244/LastTest.log)
[LastTestsFailed.log](https://github.com/rquey/neper/files/8021245/LastTestsFailed.log)
[CTestCostData.txt](https://github.com/rquey/neper/files/8021246/CTestCostData.txt)
rquey commented 2 years ago

Did you try to use Neper version 4.3.1 despite the failed tests? Or did you try to run the tests in Minimal mode? There is an issue with testing on Mac.

PS. We generally ensure backward compatibility, but not forward compatibility. It is therefore not surprising that results from (new) FEPX 1.3.0 cannot be read by (old) Neper 4.2.1.

xshang93 commented 2 years ago

Did you try to use Neper version 4.3.1 despite the failed tests? Or did you try to run the tests in Minimal mode? There is an issue with testing on Mac.

I didn't try in Minimal mode, but I did have issues using Neper 4.3.1. I didn't have time to explore, but bizarre enough, although none of the tests on -V failed during testing, that module wasn't working properly - I tried to visualize some simulation results from before and it failed. I no longer have the error messages but it was saying something like "not able to read file".

PS. We generally ensure backward compatibility, but not forward compatibility. It is therefore not surprising that results from (new) FEPX 1.3.0 cannot be read by (old) Neper 4.2.1.

Makes sense. Thanks.

rquey commented 2 years ago

The "not able to read file" issue should be fixed in the latest version. Same for the tests, which now run in Minimal mode by default on macOS.

xshang93 commented 2 years ago

The "not able to read file" issue should be fixed in the latest version. Same for the tests, which now run in Minimal mode by default on macOS.

Sorry for the delay but I got too busy recently. Finally had some time to test the installation, it compiled and installed, but when I try to run Neper, I got this: dyld[37277]: symbol not found in flat namespace '_gzclose'

I'm on macOS Monterey. Any idea why this is happening?

rquey commented 2 years ago

Nope. This suggests an installation problem...

xshang93 commented 2 years ago

Nope. This suggests an installation problem...

After a bit more digging, I found this is a Mac OS problem - more specific a macOS 12 Monterey problem. see here and here. It somehow mentioned this can be solved by not stripping the executable, but I have no idea how.

rquey commented 2 years ago

@xshang93, have you made any progress on this issue?

xshang93 commented 2 years ago

Not really, but I did found something. What I ended up doing last time was sticking with my old macos version and neper 4.2.1-31. However, I happen to have recovered a backup from macos 10.15, which has my 4.2.1-31 neper, towards a new mac with macos 12.2. To my suprise, when I run make test it works well. So I think it is still a compilation or installation issue with macos 12.2, which I'm still not entirely sure why it happens..

Hope this helps