Compiling F77 vs ifort FC: Troubleshooting Nray

  • Thread starter Milentije
  • Start date
In summary, the conversation is about compiling and running a program called nray, which involves using the ifort compiler and various flags to create an executable file. The program includes a subroutine called backproj, which is supposed to fill a file but is not currently doing so. The code for the backproj subroutine is also provided.
  • #1
Milentije
48
0
FC= ifort
LD = ifort -align all
FCFLAGS = -O2 -g -ipo -traceback -warn noalign
LDFLAGS = $(FCFLAGS)

# Executables
nray: main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o
$(FC) $(LDFLAGS) $(FCFLAGS) -o nray main.o findnode.o plots.o segmnt.o empty.o aldone.o erase.o pcolor.o box.o plot.o axtick.o axis.o line.o pltsrcbox.o find.o dot.o grad.o intersect.o straight.o backproj.o ddtime.o kernel.o resolution.o plotnd.o bndinterpret.o time.o
main.o:main.f ray.par ray.com
$(FC) $(FCFLAGS) -c main.f
For example subroutine backproj.o is compiled but I when I ran nray,it doesn't fill the file it is supposed to do.
 
Technology news on Phys.org
  • #2
§§ COMUpdateI have added what is in backproj.f §§ --- README.md §§ 1020++Backproj.f++ SUBROUTINE BACKPROJ(FROMNODE,TONODE,X,Y,DIST,T)C Program: BackprojC Author: Robert A. HegbloomC Date: April 24, 1991C Purpose: To back project a ray from the TO node to theC FROM node and calculate the travel time.CC Variables:C FROMNODE--The FROM node number.C TONODE---The TO node number.C X--------The X coordinate of the TO node.C Y--------The Y coordinate of the TO node.C DIST-----The distance from the FROM node to the TO node.C T--------The travel time from the FROM node to the TO node.C IMPLICIT NONE INTEGER FROMNODE,TONODE REAL X,Y,DIST,T LOGICAL LCC Calculate the travel time. CALL DDTIME(L,FROMNODE,TONODE,X,Y,DIST,T)C RETURN END
 

Related to Compiling F77 vs ifort FC: Troubleshooting Nray

1. What is the difference between F77 and ifort FC?

F77 and ifort FC are both programming languages used for scientific computing, but they have different origins and syntax. F77 is the original version of the Fortran programming language, while ifort FC is the Intel Fortran Compiler. Ifort FC is an updated version of F77 with additional features and optimizations.

2. Why would I encounter issues when compiling Nray with F77 or ifort FC?

Compiling Nray with F77 or ifort FC can result in issues due to differences in syntax and compatibility. Nray may have been written in F77 or require specific compiler options that are not supported by ifort FC. Additionally, the ifort FC compiler may have stricter error checking, which can result in errors during the compilation process.

3. How can I troubleshoot issues when compiling Nray with F77 or ifort FC?

If you encounter issues when compiling Nray with F77 or ifort FC, there are several troubleshooting steps you can take. First, check the compiler options and make sure they are compatible with the version of F77 or ifort FC you are using. You can also try using a different compiler or updating to a newer version of F77 or ifort FC. Additionally, checking for any syntax errors in the Nray code may help resolve the issue.

4. Can I use both F77 and ifort FC in the same program?

Yes, it is possible to use both F77 and ifort FC in the same program. However, this may require some modifications to the code and careful management of compiler options. It is recommended to stick to one compiler for consistency and to avoid compatibility issues.

5. Are there any benefits to using ifort FC over F77 for compiling Nray?

Using ifort FC over F77 for compiling Nray may provide some benefits, such as improved performance and access to newer features. However, this may vary depending on the specific code and compiler options used. It is recommended to benchmark and compare the performance of both compilers before deciding which one to use.

Similar threads

  • Programming and Computer Science
Replies
1
Views
2K
Back
Top