[MacPorts] #71230: omp_lib support is missing

MacPorts noreply at macports.org
Sat Nov 2 19:02:33 UTC 2024


#71230: omp_lib support is missing
-----------------------------+----------------------
 Reporter:  loudove          |      Owner:  (none)
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.10.4
 Keywords:  arm64, monterey  |       Port:  flang-19
-----------------------------+----------------------
 Compile the sample code in omp.f90 gives the error. It seems that the
 omp_lib.mod and relevant files are missing from the distribution (are
 presents in flang-18). Tested on macos 12.7.6 - MacBook Air (M1, 2020).

 1) create the test file:
 cat <<EOT >> omp.f90
 program omp
     use omp_lib
     implicit none

     !$omp parallel
         print *, 'Hello from thread ', omp_get_thread_num()
     !$omp end parallel
 end program omp
 EOT

 2) compile with:
 flang-mp-19 -fopenmp -o omp omp.f90

 3) compiler output:
 error: Semantic errors in omp.f90
 ./omp.f90:2:9: error: Cannot read module file for module 'omp_lib': Source
 file 'omp_lib.mod' was not found
       use omp_lib
           ^^^^^^^
 ./omp.f90:6:40: error: No explicit type declared for 'omp_get_thread_num'
           print *, 'Hello from thread ', omp_get_thread_num()
                                          ^^^^^^^^^^^^^^^^^^

-- 
Ticket URL: <https://trac.macports.org/ticket/71230>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list