[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ptp-user] Unresolved references in Eclipse PTP IDE
|
I've installed Eclipse PTP Version: 2018-09 (4.9.0), Build id:
20180917-1800 on a Mac Pro (Late 2013, desktop) running Mac OS X
ver. 10.12.6 (Sierra). I've been able to figure out how to set
most of the compiler options needed to run gfortran from within
Eclipse. I'm attempting to run a simple example that uses OpenMP.
See the file hello_openmp.f90 attached to this file.
The problem I'm having is how to resolve the unresolved
references as indicted below.
02:30:33 **** Build of configuration Release
for project Hello_OpenMP ****
make all
Building file: ../src/hello_openmp.f90
Using built-in specs.
Invoking: GNU Fortran Compiler
/usr/local/bin/gfortran -funderscoring
-I/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/
-I/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include
-I/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-O3 -Wall -c -fmessage-length=0 -fopenmp -v -o
"src/hello_openmp.o" "../src/hello_openmp.f90"
COLLECT_GCC=/usr/local/bin/gfortran
Target: x86_64-apple-darwin16.7.0
Configured with: ../configure
--build=x86_64-apple-darwin16.7.0
--prefix=/usr/local/Cellar/gcc/8.2.0
--libdir=/usr/local/Cellar/gcc/8.2.0/lib/gcc/8
--enable-languages=c,c++,objc,obj-c++,fortran
--program-suffix=-8 --with-gmp=/usr/local/opt/gmp
--with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-checking=release
--with-pkgversion='Homebrew GCC 8.2.0'
--with-bugurl=https://github.com/Homebrew/homebrew-core/issues
--disable-nls
Thread model: posix
gcc version 8.2.0 (Homebrew GCC 8.2.0)
COLLECT_GCC_OPTIONS='-funderscoring' '-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude'
'-O3' '-Wall' '-c' '-fmessage-length=0' '-fopenmp' '-v' '-o'
'src/hello_openmp.o' '-mmacosx-version-min=10.12.0'
'-asm_macosx_version_min=10.12' '-mtune=core2'
/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin16.7.0/8.2.0/f951
../src/hello_openmp.f90 -I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-fPIC -quiet -dumpbase hello_openmp.f90
-mmacosx-version-min=10.12.0 -mtune=core2 -auxbase-strip
src/hello_openmp.o -O3 -Wall -version -funderscoring
-fmessage-length=0 -fopenmp -fintrinsic-modules-path
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-o
/var/folders/65/7cxpqns144q6wx5lyb7zcyh80000gq/T//ccO12HNa.s
GNU Fortran (Homebrew GCC 8.2.0) version 8.2.0
(x86_64-apple-darwin16.7.0)
compiled by GNU C version 8.2.0, GMP version 6.1.2,
MPFR version 4.0.1, MPC version 1.1.0, isl version
isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072
GNU Fortran2008 (Homebrew GCC 8.2.0) version 8.2.0
(x86_64-apple-darwin16.7.0)
compiled by GNU C version 8.2.0, GMP version 6.1.2,
MPFR version 4.0.1, MPC version 1.1.0, isl version
isl-0.20-GMP
GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-funderscoring' '-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude'
'-O3' '-Wall' '-c' '-fmessage-length=0' '-fopenmp' '-v' '-o'
'src/hello_openmp.o' '-mmacosx-version-min=10.12.0'
'-mtune=core2'
as -arch x86_64 -v -I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-force_cpusubtype_ALL -mmacosx-version-min=10.12 -o
src/hello_openmp.o
/var/folders/65/7cxpqns144q6wx5lyb7zcyh80000gq/T//ccO12HNa.s
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
-cc1as -triple x86_64-apple-macosx10.12.0 -filetype obj
-main-file-name ccO12HNa.s -target-cpu penryn -I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-fdebug-compilation-dir
/Users/user/eclipse-workspace/Hello_OpenMP/Release
-dwarf-debug-producer Apple LLVM version 9.0.0
(clang-900.0.39.2) -I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include
-I
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude
-dwarf-version=4 -mrelocation-model pic -o src/hello_openmp.o
/var/folders/65/7cxpqns144q6wx5lyb7zcyh80000gq/T//ccO12HNa.s
COMPILER_PATH=/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin16.7.0/8.2.0/:/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin16.7.0/8.2.0/:/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin16.7.0/:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/
LIBRARY_PATH=/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/../../../
COLLECT_GCC_OPTIONS='-funderscoring' '-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/include'
'-I'
'/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin16.7.0/8.2.0/finclude'
'-O3' '-Wall' '-c' '-fmessage-length=0' '-fopenmp' '-v' '-o'
'src/hello_openmp.o' '-mmacosx-version-min=10.12.0'
'-mtune=core2'
Finished building: ../src/hello_openmp.f90
Building target: Hello_OpenMP
Invoking: MacOS X Fortran Linker
/usr/local/bin/gfortran -o "Hello_OpenMP"
./src/hello_openmp.o
Undefined symbols for architecture x86_64:
"_GOMP_parallel", referenced from:
_MAIN__ in hello_openmp.o
"_omp_get_max_threads_", referenced from:
_MAIN__ in hello_openmp.o
"_omp_get_num_procs_", referenced from:
_MAIN__ in hello_openmp.o
"_omp_get_thread_num_", referenced from:
_MAIN__._omp_fn.0 in hello_openmp.o
_MAIN__ in hello_openmp.o
"_omp_get_wtime_", referenced from:
_MAIN__ in hello_openmp.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [Hello_OpenMP] Error 1
02:30:34 Build Failed. 2 errors, 0 warnings. (took
1s.615ms)
Any thoughts?
Sam Dupree.
|
program main
!*****************************************************************************80
!
!! MAIN is the main program for HELLO.
!
! Discussion:
!
! HELLO is a "Hello, World" program for OpenMP.
!
! Licensing:
!
! This code is distributed under the GNU LGPL license.
!
! Modified:
!
! 23 June 2010
!
! Author:
!
! John Burkardt
!
use omp_lib
implicit none
integer ( kind = 4 ) id
real ( kind = 8 ) wtime
write ( *, '(a)' ) ' '
write ( *, '(a)' ) 'HELLO_OPENMP'
write ( *, '(a)' ) ' FORTRAN90/OpenMP version'
wtime = omp_get_wtime ( )
write ( *, '(a,i8)' ) &
' The number of processors available = ', omp_get_num_procs ( )
write ( *, '(a,i8)' ) &
' The number of threads available = ', omp_get_max_threads ( )
!
! OUTSIDE THE PARALLEL REGION, have each thread say hello (there's only 1).
!
id = omp_get_thread_num ( )
write ( *, '(a)' ) ' '
write ( *, '(a)' ) ' OUTSIDE the parallel region.'
write ( *, '(a)' ) ' '
write ( *, '(a,i8,a,i8)' ) ' HELLO from process ', id
write ( *, '(a)' ) ' '
write ( *, '(a)' ) ' Going INSIDE the parallel region:'
write ( *, '(a)' ) ' '
!
! INSIDE THE PARALLEL REGION, have each thread say hello.
!
!$omp parallel &
!$omp private ( id )
id = omp_get_thread_num ( )
write ( *, '(a,i8,a,i8)' ) ' HELLO from process ', id
!$omp end parallel
!
! Finish up by measuring the elapsed time.
!
wtime = omp_get_wtime ( ) - wtime
write ( *, '(a)' ) ' '
write ( *, '(a)' ) ' Back OUTSIDE the parallel region.'
write ( *, '(a)' ) ' '
write ( *, '(a,g14.6)' ) ' Elapsed wall clock time = ', wtime
!
! Terminate.
!
write ( *, '(a)' ) ' '
write ( *, '(a)' ) 'HELLO_OPENMP'
write ( *, '(a)' ) ' Normal end of execution.'
stop
end