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

GCC version issues on Linux CentOS #93

Open
weaselskinghenry opened this issue Sep 23, 2021 · 5 comments
Open

GCC version issues on Linux CentOS #93

weaselskinghenry opened this issue Sep 23, 2021 · 5 comments

Comments

@weaselskinghenry
Copy link
Collaborator

Trying to run HYDRAD on Linux CentOS is giving the following error:

> ./HYDRAD.bat 
../../Resources/Utils/regPoly/regpoly.cpp: In function ‘gaussj(double**, int, double**, int)’:
../../Resources/Utils/regPoly/regpoly.cpp:97:12: warning: ‘irow’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 int i,icol,irow,j,k,l,ll;
            ^
../../Resources/Utils/regPoly/regpoly.cpp:124:15: warning: ‘icol’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  indxc[i]=icol;
               ^
./HYDRAD.bat: line 5: 39483 Segmentation fault      (core dumped) ./HYDRAD.exe > HYDRAD.txt

Investigating the compiler:

> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
> scl enable devtoolset-10 bash
bash-4.2$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-10/root/usr --mandir=/opt/rh/devtoolset-10/root/usr/share/man --infodir=/opt/rh/devtoolset-10/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-10.2.1-20210130/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20210130 (Red Hat 10.2.1-11) (GCC)
bash-4.2$ ./HYDRAD.bat 
../../Resources/Utils/regPoly/regpoly.cpp: In function ‘gaussj(double**, int, double**, int)’:
../../Resources/Utils/regPoly/regpoly.cpp:97:12: warning: ‘irow’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 int i,icol,irow,j,k,l,ll;
            ^
../../Resources/Utils/regPoly/regpoly.cpp:124:15: warning: ‘icol’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  indxc[i]=icol;
               ^
./HYDRAD.bat: line 5: 39751 Segmentation fault      (core dumped) ./HYDRAD.exe > HYDRAD.txt

So it's giving the same problem using both GCC v4 and v10; the exact same copy is running with no errors on a MBP running GCC v4.2.1. Any light shed on this would be appreciated!

@wtbarnes
Copy link
Member

This is a runtime error, not a compilation error so I'm not sure that using a different version of GCC would make a difference. Oftentimes, a segmentation fault can occur, particularly on Linux, because of issues with case sensitivity in filenames that macOS and Windows are not sensitive to. Can you provide your particular HYDRAD setup? That might help debug this compilation error.

@weaselskinghenry
Copy link
Collaborator Author

Can you clarify what you mean by HYDRAD setup? I cloned a copy from Github in April, if that helps!

@sjbradshaw
Copy link
Contributor

sjbradshaw commented Sep 23, 2021 via email

@weaselskinghenry
Copy link
Collaborator Author

Hi Steve, I did that and got exactly the same error. Also, the new version doesn't include HYDRAD.bat? I copied it over from my old version, I run it in command line rather than through the GUI.

@jwreep
Copy link
Member

jwreep commented Sep 23, 2021

After you compile HYDRAD, are there two files in /HYDRAD/config/ ? As Will mentioned, filenames can have case sensitivity issues on different operating systems. There might be a file name HYDRAD.cfg and one named hydrad.cfg, and the code might segfault when this happens if it reads the wrong one.

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

4 participants