Intel® Fortran Compiler for Linux* and Mac OS X*

Bogus error with PROTECTED attribute


there is a strange problem when the PROTECTED attribute is used before the actual variable declaration.


module ifc_protected
  implicit none
  public :: x
  protected :: x  ! Error here
  real      :: x
  protected :: x  ! OK here
end module ifc_protected

With the Intel v15 compiler I get:


Hi all I am using the following code to create a new file PROGRAM TEST_IO INTEGER*4 UNIT,IOS OPEN (UNIT=119, FILE = '$HOME/compile.log', IOSTAT = IOS, - STATUS = 'NEW', RECL = 132, FORM = 'FORMATTED', - RECORDTYPE = 'VARIABLE', ORGANIZATION = 'SEQUENTIAL', - CARRIAGECONTROL = 'FORTRAN') PRINT *,IOS END PROGRAM Here HOME(/home/my_name) is an environment variable.When I execute this code I am always getting the IOS as 46.Without using a function to get the value of the environment variable, Can I solve this issue?

OpenMPI 1.10.0 built with Intel Parallel Studio XE 2016


I have built Open MPI 1.10.0 using Intel compilers 16.0.0.
When I am trying to compile the following test code:

  program testmpi
    use mpi
    implicit none

    integer :: pid
    integer :: ierr
    integer :: tok

    call mpi_init(ierr)
    call mpi_comm_rank(mpi_comm_world, pid,ierr)
    if(pid==0) then
       tok = 1
       tok = 0
    end if
    call mpi_bcast(tok,1,mpi_integer,0,mpi_comm_world,ierr)
    call mpi_finalize(ierr)
  end program testmpi

I get the following error message:

Traceback line numbers do not match source line numbers


I have an example where lines reported in the traceback on an error do not match source line numbers. The same mismatch exists between gdb line numbers and the source file. The mismatch starts midway through the main file, and it is occurring in at least one linked module file. 

This is the first time I've seen such an example, and I haven't noticed it in any other version of the code using the same module files. I made a clean compile with -c -r8 -heap-arrays -g -debug -traceback -O0 -check all -ftrapuv -fp-stack-check -fpe0 -gen-interfaces -warn interfaces -p. 

Behavior of function-returned array pointers of dynamic size

I'm trying to use array pointers as an output from a function. The pointer target is a function variable whose size is not fixed. I've noticed that when using these returned pointers in other parts of the code, the values the pointer refers to are somewhat corrupted.

I've provided in the code below an example of what I'm talking about. The three different test functions differ based on how the return array size is assigned. For the code below, these are

forrtl: severe (64): input conversion error

This may be a simple obstacle but I am clueless to resolve it.
Thank you in advance to help me to fix it.

Below is my section of code, I am getting the  error in line 2 of which I have no idea of its origin.

1.   READ(14,*) IFRAME ! !.. Actual # of MC moves
2.   READ(14,*) N_Si      ! !.. Number of Si atoms
3.   READ(14,*) N_O2     ! !.. Number of Bridging oxygens (BO)
4.   READ(14,*) N_Ox     ! !.. Number of Non-reactive OH

write format problem ( real )

hello, all

I write a simple program for writing real variable.

But  case1 and case 2 has some space in front of the number.

Then I tried using 0PF0.4 format, but it removed the number zero.

Finally I changed real variable to character and print it.

Is there any other way to remove the space before number with number zero?


REAL :: e=0.1425
CHARACTER(LEN=10) :: rstr1

Error related to absent optional argument

The following code is a simplified version of another example posted by "Simon" on the Silverfrost Fortran Forum, see . My reading of the Fortran 2008 standard, section indicates that the code is not conforming since the two elements of array j, which is not present, are referenced in Line-10. Gfortran 4.7 and 5.2 stop with a seg-fault on line-21.

Compiler Warnings when using linkers -- Noob Question

Hello All, 

I am very unaware of certain compiler errors and warnings, but my advisor has recruited me to fix a problem for him. After scouring the web and stackoverflow, I am very unsure of what to do...I will show a compilation and the errors associated. I apologize for how rudimentary this is, but I have no knowledge on this. 

Intel® Fortran Compiler for Linux* and Mac OS X* abonnieren