Welcome, Guest
Username: Password: Remember me

TOPIC: Need the configuration for intel fortran in ubuntu

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7219

  • jpbelliard
  • jpbelliard's Avatar
Dear all,

I have been using gfortran as fortran compiler for telemac v6p2 version integrated with python. However, I would like to switch now to intel fortran as I heard it is more powerful. I installed the intel fortran compiler in my computer, however I cannot find the right configuration for intel fortran compiler in scalar mode for ubuntu among the list of the different configurations in the systel.cfg file (only the wintel7s configuration is listed and it is for windows 7). Therefore could you forward me the configuration of intel fortran in scalar mode for ubuntu ?

Also I wanted to know if anyone knows how to set PERMANENTLY the environmental variables for the Intel Fortran Compiler in ubuntu. I know the command to type in the terminal to set the environmental variables but everytime I log out and log in back in the terminal I must retype the same command because the environmental variables are not saved in the bashrc file. It was really easy to do that for gfortran but looks obviosuly different for intel fortran.

Thank you for your kind reply

Jean-Philippe
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7353

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

The increase in speed is marginal (10% to 15% or so when compared to gfortran). The parallelism gives you much better speed-up: if you have 2 cores the speed-up is 50%, if you have 4 it is 75%, etc.

Nonetheless, if you wish to make your own comparisons (please let us know of the results) you should be able to adapt the windows 7 intel configuration, putting the following keys in your ubuntu configuration.

cmd_obj: ifort.exe /c /Ot /iface:cref /iface:nomixed_str_len_arg /nologo /fpp /names:uppercase /convert:big_endian /extend_source:132 <mods> <incs> <f95name>
cmd_lib: xilib.exe /nologo /out:<libname> <objs>
cmd_exe: xilink.exe /nologo /subsystem:console /stack:536870912 /out:<exename> <objs> <libs>
mods_all: /include:<config>


You also need to make sure METIS and MPI are compiled with your Intel compiler as well.

The rest should be easy.

Hope this helps.
Sebastien.
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7369

  • jpbelliard
  • jpbelliard's Avatar
Ok thank you.

I managed to configure the Intel Fortran compiler with the Telemac system. However, when I try to compile the source codes, after some time I get an error:

Fatal compilation error: Out of memory asking for 2097160.

I am using the following fortran compiler which was preinstalled in a workstation:

Intel(R) Fortran Compiler XE for applications running on IA-32, Version 12.0.0.084 Build 20101006

which is a 32bit compiler. I downloaded the source codes for the v6p2 version via subversion. Is this version downloaded via subversion 32 or 64bit? Because if it is 64bit, then that would be the reason for this error message which typicall means that there is not enough RAM. By the way, I tried to look for information regarding system requirements for the TELEMAC system but I couldn't find on the website. Do you know for instance what is the required number of RAM for running the v6p2 version ?

Thank you for your concern,

Jean-Philippe
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7371

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

For information, we consider that the TELEMAC system itself is very light and that any modern computer would run the latest version -- hence no specific requirements but the pre-requisites -- besides, it is coded based on dynamic memory allocation, which means that only the size of your model domain dictates the size of your computer memory.

Additionally, just to confirm, the source code of the TELEMAC system is clean of any hardware dependencies, which means that we can run it pretty much anywhere (we have not tried on mobile phone yet :silly: ) and is therefore independent of whether you have a 32bit or 64bit computer / compiler. Modern computers (processors) support 64bit addressing even if you run a 32bit operating system.

So where is the magic ?

Everything is driven by your cfg file, and in particular when you set the commands for your compiler (ifort.exe, xilink.exe, etc ...). It is your compiler that creates a TELEMAC executable specific to your compiler (linux/windows, 32bit/64bit, etc). Depending on what is behind ifort.exe, you will therefore run TELEMAC as a 32bit application or a 64bit application. The same is true of other compilers and other platforms.

Now to answer your question ... on windows, it is often necessary to declare how much memory will be used by your application before even having set-up any model. Windows does not like memory expandable programs so much. This memory declaration is set by the /stack:536870912 option in your compiler cmd_exe command of the cfg file.

I am not sure whether this is the solution to problem but it is worth changing the value of the number to see if you can compile your code. Try compiling without the parallelism at first.

Hope this helps,
Sebastien.
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7381

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Sebastien,

For what it's worth, I have encountered this compiler error when trying to build certain programs using aggressive optimization such as "whole program optimization".

Jean-Philippe: try reducing the optimization level by changing /Ot to /O2 for the module that the compiler is choking on.

Martin
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7382

  • jpbelliard
  • jpbelliard's Avatar
Thanks Martin,

It works! You saved my weekend! ;)
The administrator has disabled public write access.

Need the configuration for intel fortran in ubuntu 11 years 9 months ago #7407

  • jpbelliard
  • jpbelliard's Avatar
Dear all,

To continue this thread about the request for the configuration of the Intel Fortran compiler under Ubuntu, I would like to share with you the following:

I have installed TELEMAC in my laptop under Linux (ubuntu 12.04) which is equipped with the latest Intel Fortran Compiler (Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.1.117 Build 20121010)

I have also installed TELEMAC, not in its parallel version yet, in a Linux-based workstation that I am used for running long term simulation. The workstation is equipped with the following Intel Fortran Compiler (Intel(R) Fortran Compiler XE for applications running on IA-32, Version 12.0.0.084 Build 20101006)

I applied the same configuration for both Intel Fortran Compilers in their respective systel.cfg files:

# _____ ____________________________________
# ____/ Ubuntu Intel Scalar /___________________________________/
[ubuiforts]
#
root: /home/ospite_laghi/JPBelliard/TELEMAC/svn/v6p2r1
version: v6p2
language: 2
modules: clean system
#
cmd_obj: ifort -c -O0 -convert big_endian <mods> <incs> <f95name>
cmd_lib: ar cru <libname> <objs>
cmd_exe: ifort -convert big_endian -o <exename> <objs> -Xlinker --start-group <libs> --end-group
#
mods_all: -I <config>
#
sfx_zip: .gztar
sfx_lib: .lib
sfx_obj: .o
sfx_mod: .mod
sfx_exe:
#
# also possible val_root: <root>/../calibration
val_root: <modpath>/validation
val_rank: all
# also possible val_rank: <3 >7 6
#

If I run a similar cas file with each compiler, then the run works successfully in my laptop, while it crashes in the workstation. The error which is displayed is the following:

INITIALISATION EN CAS DE COUPLAGE : PART= 0
ES1********* 0.000000000000000E+000
ES2********* 1.30078101158142
ERREUR POINT I 1 ELAY= 9.30078101158142 EST=
1.30078101158142

PLANTE: PROGRAM STOPPED AFTER AN ERROR


Basically the error comes from the init_mixte.f subroutine. I checked out id I made a mistake when I assigned the original thickness of ES1 and ES2 in init_compo_coh.f and also when I assigned the elevation of the rigid bed (ZR) in noerod.f. There were no mistakes. Based on those values, I did a manual debugging in the init_mixte.f subroutine, and it should correct ES2 to 5.30078101158142m so that it matches the total thickness ELAY. This is right done when I launch the simulation on my laptop while it doesn't do so if I launch the simulation in my workstation. Instead it puts ES1 equals to 0m while it should be 4m. And I went through the subroutine and there is no any reason for ES1 to be assigned the value of 0m.

So I do believe that the problem arises from the reading of the Intel Fortran Compiler in the workstation which, despite having the same configuration as for the Intel Fortran Compiler installed in my laptop, gives weird values.

I thought it was initially a problem of Optimization this is why I put:
cmd_obj: ifort -c -O0
which basically means that there is no optimization. But still it is not working.

I am not an expert in configuring Intel Fortran compiler. Does anyone have a clue on what might be the problem or the missing flag in the configuration which makes that compiler not reading correct values?

I know that in theory the reading and compilation of source codes shouldn't be dependent on the compilers you choose, but this is clearly the case here, since running the same simulation is working with one compiler (in my laptop) and not working with the other compiler (in the worksation).

Thank you for your help

Jean-Philippe
The administrator has disabled public write access.
Moderators: borisb

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