Welcome, Guest
Username: Password: Remember me

TOPIC: Trouble compiling fortran file (PROSOU.F)

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24009

  • chelobarros
  • chelobarros's Avatar
hi!

I am just learning the Fortran syntax, I made some changes to the subrutine prosou.f in order have a variable rain input.

first i had to compile clean my telemac to make my fortran file work , and then i include a print*, 'CHELO' to know if it was using my routine in the Fortran file , it worked.

then i changed the portion of RAIN_MMPD to my code, and i get the following error. i believe it is a syntax error.

im using ubuntu 16.04.
==============================================================================
Running your CAS file for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> configuration: debgfortrans
+> root: /home/chelobarros/v7p1r0


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


... reading the main module dictionary

... processing the main CAS file(s)
+> running in English

... handling temporary directories

... checking coupling between codes

... checking parallelisation

... first pass at copying all input files
copying: selafin_tc_salado.slf /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/T2DGEO
copying: BC_salida.cli /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/T2DCLI
copying: hietograma.f /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/t2dfort.f
copying: estado_inicial.slf /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/T2DPRE
re-copying: /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/T2DCAS
copying: telemac2d.dico /home/chelobarros/Desktop/hietograma/modelo_rain/chelo.cas_2016-10-17-12h40min48s/T2DDICO

... checking the executable
t2dfort.f:463:29:

open(unit=10, file='/home/chelobarros/Dropbox/TESIS/scripts_tesis/fortran/
1
Error: Invalid value for FILE specification at (1)
t2dfort.f:502:72:

RAIN_MPS = mat_hieto(j_hieto-1,2) + pend_hieto * (dur_hieto- mat_hieto(j_hi
1
Error: Syntax error in expression at (1)
runCAS: could not compile: hietograma
|processExecutable: could not compile your FORTRAN (runcode=1).
|
|... The following command failed for the reason above (or below)
|gfortran -c -O3 -fconvert=big-endian -frecord-marker=4 -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/utils/special -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/utils/parallel -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/utils/damocles -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/utils/hermes -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/utils/bief -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/waqtel -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/sisyphe -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/tomawac -I /home/chelobarros/v7p1r0/builds/debgfortrans/lib/telemac2d t2dfort.f
=============================================================================

sorry if this is a simple matter but i don’t know what to do.
i am using codeblocks to write my script and making sure it works.
it runs just fine when i compile it and execute it on codeblocks. also i am using the same gfortran compiler on both.

i will attach my original script and the modified prosou.f subroutine called hietograma and my cas file.

the hietograma.f file has changed the RAIN OR EVAPORATION part, this is the fortran file and the hieto_telemac.f is the script i wrote in codeblocks (f90 syntax).

i would really appreciate if someone could help me on this.

greetings,
chelo.


File Attachment:

File Name: chelo_2016-10-17.cas
File Size: 3 KB


File Attachment:

File Name: hietograma.f
File Size: 29 KB


File Attachment:

File Name: hieto_telemac.f
File Size: 3 KB
The administrator has disabled public write access.

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24012

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi,

You have at least two lines with more than 73 characters - this is not accepted by the compiler. Write your statements on several lines using the continuation token &, take example in existing subroutines.

I did not check your code at all, just saw this syntax mistake.

Good luck!

Best regards
PL
The administrator has disabled public write access.
The following user(s) said Thank You: chelobarros

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24013

  • chelobarros
  • chelobarros's Avatar
it worked! thank you.


greetings,
chelo.
The administrator has disabled public write access.

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24025

  • chelobarros
  • chelobarros's Avatar
hi, as i said before it worked and it does whta it is supposed to do.
but now i have another error.

ITERATION 2229 TIME: 3 H 6 MIN 8.7000 S ( 11168.7000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP
CHELO-HIETOGRAMA
Duracion: 11.145000000000000 (min)
RAIN_MPS: 17.011500000000002 (mm/h)
RAIN_MPS: 4.7254166666666668E-003 (mm/s)
GMRES: NORM OF VECTOR 2
IN THE BASIS EQUALS 0.0000000000000000
SIZE OF KRYLOV SPACE REDUCED TO 1
GMRES (BIEF) : ALGORITHM FAILED R= 0.000000
IF THE MATRIX IS DIAGONAL, CHOOSE
THE CONJUGATE GRADIENT SOLVER.
GMRES (BIEF) : 1 ITERATIONS, RELATIVE PRECISION: NaN

================================================================================
ITERATION 2230 TIME: 3 H 6 MIN 9.0000 S ( 11169.0000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP
CHELO-HIETOGRAMA
Duracion: 11.150000000000000 (min)
RAIN_MPS: 17.004999999999999 (mm/h)
RAIN_MPS: 4.7236111111111107E-003 (mm/s)
GMRES: NORM OF VECTOR 2
IN THE BASIS EQUALS 0.0000000000000000
SIZE OF KRYLOV SPACE REDUCED TO 1
GMRES (BIEF) : ALGORITHM FAILED R= 0.000000
IF THE MATRIX IS DIAGONAL, CHOOSE
THE CONJUGATE GRADIENT SOLVER.
GMRES (BIEF) : 1 ITERATIONS, RELATIVE PRECISION: NaN


it does not generate an error but if makes the step time resolution take considerable time.

i believe it has something to do whit the time variation of the RAIN_MPS variable, any idea?


Greetings,
chelo.
The administrator has disabled public write access.

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24042

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi,

As you can see on the listing, there is a problem with the GMRES solver. Try to change it to Conjugate gradient (SOLVER = 1).

Best regards
PL
The administrator has disabled public write access.
The following user(s) said Thank You: chelobarros

Trouble compiling fortran file (PROSOU.F) 8 years 1 month ago #24059

  • chelobarros
  • chelobarros's Avatar
i made a mistake calculating the RAIN_MPS, i corrected it now. it works fine. thank you for your time.

greetings,
chelo.
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.