- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						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 1Thanks for the help!
					
				
			
			
				
			
			
			
			
			
			
			
		Link Copied
		6 Replies
	
		
		
			
			
			
					
	
			- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						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.
		
		
	
	
	
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.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						Is there such a thing as GSL support? I thought the whole idea of a GNU library is you're on your own...
					
				
			
			
				
			
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						In one sense, there is no support line similar to those for commercial software, but they have Bugzillas and Usenet newsgroups for GNU software !
					
				
			
			
				
			
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						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 1Could 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.
					
				
			
			
				
			
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						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.
		
		
	
	
	
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.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
			
				
					
					
						I found all the bugs.
		
		
	
	
	
Thanks!
					
				
			
			
				
			
			
			
			
			
			
			
		
					
					Reply
					
						
	
		
				
				
				
					
						
					
				
					
				
				
				
				
			
			Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
 - Mark Topic as New
 - Mark Topic as Read
 - Float this Topic for Current User
 - Bookmark
 - Subscribe
 - Printer Friendly Page