Welcome, Guest
Username: Password: Remember me

TOPIC: Not able torun telemac simulation due to change in Python code runcode

Not able torun telemac simulation due to change in Python code runcode 9 years 7 months ago #16648

  • gourish
  • gourish's Avatar
Hi,

I was not able to run the sample test case sisyphe as I have indicate in my
previous post www.opentelemac.org/index.php/kunena/17-...oral-test-case#16614

The error was due to the long path of dictionary file as on my system.
In the previous version that is V6P3 the appropriate field were getting
continued on next line (limited to 72 characters) when the steering file was written in the temporary folder.
However in version V7P0 this does not happen and the steering file is written as it is.

I analyzed the code runcode.py in version V7P0 and check that the statement on line no. 305, which results in the writing the steering file as it is,
rewriteCAS(cas) has been commented,
elif iFiles[k].split(';')[5][0:3] == 'CAS':
                  #print '    re-writing: ', crun
                  #putFileContent(crun,rewriteCAS(cas))
                  print '    re-copying: ', crun
                  putFileContent(crun,cas[0])

Has the command rewriteCAS(cas) being purposely omitted due to any reason.
If yes then is there any other workaround proposed to solve the problem.

Tentatively I am thinking of modifying the code for my use by including the statement rewriteCAS(cas).

Thanks,
Gourish
The administrator has disabled public write access.

Not able torun telemac simulation due to change in Python code runcode 7 years 3 months ago #27632

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 8
After recently updating my models to v7p2r2 from v6p2 I am facing this exact issue.

I have had to change from intel fortran compiler to gfortran in order to get this more recent version compiled successfully. Now when trying to run the model I am getting errors due to the length of my CAS file. Can anybody tell me if this is due to the difference in compiler or changes to the runcode.py script between versions?

Regards,
Toby
The administrator has disabled public write access.

Not able torun telemac simulation due to change in Python code runcode 7 years 2 months ago #27647

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I am not involved in Python but there seems to be two issues in your post:

* Intel Fortran does not compile: please send details because it should normally compile, as it is currently used at EDF.

* cas file: officially lines must not exceed 72 characters, but as lists of numbers can continue on several lines it should not be a problem. The rewriting of the cas file by Python has been removed probably because it could change a few digits of real numbers.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Not able torun telemac simulation due to change in Python code runcode 7 years 2 months ago #27655

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 8
Hi Jean,

Thanks for the help. I managed to figure out the required changes to the CAS file line width issue.

In regards to the intel fortran compilation of v7p2r2 I thought the issue was related to the requirement for the C compiler in the newer versions. I see that there is now an additional line which reads:

cmd_obj_c: gcc -c <srcName> -o <objName>

I installed the GNU compiler collection thinking that it would take care of compiling the C code, while ifort would take care of the fortran side of things. The code compiles alomost to the end resulting in the following error:


- completed: ...\v7p2r2\sources\mascaret\API\f90\rezo_interface.f90
   - completed: ...\v7p2r2\sources\mascaret\API\f90\pretrait_interface.f90
   - completed: ...\v7p2r2\sources\mascaret\API\f90\init_ligne_mascaret.f90
   - completed: ...\v7p2r2\sources\mascaret\homere_mascaret.f90
   - completed: ../sources/mascaret/Deriv/adstack.c
xilib: executing 'lib'
   - completed: ...\v7p2r2\builds\win7tels\lib\mascaret\homere_mascaret.lib
compileTELEMAC::main:
      +> creating executable: homere_mascaret:
   |createExeFiles: Object missing:
   |      adstack.obj


By the way I am using the older Intel Parallel Studio XE 2011.

Best Regards,
Toby
The administrator has disabled public write access.

Not able torun telemac simulation due to change in Python code runcode 7 years 2 months ago #27669

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Again I am absolutely not a specialist, but I see in my own config file the line:

sfx_obj: .o

that seems to say that the object files must be named *.o, while in your case the compiler looks for *.obj, so it could be that you have to prescribe somewhere that object files should be named *.o. A hint would be that a file adstack.o has been created. The extension seems also to be parameterised by objName but I do not understand where this parameter is given.


With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Not able torun telemac simulation due to change in Python code runcode 7 years 2 months ago #27671

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi

C compiler is required only to compile Mascaret...
On another hand, I'm not sure it's possible to mix C file compiled with gcc with fortran file compiled with Intel, at least without complementary options regarding the decoration of subroutine (underscore, ...)

Regards
Christophe
The administrator has disabled public write access.
Moderators: borisb

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