Question
Linux Ubuntu 18.04 LTS Programing language Fortran. Compiler gfortran ! Compile and execute a fortran program on LINUX ! By using a scripts that manage
Linux Ubuntu 18.04 LTS
Programing language Fortran. Compiler gfortran !
Compile and execute a fortran program on LINUX ! By using a scripts that manage the directions and so on.
Descprition : I have a repository 'package' (lets call it "A") , inside of it, there is 4 other repositories : lets call them B, C, D, & E . I m interested in one of these 4 repositories, the C one. Inside of this 'C' repository, there is 2 repositories 'F' & 'G', 2 other scripts and a little Readme txt . (see the readme to know what it says, and how we should compile and execute our program '.f77' ) The program ".f77" is in the 'F' repository, with other programs '.f77' .
The question is how I should compile and start the program according to the readme text ?
What commands should I use on my terminal ?
Thanks for help !
Below the pictures of the repositories and scripts.
1 ) picture of the general repository !
2) then we go inside to see the new repository
3 ) The readme file
4 ) the script 'job'
5 ) the script 'make_testat
6) and the main program "*****.f" inside the repository "routines"
So, How to compile and have results ? please help.
Package CRP-NW 100 ROUTINES Name CRP-N2W100 CRP-NW 100 LIBRARY SUBORION N2morse.dat op nents loads Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme nts ads Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme ments bads Gave E readme Open A /Desktop/piscine fortran/Package/CRP-NW100 Save 1 The program "testat" allows to calculate 2 the potential for a given value of 3 the coordinates. 4 It is compiled by using the script "make_testat" 5 and started by the command "job testat", 6 which uses the script "job". 9 At the beginning of each script, a section defines 10 the location of the files. blin 11 Change the argument according to the directory 12 structure on the computer used. Loci 13 14 Please check that the gfortran compiler is correctly 15 set up on your computer or use another compiler. 16 Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme Size 8 items 5 items bebytes 647 bytes 480 bytes nts ads Open A job /Desktopiscine_fortran/Package/CRP-NW100 job readme 1 # Computer dependent settings: 3 # Localisation of PES's repository: 5 PESS=-/Desktop/piscine_fortran/Package/CRP-NW100 8 #---- in 9 # Localization of data files 10 DATA=$PESS/DATA Sci 11 12 cp $DATA/hole.dat . 13 cp $DATA/bridge.dat . 14 cp $DATA/topp.dat . 15 cp $DATA/topm.dat . 16 cp $DATA/brihol.dat . 17 cp $DATA/tophol.dat 18 cp $DATA/topbri.dat . 19 cp $DATA/intrep.dat . 20 21 $1 23 rm hole.dat 24 cm bridge.dat 25 rm topp.dat 26 rm topm.dat 27 rm brihol.dat 28 cm tophol.dat 29 rm topbri.dat 30 rm intrep.dat Package CRP-NW 100 ROUTINES cecent Home esktop Name DATA ROUTINES job make_testat i readme ocuments ownloads mi Open make_testat /Desktop/piscine fortran/Package/CRP-NW 100 Save il 1 -1, 2 # Computer dependent settings: 4 # Localisation of PES's repository: 6 PESS=-/Desktop/piscine_fortran/Package CRP-NW100 7 PESS1 =-/Desktop/piscine_fortran/Package in 9#-- 10 # Localization of library routines. $ 11 # PES specific routines: 12 BIBLI=$PESS1/LIBRARY t 13 # Standard utility routines: 14 ORION=$PESS1/SUBORION 15 16 # Localisation of atom/surface routines. 17 ATOM=$PESS/ROUTINES 18 19 ATOMIC="$ATOM/lectatom. f $ATOM/at3D2.f SATOM/mur 3D2.f" 20 21 PGM="SBIBLI/dplcoft.f $BIBLI/splint.f $BIBLI/origen 100.f" 23 STD="SORION/dsplin.f SORION/tridia.f" 25 gfortran SATOM/testat.f -03 ATOMIC $PGM $STD -otestat.exe 26. Package CRP-NW 100 ROUTINES >> Recent Home Desktop Name at3D2.f lectatom.f mur 3D2.F pot3D.F testat.f Documents Save testat.f - /Desktop/piscine_fortran/Package/CRP-NW100/ROUTINES Calculation of potential at a given point IMPLICIT NONE DOUBLE PRECISION delta COMMON/SURF/delta LOGICAL fin INTEGER I,Ntot DOUBLE PRECISION xa, ya,za, v,dvdx, dvdy,dvdz, Zmin, Zmax CALL LECTATOM WRITE(*, *) 'xa, ya (units of delta)?' READ(*,*) xa,ya WRITE(*,*) 'Ntot, Zmin, Zmax (angstrom) READ(*,*) Ntot,Zmin, Zmax xa=xa*delta ya=ya*delta OPEN(UNIT=1, FILE='SEPN.dat', STATUS='UNKNOWN'), DO I=1,Ntot za=Zmin+DFLOAT(I-1)*((Zmax-Zmin)/(DFLOAT(Ntot))) CALL AT3D2(xa, ya,za,v, dvdx, dvdy,dvdz,fin), WRITE(1,*) za, v WRITE(*, *) 'Potential: ',v,' (ev)' WRITE(*, *) 'Derivatives: , X:', dvdx,' Y: ', dvdy, ' z :', dvdz, ! (eV/Ang)' ENDDO END Fortran 95 Tab Width: 5 Ln 6, Col 24 Package CRP-NW 100 ROUTINES Name CRP-N2W100 CRP-NW 100 LIBRARY SUBORION N2morse.dat op nents loads Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme nts ads Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme ments bads Gave E readme Open A /Desktop/piscine fortran/Package/CRP-NW100 Save 1 The program "testat" allows to calculate 2 the potential for a given value of 3 the coordinates. 4 It is compiled by using the script "make_testat" 5 and started by the command "job testat", 6 which uses the script "job". 9 At the beginning of each script, a section defines 10 the location of the files. blin 11 Change the argument according to the directory 12 structure on the computer used. Loci 13 14 Please check that the gfortran compiler is correctly 15 set up on your computer or use another compiler. 16 Package CRP-NW 100 ROUTINES Name DATA ROUTINES job make_testat i readme Size 8 items 5 items bebytes 647 bytes 480 bytes nts ads Open A job /Desktopiscine_fortran/Package/CRP-NW100 job readme 1 # Computer dependent settings: 3 # Localisation of PES's repository: 5 PESS=-/Desktop/piscine_fortran/Package/CRP-NW100 8 #---- in 9 # Localization of data files 10 DATA=$PESS/DATA Sci 11 12 cp $DATA/hole.dat . 13 cp $DATA/bridge.dat . 14 cp $DATA/topp.dat . 15 cp $DATA/topm.dat . 16 cp $DATA/brihol.dat . 17 cp $DATA/tophol.dat 18 cp $DATA/topbri.dat . 19 cp $DATA/intrep.dat . 20 21 $1 23 rm hole.dat 24 cm bridge.dat 25 rm topp.dat 26 rm topm.dat 27 rm brihol.dat 28 cm tophol.dat 29 rm topbri.dat 30 rm intrep.dat Package CRP-NW 100 ROUTINES cecent Home esktop Name DATA ROUTINES job make_testat i readme ocuments ownloads mi Open make_testat /Desktop/piscine fortran/Package/CRP-NW 100 Save il 1 -1, 2 # Computer dependent settings: 4 # Localisation of PES's repository: 6 PESS=-/Desktop/piscine_fortran/Package CRP-NW100 7 PESS1 =-/Desktop/piscine_fortran/Package in 9#-- 10 # Localization of library routines. $ 11 # PES specific routines: 12 BIBLI=$PESS1/LIBRARY t 13 # Standard utility routines: 14 ORION=$PESS1/SUBORION 15 16 # Localisation of atom/surface routines. 17 ATOM=$PESS/ROUTINES 18 19 ATOMIC="$ATOM/lectatom. f $ATOM/at3D2.f SATOM/mur 3D2.f" 20 21 PGM="SBIBLI/dplcoft.f $BIBLI/splint.f $BIBLI/origen 100.f" 23 STD="SORION/dsplin.f SORION/tridia.f" 25 gfortran SATOM/testat.f -03 ATOMIC $PGM $STD -otestat.exe 26. Package CRP-NW 100 ROUTINES >> Recent Home Desktop Name at3D2.f lectatom.f mur 3D2.F pot3D.F testat.f Documents Save testat.f - /Desktop/piscine_fortran/Package/CRP-NW100/ROUTINES Calculation of potential at a given point IMPLICIT NONE DOUBLE PRECISION delta COMMON/SURF/delta LOGICAL fin INTEGER I,Ntot DOUBLE PRECISION xa, ya,za, v,dvdx, dvdy,dvdz, Zmin, Zmax CALL LECTATOM WRITE(*, *) 'xa, ya (units of delta)?' READ(*,*) xa,ya WRITE(*,*) 'Ntot, Zmin, Zmax (angstrom) READ(*,*) Ntot,Zmin, Zmax xa=xa*delta ya=ya*delta OPEN(UNIT=1, FILE='SEPN.dat', STATUS='UNKNOWN'), DO I=1,Ntot za=Zmin+DFLOAT(I-1)*((Zmax-Zmin)/(DFLOAT(Ntot))) CALL AT3D2(xa, ya,za,v, dvdx, dvdy,dvdz,fin), WRITE(1,*) za, v WRITE(*, *) 'Potential: ',v,' (ev)' WRITE(*, *) 'Derivatives: , X:', dvdx,' Y: ', dvdy, ' z :', dvdz, ! (eV/Ang)' ENDDO END Fortran 95 Tab Width: 5 Ln 6, Col 24Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started