Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

[FGSL] [Brent's method]

ignacio82
Beginner
1,137 Views
I'm trying to use FGSL to maximize a function.
When compiling I get the following error:
ifort -L/share/apps/contrib/fgsl/intel12/lib64 -o dissertation.X agents.o dissertation.o -lfgsl_ifort -lgsl -lgslcblas
agents.o: In function `agents_mp_c_child_':
agents.f90:(.text+0x2f8b): undefined reference to `m_'
make: *** [dissertation.X] Error 1
ifort -L/share/apps/contrib/fgsl/intel12/lib64 -o dissertation.X agents.o dissertation.o -lfgsl_ifort -lgsl -lgslcblasagents.o: In function `agents_mp_c_child_':agents.f90:(.text+0x2f8b): undefined reference to `m_'make: *** [dissertation.X] Error 1
Thanks for the help!
0 Kudos
6 Replies
mecej4
Honored Contributor III
1,137 Views
Please contact GSL support. The source code that you provided has many bugs in it and cannot be compiled; nor would one want to divine the intent of the programmer by reading the code.

Packing parameters of the same type into an array is the standard method of passing parameters to a solver that calls user-defined functions. However, one can only pass such parameters if the solver interface is designed to accept them. If it is not, you will have to add this capability using the source code of the solver, or (error-prone and not recommended) pass the parameters through a COMMON block or a shared module.

Usually, two or more arrays are used: for integer parameters, for real/double parameters, and others. You can use the debugger/WRITE statements to check whether the user-defined function is receiving the proper parameters.
0 Kudos
Steven_L_Intel1
Employee
1,137 Views
Is there such a thing as GSL support? I thought the whole idea of a GNU library is you're on your own...
0 Kudos
mecej4
Honored Contributor III
1,137 Views
In one sense, there is no support line similar to those for commercial software, but they have Bugzillas and Usenet newsgroups for GNU software !
0 Kudos
ignacio82
Beginner
1,137 Views
I made progress fixing a lot of the bugs but now I'm getting this when trying to compile
ifort -L/share/apps/contrib/fgsl/intel12/lib64 -o dissertation.X agents.o dissertation.o -lfgsl_ifort -lgsl -lgslcblas
agents.o: In function `agents_mp_c_child_':
agents.f90:(.text+0x2f8b): undefined reference to `m_'
make: *** [dissertation.X] Error 1
ifort -L/share/apps/contrib/fgsl/intel12/lib64 -o dissertation.X agents.o dissertation.o -lfgsl_ifort -lgsl -lgslcblasagents.o: In function `agents_mp_c_child_':agents.f90:(.text+0x2f8b): undefined reference to `m_'make: *** [dissertation.X] Error 1
Could someone explain me whatthat erroris?
Thanks!
PS: I could't find bugzilla nor usenet for FGSL. If you have a link i would appreciate it.
0 Kudos
mecej4
Honored Contributor III
1,137 Views
It is likely that you have used the variable m with a subscript in one or more places in agents.f90 but there is no corresponding declaration of m as an array.

An "undefined external" linker error naming a symbol that you know to be a variable (rather than a function name) is a telltale sign of a missing array declaration.
0 Kudos
ignacio82
Beginner
1,137 Views
I found all the bugs.
Thanks!
0 Kudos
Reply