- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I actually run simulations with ABAQUS Standard 6.14-1.
Thereby I use some subroutines written in a combination of Fortran 77 and free-format (unlimited length of lines). In general Subroutines should be written in Fortran 77, but on the actual machine it works good.
Because of performance limit I’d like to change the machine.
The actual machine is a Debian Version 4.6.3-14 – Compiling with GNU Version 4.7.2-5.
The new one is called RedHat5 – Compiling with Intel Fortran 64 XE Version 12.0.
Both use Linux as operating system.
The “simple” task is now to switch the environment in that way, that it works the same way using the Intel Fortran Compiler instead of GNU Fortran.
Details of the actual/old system
excerpt of the environment-file
compile_fortran = [fortCmd,
'-c', '-fPIC', '-extend_source', '-O2', '-I%I', '-ffixed-line-length-none', '-fno-align-commons',
'-std=f2008', '-frecursive']
excerpt of one Subroutine (subroutine.f)
(this is the third one of 9, but the first that makes trouble) --> Uploaded 1 & 2:
Excerpt1-Subr.f.PNG
Excerpt2-Subr.f.PNG
Line 140 is the first one that makes troube on the “new machine” using the environment-file below.
I tried a word-wrap by using & at the end or beginning of a line (column 5 and further), $ or 1 but it doesn’t work at all. Further I tried to shift the whole subroutine in that way, that the first word starts at column 6 as prescribed in Fortran 77… but that works less.
Details of the new system
excerpt of the environment-file
compile_fortran = [fortCmd,
'-V',
'-c', '-fPIC', '-auto', '-mP2OPT_hpo_vec_divbyzero=F', '-extend_source',
'-WB', '-I%I']
Via trial and error I migth exclude “-free” , “-frecursive” (isn’t supported), “assume cc_omp”,
Typical error-massages:
/tmp/2198878.1.abax18/U_Data_Calculate.f(140): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
IF ( NR .EQ. PHASE_FERRITE) Data_Density_Jablonka = (rhoF0 + rhoF1*TEMP + rhoF2*TEMP*TEMP) *
---------------------------------------------------------------------------------------------------------------^
/tmp/2198878.1.abax18/U_Data_Calculate.f(141): error #5082: Syntax error, found '(' when expecting one of: BLOCK BLOCKDATA PROGRAM MODULE TYPE BYTE CHARACTER CLASS DOUBLE DOUBLECOMPLEX ...
1 (1.0 - rhoFC*cC)
----------^
/tmp/2198878.1.abax18/U_Data_Calculate.f(142): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
IF ( NR .EQ. PHASE_CARBIDE) Data_Density_Jablonka = (rhoK0 + rhoK1*TEMP + rhoK2*TEMP*TEMP) *
----------------------------------------------------------------------------------------------------------------^
/tmp/2198878.1.abax18/U_Data_Calculate.f(143): error #5082: Syntax error, found '(' when expecting one of: BLOCK BLOCKDATA PROGRAM MODULE TYPE BYTE CHARACTER CLASS DOUBLE DOUBLECOMPLEX ...
1 (1.0 - rhoKC*cC - rhoKCr*cCr - rhoKMn*cMn)
Furthermore a colleague who works with Damask gave me an environment that might help
compile_fortran = (fortCmd + " -c -fPIC -auto " +
"-I%I -free -O1 -fpp -openmp " +
"-ftz -diag-disable 5268 " +
"-implicitnone -assume byterecl " +
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4")
… but I can’t transfer it because he uses another Fortran style… excerpt of his routine:
!*** input/output variables
type(p_vec), dimension(1,mesh_maxNips,mesh_NcpElems), intent(inout) :: &
state !
microstructural state
!*** local variables
integer(pInt) ipc, &
el, &
ip, &
e, &
i, &
ns, &
! short notation for total number of active slip systems
f, &
! index of lattice family
Up to the present or a few weeks ago – I work on it since 3 weeks - I never mind about details in the environment and the compiling process. Thus or nevertheless I’m no specialist in this kind of stuff.
Since I work on it for a certain time, but without having achieving the switch, I hope someone might help me.
Kind regards
Sandra
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Extracting text from image files (such as .PNG) is time-consuming and error-prone. Do not use image files for program text.
Please post the source code again. Zip up the files and attach the zip file, or use the "{...}" code button for short segments of source code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With ifort, the -extend-source switch extends the line out to 132 characters.
At least two of your lines are much longer than that.
I converted the lines to look like this instead, and while I can't compile the program (it's missing a .mod file) it doesn't give the syntax error you saw. Note: even here, the lines wrap, at least in my browser.
IF ( NR .EQ. PHASE_FERRITE) then Data_Density_Jablonka = (rhoF0 + rhoF1*TEMP + rhoF2*TEMP*TEMP) * (1.0 - rhoFC*cC) endif IF ( NR .EQ. PHASE_CARBIDE) then Data_Density_Jablonka = (rhoK0 + rhoK1*TEMP + rhoK2*TEMP*TEMP) * (1.0 - rhoKC*cC - rhoKCr*cCr - rhoKMn*cMn) endif IF ( NR .EQ. PHASE_AUSTENITE) then Data_Density_Jablonka = (rhoA0 + rhoA1*TEMP + rhoA2*TEMP*TEMP) * (1.0 - rhoAC*cC - rhoACr*cCr - rhoAMn*cMn) endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lorri,
Thanks a lot! I guess I just needed someone who helps me "thinking outside the box". :)
'll try to change this routine either by inserting "then" or by changing the name of some long variables temporarily.
Report about result follows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sry for the late answer.
It didn't succeed because there are some blocks that cannot be splitted.
As for instance :
CALL CALC_YIELDING( E_IN_PL, DE_IN_PL, TEMP, DTEMP, DTIME, NDI, NSHR, NTENS, STRESS, STRAN_EL0, DSTRAN, DSDE, DEDT, STATEV, NSTATEV)
Therefore I'm still looking for a linux machine with an GNU Compiler (V 4.4.x)...
If there is anybody who had solved a similar problem, please let me know!
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sandra -
Again, yes, this can be broken up; you need to use a continuation character, which is a non-blank character in column 6 (for fixed form source, such as you have)
You statement above can be rewritten as:
CALL CALC_YIELDING( E_IN_PL, DE_IN_PL, TEMP, DTEMP, DTIME, & NDI, NSHR, NTENS, STRESS, STRAN_EL0, DSTRAN, DSDE, DEDT, & STATEV, NSTATEV)
It is hard to see here, but the "&" is in column 6. It's important that you actually put it there, because that's how it works with fixed form source.
--Lorri
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page