Questions tagged as 'fortran'

1
answer

Program with problem to compile

I created this program to calculate the IMC, but it does not execute completely. He asks to enter the weight and height, but does not return any results. Could anyone tell me what's wrong? PROGRAM Calc IMPLICIT NONE REAL :: peso, altura,...
asked by 30.11.2017 / 12:55
1
answer

Problem with the PRINT command in FORTRAN 95

I used a OPEN command to open a file, then I used the WRITE command to write a value to the file of type string. However, when I use the PRINT * command, (with the asterisk, which should be the default output for the message...
asked by 29.07.2017 / 04:16
1
answer

What the command means: gfortran -c -03 $

Well, I'm trying to understand a program here that I'm using in my scientific initiation, but with a doubt in a make file. # makefile for code OBJ1 = main.o derivs.o filter.o code: $(OBJ1) gfortran $(OBJ1) -o prg .f.o: gfortran -c -O...
asked by 27.03.2017 / 19:40
2
answers

problems with initialization in graphical mode

I put the Fortran compiler address (ifort) in .bashrc by doing: export PATH=/.../... But after that I could not access the OpenSuse graphical mode. The message given is as follows:    Could not connect to session bus dbus-lauch te...
asked by 25.03.2014 / 15:34
1
answer

How to store information in a file in Python (write)?

Hello, I'm writing a program in Python with a code I have in Fortran. I'm having a problem writing this fortran: do i=1,n write(3,350)r(i),(ener(j)*alfa,j=1,6) !meV end do I tried to write this way in Python: file=open("energia_nll2_R50A...
asked by 17.04.2018 / 15:32
0
answers

How to use f2py using more than one .f90 file and using dassl.f?

I am a beginner in F2PY and am trying to use it in a very complex Fortran program that has several subroutines in separate files and one of them is dassl.f. I believe my problem is with her. Is there any limitation on its use with F2PY? (Use lin...
asked by 09.09.2017 / 15:27
0
answers

PATH and gfortran options

Some gfortran options allow you to include paths to fortran libraries and modules: $ gfortran -c <código fonte> [opções] The functions include -J<path file .mod> , which allows you to indicate the directories of the module...
asked by 06.06.2015 / 19:30
1
answer

Run fortran code requesting data read on jupyter-notebook with python restart kernel

Jupyter notebook restart when you run a fortran code that requests data entry, as follows: Notethattheavariableshouldbeprovidedsoonafterthef1call.However,anerroroccursandthekernelrestart: Note: The code works fine without the statement...
asked by 17.09.2016 / 14:46
1
answer

Get format in which text file was written in FORTRAN

Hello, I need to make a program that reads from an input file that has lines of text written in specific formats and process the read information in order to create an output file with some data of interest. I know all the formats used to write...
asked by 01.02.2018 / 16:31
1
answer

list index out of range - From Fortran to Python

I wrote a program in Fortran and now I'm trying to write it in Python. However, it is giving an error:   (i + 1) = - u_med [i + 1] / (delta_r [i] * delta_r [i + 1])       IndexError: list index out of range I'm a beginner in Python, what...
asked by 23.04.2018 / 04:26