Page 1 of 1

gFortran version requirement?

Posted: Fri Sep 20, 2013 8:11 pm
by mhe
When I compiled Code Saturne 3.1.0, I encountered some gFortran errors:

e.g.:
In file /share/nas1/home/user/code_saturne-3.1.0/src/base/field.f90:65
subroutine field_allocate_or_map_all() &
1
Error: Syntax error in SUBROUTINE statement at (1)
In file /share/nas1/home/mhe/code_saturne-3.1.0/src/base/field.f90:67
use, intrinsic :: iso_c_binding
1
Error: Unclassifiable statement at (1)
In file /share/nas1/home/mhe/code_saturne-3.1.0/src/base/field.f90:68
implicit none
1
Error: Unexpected IMPLICIT NONE statement in INTERFACE block at (1)
In file /share/nas1/home/mhe/code_saturne-3.1.0/src/base/field.f90:69


My current gcc-gfortran version is 4.1.2. Do I need to upgrade gcc-gfortran to get rid of these Syntax errors?

Thanks.

Matt.

Re: gFortran version requirement?

Posted: Fri Sep 20, 2013 8:35 pm
by Yvan Fournier
Hello,

Yes, you will need a more recent version of gfortran which supports iso_c_bindings (the only Fortran 2003 feature we need, which is supported by sufficiently recent versions of all major Fortran compilers).

I'm not sure about 4.2 and 4.3, but 4.4 to 4.8 all seem to work fine.

Regards,

Yvan Fournier

Re: gFortran version requirement?

Posted: Fri Sep 20, 2013 9:54 pm
by mhe
Thanks Yvan.

I have another problem.

My python version is 2.4.3, so when running "/usr/bin/python --version 2>&1 | cut -c 8", it generates error:

/usr/bin/pyrcc4 -py`/usr/bin/python --version 2>&1 | cut -c 8` -o resource_base_rc.py /share/nas1/home/mhe/code_saturne-3.1.0/gui/Base/resource_base.qrc
PyQt resource compiler
/usr/bin/pyrcc4: Unknown option: '-py'
Usage: /usr/bin/pyrcc4 [options] <inputs>


I wonder, how to modify the make file to change it to "-py2" or `/usr/bin/python -V 2>&1 | cut -c 8`.
I checked install_saturne.py, but didn't get a clue.

Can you help me on this?

Thanks.

Re: gFortran version requirement?

Posted: Sat Sep 21, 2013 1:00 am
by Yvan Fournier
Hello,

The command matching your error is in src/gui/Base/Makefile.am (used to generate a Makefile.in when running ./sbin/bootstrap or autoreconf).

So to replace --version by -V to extract the Python version, just search for PYRCC4VER in src/gui/Base/Makefile.am, adapt the matching line, and rerun ./sbin/bootstrap (which requires have the GNU autotools installed).

A quick and dirty solution is to directly modify the matching Makefile.in, which avoids requiring the run ./sbin/bootstrap or autoreconf stage. It is less "permanent", in the sense regenerating the Makefile.in from Makefile.am would overwrite your changes, but if you are simply installing the code, you probably don't care about that.

Also, you will likely have the same issue in src/gui/Pages/Makefile.*, so you'll need to adapt it the same way.

Regards,

Yvan