Skip to content

Workarounds for the PGI compiler #107

Open
@certik

Description

I am using PGI 18.10 and the latest master (f300f4a):

  1. It does not support error stop and stderr:
--- a/src/f08estop.f90
+++ b/src/f08estop.f90
@@ -19,22 +19,22 @@ module procedure error_stop
 !
 ! call error_stop("Invalid argument")
 
-write(stderr,*) msg
+write(*,*) msg
 
 if(present(code)) then
   select case (code)
   case (1)
-    error stop 1
+    stop 1
   case (2)
-    error stop 2
+    stop 2
   case (77)
-    error stop 77
+    stop 77
   case default
-    write(stderr,*) 'ERROR: code ',code,' was specified.'
-    error stop
+    write(*,*) 'ERROR: code ',code,' was specified.'
+    stop
   end select
 else
-  error stop
+  stop
 endif
 end procedure
  1. It does not support qp and it can't even declare real(qp) (it says "kind must be positive", but it is negative because qp is not supported). So one has to remove all qp code. How to implement same procedures for different numeric kinds #35 will fix this.

  2. Then there is an internal compiler error that I haven't figured out yet what causes it:

[ 73%] Building Fortran object src/tests/io/CMakeFiles/test_open.dir/test_open.f90.o
PGF90-F-0000-Internal compiler error. interf:new_symbol, symbol not found     629  (/users/certik/repos/stdlib/src/tests/io/test_open.f90: 4)
PGF90/x86-64 Linux 18.10-0: compilation aborted

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions