(Solved) : Compile Fortran Program Linux Compile Fortran Program Script Linux Descprition Repository Q43943270 . . .
Compile a fortran program on LINUX !!
How to compile a Fortran program with an other script (onLINUX).
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 Cone. Inside of this ‘C’ repository, there is 2 repositories ‘F’& ‘G’, 2 other scripts and a little Readme txt . (see thereadme to know what it says, and how we should compile and executeour program ‘.f77’ ) The program “.f77” is in the ‘F’ repository,with other programs ‘.f77’ .
The question is how I should compile and start the programaccording to the readme text ?
What commands should I use ?
Thanks for help.
Below the pictures of the repositories and scripts.
1 Package CRP-NW100 ROUTINES Name t | CRP-N2W100 CRP-NW100 op LIBRARY | SUBORION nents N2morse.dat loads Package CRP-NW100 ROUTINES Name DATA ROUTINES | job make_testat ents readme se Package CRP-NW100 ROUTINES Name DATA ROUTINES l job make_testat nents i readme bads гeadme Open Save -/Desktop/piscine_fortran/Package/CRP-NW100 1 The program “testat” allows to calculate es 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”. г… 7 9 At the beginning of each script, a section defines 10 the location of the files. oling 11 Change the argument according to the directory 12 structure on the computer used. Loc 13 14 Please check that the gfortran compiler is correctly 15 set up on your computer or use another compiler. 16 Ш Package CRP-NW100 ROUTINES Size Name 8 items DATA 5 items ROUTINES G job 521 bytes -nts O make_testat 647 bytes readme 480 bytes ads job –/Desktop/piscine_fortran/Package/CRP-NW100 Open Save job readme 1 # Computer dependent settings: 2 3 # Localisation of PES’s repository: 5 PESS=~/Desktop/piscine_fortran/Package/CRP-NW100 6. ing 9 # Localization of data files 10 DATA=ŞPESS/DATA 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 22 23 rm hole.dat 24 rm bridge.dat 25 rm topp.dat 26 rm topm.dat 27 rm brihol.dat 28 rm tophol.dat 29 rm topbri.dat 30 rm intrep.dat II Package CRP-NW100 ROUTINES Name ecent DATA lome | ROUTINES O job esktop O make_testat ocuments В гeadme ownloads make_testat -/Desktop/piscine_fortran/Package/CRP-NW100 Open ric Save 2 # Computer dependent settings: 3 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 ot 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 $ATOM/mur3D2.f” 20 21 PGM=”$BIBLI/dplcoft.f $BIBLI/splint.f $BIBLI/origen100.f” 22 23 STD=”ŞORION/dsplin.f $0ORION/tridia.f” 24 25 gfortran $ATOM/testat.f -03 $ATOMIC $PGM $STD -otestat.exe 26 Package CRP-NW100 ROUTINES Name Recent D at3D2.f Home lectatom.f Desktop mur3D2.f O pot3D.f Documents testat.f testat.f Save -/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: I Z :’,dvdz, X:’,dvdx,’ Y: ‘,dvdy, (eV/Ang)’ ENDDO END Tab Width: 5 – Ln 6, Col 24 Fortran 95 ▼ Show transcribed image text 1 Package CRP-NW100 ROUTINES Name t | CRP-N2W100 CRP-NW100 op LIBRARY | SUBORION nents N2morse.dat loads
Package CRP-NW100 ROUTINES Name DATA ROUTINES | job make_testat ents readme se
Package CRP-NW100 ROUTINES Name DATA ROUTINES l job make_testat nents i readme bads гeadme Open Save -/Desktop/piscine_fortran/Package/CRP-NW100 1 The program “testat” allows to calculate es 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”. г… 7 9 At the beginning of each script, a section defines 10 the location of the files. oling 11 Change the argument according to the directory 12 structure on the computer used. Loc 13 14 Please check that the gfortran compiler is correctly 15 set up on your computer or use another compiler. 16 Ш
Package CRP-NW100 ROUTINES Size Name 8 items DATA 5 items ROUTINES G job 521 bytes -nts O make_testat 647 bytes readme 480 bytes ads job –/Desktop/piscine_fortran/Package/CRP-NW100 Open Save job readme 1 # Computer dependent settings: 2 3 # Localisation of PES’s repository: 5 PESS=~/Desktop/piscine_fortran/Package/CRP-NW100 6. ing 9 # Localization of data files 10 DATA=ŞPESS/DATA 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 22 23 rm hole.dat 24 rm bridge.dat 25 rm topp.dat 26 rm topm.dat 27 rm brihol.dat 28 rm tophol.dat 29 rm topbri.dat 30 rm intrep.dat II
Package CRP-NW100 ROUTINES Name ecent DATA lome | ROUTINES O job esktop O make_testat ocuments В гeadme ownloads make_testat -/Desktop/piscine_fortran/Package/CRP-NW100 Open ric Save 2 # Computer dependent settings: 3 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 ot 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 $ATOM/mur3D2.f” 20 21 PGM=”$BIBLI/dplcoft.f $BIBLI/splint.f $BIBLI/origen100.f” 22 23 STD=”ŞORION/dsplin.f $0ORION/tridia.f” 24 25 gfortran $ATOM/testat.f -03 $ATOMIC $PGM $STD -otestat.exe 26
Package CRP-NW100 ROUTINES Name Recent D at3D2.f Home lectatom.f Desktop mur3D2.f O pot3D.f Documents testat.f testat.f Save -/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: I Z :’,dvdz, X:’,dvdx,’ Y: ‘,dvdy, (eV/Ang)’ ENDDO END Tab Width: 5 – Ln 6, Col 24 Fortran 95 ▼
Expert Answer
Answer to Compile a fortran program on LINUX !! How to compile a Fortran program with an other script (on LINUX). Descprition : I …
OR