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

Visualization issue on latest build with GNU #49

Open
Djneu opened this issue Jun 23, 2022 · 3 comments
Open

Visualization issue on latest build with GNU #49

Djneu opened this issue Jun 23, 2022 · 3 comments

Comments

@Djneu
Copy link

Djneu commented Jun 23, 2022

Hi,
I've been having an issue with the newest build where the VTK files do not show up in paraview on a GNU system. This seems to be an issue with the removal of "convert=big_endian" from the open function that writes the files, as setting this again fixes the issue.

From my understanding, it looks like cmakelists now sets the flag "-fconvert=big-endian", which should have been applied to the function and done the conversion without specifying it, but for some reason it seems this isn't occurring. The flags themselves seem to be included in the build, as currently with "-std=f2008" included adding "convert=big_endian" to the open function results in an error, but if it is removed I can again specify it like in previous builds. Because of this I'm not sure exactly why the convert flag isn't working, any ideas what the issue may be?

Thank you for your time!

@benbovy
Copy link
Member

benbovy commented Jun 30, 2022

Hi Derek,

Could you tell a bit more about the platform and versions (fastscapelib-fortran, gfortran...) that you use?

Have you tried setting the GFORTRAN_CONVERT_UNIT env variable?

@Djneu
Copy link
Author

Djneu commented Jul 1, 2022

Yes, sorry this is for fastscalelib-fortran commit 48799f9 using gfortran GNU Fortran (GCC) 9.2.0.

I had not set the convert unit, and doing so fixed the issue. Is this something that should always be set or should the cmake flags work without it being set?

Either way, this is an easy fix, thank you for the solution!

@benbovy
Copy link
Member

benbovy commented Jul 1, 2022

I'm not sure why it wouldn't work when building with gfortran via cmake. I've tried a while ago and didn't see any issue.

Possible reasons would be that CMAKE_Fortran_COMPILER_ID doesn't match Flang or GNU (I'd be surprised since you mention that you use gfortran) or the CMAKE_Fortran_FLAGS is not properly updated in the CMakelists. It might also be worth looking at the build logs (verbose mode) to see if the flag is properly passed to the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants