I have just installed Ubuntu 18.04 LTS on my laptop and I'm new to this. I am required to run my Model which is called IBIS, so I have to install g77 or f77. I could not install these compilers. Finally, I installed fort 77. Then, I am trying to compile my Model with the NetCDF library. The environment variable which is needed to compile my model is: F77, F77_OPTIONS, INCLUDE_DIRS, LD_OPTIONS_NETCDF
Could anybody help me how can I determine these variable?
I do not know the software you mention, IBIS, but the environment variables you mention indicate that you have to build the software using a makefile. Typically, such a makefile is parameterised to make things flexible. Here is my guess at the meaning:
F77 - the Fortran (or better FORTRAN) compiler you want to use. That will be "ifort" (without the quotation marks), make sure that ifort is in your PATH.
F77_OPTIONS - any additional options, like -g for debugging or -O2 for optimisation and the like
INCLUDE_DIRS - that could be anything, but I guess the directories that contain your extra included files.
LD_OPTIONS_NETCDF - presumably the option to indicate where the NetCDF library are stored
One way to deal with the problem of finding the right values is to first set the F77 variable and then run make. Detect from the error messages what is now missing and use the above indications to set the remaining environment variables.
Or consult the documentation or the user community of this software :).
Thank you for answering my question. I have just understood how to determine these variables (INCLUDE_DIRS and LD_OPTIONS_NETCDF) with your help but unfortunately, I have not understood how to determine these variables (F77 and F77_OPTIONS) yet. I have sent a file to you. you maybe understand what are these 2 variables.
Fairly clear: the makefile contains settings for a bunch of compilers, not of course for Intel Fortran.
But by the looks of it:
F77 = ifort
should do it.
Edit the makefile directly though, do not set environment variables in the shell and then run make, as you would have to know what takes precedence - these environment variables or the variables explicitly set in the makefile. (I do not, myself :))
I think that "fort 77" is just a script that allows you to use the AT&T f2c Fortran-to-C converter. The converter was great for the 90s, when there were few free Fortran compilers for PCs, but it is very much dated now. You may be able to modify the makefiles or other scripts that come with your IBIS software so as to use Intel Fortran or Gfortran instead, and that will work far better than f2C.
Thank you very much for answering my question. I have installed gfortran and gcc in my Linux. I, actually, do not know what is Intel Fortran and I have not installed it. My major question is how can I determine these 2 variables (F77 , F77_OPTIONS ). Do you know anything about them?
Now you have me puzzled. If you do not know what Intel Fortran is and you have not installed it at all, why then do you go to a forum dedicated to the Intel Fortran compiler?
ifort is the command/program that drives the compiler. Other such commands are: g77, f77 (both old stuff, geared to the FORTRAN 77 standard), gfortran, nagfor, pgifort, ifort (more modern compilers supporting the later Fortran standards).
To try and answer your question in different words:
The variable F77 in the makefile is the command that drives the compiler. In your case that would be gfortran.
The variable F77_OPTIONS in the makefile is the list of options you want to add. In your case I would leave it empty. In general no specific options are required. They can tune the compiler, but that is a whole different matter than simply building the program initially.
If you seek general advice on Fortran, there is the newsgroup and other resources on the Internet.
Do you mean that F77=gfortran or fort77?
Actually, I saw a question that is similar to mine (in a link below). Then, I joined the Intel Community. Maybe someone will answer my question. I'm new to Fortran.
Thank you for your help.
This netCDF-Fortran 4.4.4 has been built with the following features:
--cc -> gcc
--cflags -> -I/usr/include -Wdate-time -D_FORTIFY_SOURCE=2
--fc -> gfortran
--fflags -> -I/usr/include
--flibs -> -L/usr/lib -lnetcdff -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--prefix -> /usr
--version -> netCDF-Fortran 4.4.4