Menu

#41 open function cause "segmentation violation error"

closed
None
5
2016-05-25
2015-03-17
Jinny
No

Hello,

Recently, I have a simple unit test with open function called. It doesn't compile successfully with error said "/tmp/ifortY6TnRB.i90: catastrophic error: Internal compiler error: segmentation violation signal raised Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error."

I have a very simple test file which could reproduce the same compile error:

@test
subroutine testOpen()
  use pfunit_mod
  implicit none
  open(unit=1234, iostat=errcode, file="./test.par", status='old')
  @assertEqual("Hello   World!", "Hello World!  ",whitespace=IGNORE_DIFFERENCE)
end subroutine testOpen

I compiled in MPI mode with intel-MPI 4.1.0.030 and Intel compiler 14.0.0.080

Discussion

  • Tom Clune

    Tom Clune - 2015-03-18

    I am on travel, so I may not be able to investigate more until the weekend.

    I will note that regardless of any issues in pfunit, this error also means that there is a problem in that version of intel’s compiler. (Internal compiler errors are never wrong, but there is often a workaround.) In this case the ICE is probably not in your source code per se, but rather in the boiler plate code that the preprocessor appends to at the end of the file. (At least that has been our experience, when investigating similar issues.)

    In the meantime, do you have access to a more recent intel compiler, you may find the problem is already fixed. For our regression tests we use 14.0.2 and 15.0.2. Many OO features are still a bit fragile, and but we’ve generally been quite productive with those versions.

     
  • Tom Clune

    Tom Clune - 2015-03-22

    Hi Jinny,

    Good news - although there is a problem with the Intel compiler in your example, I think it is just choking due to some minor errors in your code.

    First, you did not declare the local variable "err code". Second, the option for whitespace should have been plural: IGNORE_DIFFERENCES (i.e. an extra 'S').

    My 15.0 compiler diagnosed these issues without the internal compiler error. There as a reasonable chance that if you fix those that your example will work with the 14.0 compiler. (I don't readily have access to that version to test with.)

    Note that similar minor errors may cause additional internal compiler errors as you proceed, so upgrading the compiler is still a good precaution.

    Cheers,

    • Tom
     
  • Tom Clune

    Tom Clune - 2016-05-25
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB