Author Topic: fortran option - the caf or coarrays is confusing  (Read 2486 times)

bruce nelson

  • Guest
fortran option - the caf or coarrays is confusing
« on: November 08, 2017, 11:35:42 pm »
PROBLEM comes from gfortran use in codeblocks. Current release of codeblocks binary release for windows windows 16.01 10 release. entered the following program:

program main
  implicit none
  print *, "Hello from", this_image(), &
    "out of", num_images(), "images."
end program main

following flags were set

From Build messages window:

||=== Build: Debug in compilier (compiler: GNU Fortran Compiler) ===|
c:\fortran\book\page340\compilier\main.f08|5|undefined reference to _gfortran_caf_init'| c:\fortran\book\page340\compilier\main.f08|5|undefined reference to_gfortran_caf_finalize'|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

from Build Log window:

obj\Debug\main.o: In function main': c:/fortran/book/page340/compilier/main.f08:5: undefined reference to_gfortran_caf_init'
c:/fortran/book/page340/compilier/main.f08:5: undefined reference to `_gfortran_caf_finalize'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Debugger window:

Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No symbol table loaded. Use the "file" command.
Debugger finished with status 0

I am running a Dell 17r with an I7-2630qm CPU running at 2.0ghz
 
64-bit  option:  it has 4 cores so capable of running 8 threads

Main: settings: global compiler settings: build settings: number process: is set at 4.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: fortran option - the caf or coarrays is confusing
« Reply #1 on: November 08, 2017, 11:46:21 pm »
Post the full build log if you want to get help. Most probably you're not using gfortran for linking, but gcc or g++.
And please use code or quote tags to wrap pastes of logs and code.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]