- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[sectionBody]
Hello,
I am developing a complicated CFD code. During the development, I found that the codes generated by
Intel Fortran 10 and 11 produced different results, and the code from 11 seems obvious wrong. This puzzled
me for some time. Recently, I was able to reproduce the problem in the following simple code.
The expected output from the code is
1. 1. 1. 1. 1. 1. 1. 1.
-2. -2. -2. -2. -2. -2. -2. -2.
-3. -3. -3. -3. -3. -3. -3. -3.
However, the output with compiler 11 is
-1. -1. -1. -1. -1. -1. -1. -1.
-2. -2. -2. -2. -2. -2. -2. -2.
3. 3. 3. 3. 3. 3. 3. 3.
The problem occurs for win32 and x64 with or without optimization. Is it a bug of the compiler or a bug of our coding.
The compiler I have the problem is 11.0.3451.2005.
Thanks,
Haifeng
----------------------------------------------------------------------module sd_data_mod type mydattype real,pointer :: fld(:,:,:,:) end type mydattype type(mydattype) :: mt end module sd_data_mod program main use sd_data_mod allocate(mt%fld(2,2,2,3)) mt%fld(:,:,:,1) = 1 mt%fld(:,:,:,2) = 2 mt%fld(:,:,:,3) = 3 call view(mt%fld(:,:,:,2:3),2) write(*,'(100f4.0)') mt%fld(:,:,:,1) write(*,'(100f4.0)') mt%fld(:,:,:,2) write(*,'(100f4.0)') mt%fld(:,:,:,3) ! expected correct output are: ! 1. 1. 1. 1. 1. 1. 1. 1. ! -2. -2. -2. -2. -2. -2. -2. -2. ! -3. -3. -3. -3. -3. -3. -3. -3. end program main subroutine view(fld,ns) use sd_data_mod integer :: ns real :: fld(2,2,2,ns) fld = -fld end subroutine view[/sectionBody]-----------------------------------------------------------------------
Link Copied
		6 Replies
	
		
		
			
			
			
					
	
			- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
			
				
					
					
						
With 11.1.046 32-bit I have your expected result. with all options I can think of.
					
				
			
			
				
			
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
			
				
					
					
						
11.0.3451.2005 is not the compiler version - that's the Visual Studio integration version. Please download and install 11.1.046 and try your program again.
					
				
			
			
				
			
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
11.0.3451.2005 is not the compiler version - that's the Visual Studio integration version. Please download and install 11.1.046 and try your program again.
Thenhere is the compiler version I am using: 11.0.061.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
With 11.1.046 32-bit I have your expected result. with all options I can think of.
With w_cprof_p_11.1.046, I have the right result. It seems that this is a compiler bug in the old version, and It has been fixed in the current version. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
			
				
					
					
						
Hi 
Which version has this "bug"?
Abhi
					
				
			
			
				
			
			
			
			
			
			
			
		
		
		
	
	
	
Which version has this "bug"?
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - abhimodak
Hi 
Which version has this "bug"?
Abhi
Which version has this "bug"?
Abhi
I am using w_cprof_p_11.0.061 which gives the error. So at least this version has the problem, and maybe other versions before and after this vresion.
Haifeng
 
					
				
				
			
		
					
					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
