commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
479cdc8e0870f60fffe3d15bec302fa0f5871db2 | create inital subroutine. | aschampion/gt-cse6730-pmds | initial.f | initial.f | Subroutine Initial
Implicit None
Include 'paramter.inc'
C paramters that will be used
Integer I, seed(3)
Double Precision Accx, Accy, Ukin, Adjust
Accx = 0.0d0
Accy = 0.0d0
Ukin = 0.0d0
Call itime(seed)
Call srand(seed(3))
C Generate Velocities From A Gaussian; Set Impulse To Zero
Do I = 1,... | mit | FORTRAN | |
3be39b787e036deca1fb6e5754978569edea7e8a | Add nodplane2.f | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | nodplane2.f | nodplane2.f | PROGRAM nodplane2
C----
C Compute the second nodal plane of a double couple source
C given strike, dip, rake
C
C x: parallel to input strike
C y: horizontal up-dip relative to input strike
C z: vertical up
C----
IMPLICIT none
REAL*8 pi,d2r,r2d
PARAMETER (pi=4.0d0*datan(1.0d0),d2r=pi/1.8d2,r2d=1.... | mit | FORTRAN | |
b27094878deb931b6eddf7307039a3d759401fc5 | Add perturb.f | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | perturb.f | perturb.f | PROGRAM main
C----
C Take a data file with uncertainties and compute random perturbations
C to the values.
C----
IMPLICIT none
CHARACTER*80 ifile,ofile
INTEGER i,nvar,input,output,idum
REAL*8 val(10),dval(10)
EXTERNAL ran2
REAL ran2,random
C Parse command line
call gcmdl... | mit | FORTRAN | |
bb28e788fc6acabd48578bdb1af641c95b82eb6b | use parameter for particle number | pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD | test/try_all.f90 | test/try_all.f90 | program try_all
use cell_system
use hilbert
implicit none
type(cell_system_t) :: solvent_cells
integer, parameter :: N = 1000
integer :: i, idx, j, L(3), p(3)
double precision :: r(3, N), r_new(3, N)
L = [8, 3, 5]
do i = 1, size(r, 2)
call random_number(r(:, i))
do j=1, 3
r(j, i... | program try_all
use cell_system
use hilbert
implicit none
type(cell_system_t) :: solvent_cells
integer :: i, idx, j, L(3), p(3)
double precision :: r(3, 1000), r_new(3, 1000)
L = [8, 3, 5]
do i = 1, size(r, 2)
call random_number(r(:, i))
do j=1, 3
r(j, i) = r(j, i) * L(j)
end ... | bsd-3-clause | FORTRAN |
3734326fdee3f72ef70bd03926a7375e50c5e134 | Create inputFileReader.f95 | MrCubanfrog/Gravity-simulation | inputFileReader.f95 | inputFileReader.f95 | module inputReader_mod
use object_space_mod
implicit none
contains
!Function for reading the file
integer function readStats(filename, outputName, numberofObjects, timescale, steps, everyNth)
implicit none
character(LEN=100), intent(in) :: filename
character(LEN=100), intent(out) :: outputName
i... | mit | FORTRAN | |
af92f431480fc9a5863d52b312c4d9408952cf1d | Add external function. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, n, m, yout, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
real, intent(in) :: x
real, intent(in) :: y
real, intent(in) :: h
integer :: n, m
external der... | subroutine rk4stepks(x, y, h, n, m, yout)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
real, intent(in) :: x
real, intent(in) :: y
real, intent(in) :: h
integer :: n, m
!external derivs
... | bsd-3-clause | FORTRAN |
5b087bc3372f1a1ddb1e3f6e1b902813bb437750 | Correct output | UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-R... | fortran_openacc_pi_dir/pi.f90 | fortran_openacc_pi_dir/pi.f90 | program pi
use ISO_FORTRAN_ENV
implicit none
double precision :: step, x, s, mypi, start, stop, omp_get_wtime
integer(kind=int64) :: num_steps, i
character(len=:), allocatable :: a
integer, external :: omp_get_max_threads
integer :: argl
num... | program pi
use ISO_FORTRAN_ENV
implicit none
double precision :: step, x, s, mypi, start, stop, omp_get_wtime
integer(kind=int64) :: num_steps, i
character(len=:), allocatable :: a
integer, external :: omp_get_max_threads
integer :: argl
num... | cc0-1.0 | FORTRAN |
813650bb5a0243abd521d5845fa962351029c319 | Remove reference to "external etime" since apparently etime is not considered an external function anymore. | pnedunuri/scipy,Srisai85/scipy,jamestwebber/scipy,rgommers/scipy,apbard/scipy,grlee77/scipy,pschella/scipy,kleskjr/scipy,hainm/scipy,teoliphant/scipy,newemailjdm/scipy,Kamp9/scipy,aeklant/scipy,niknow/scipy,mikebenfield/scipy,jor-/scipy,cpaulik/scipy,mhogg/scipy,behzadnouri/scipy,niknow/scipy,jjhelmus/scipy,scipy/scipy... | Lib/sandbox/arpack/ARPACK/UTIL/second.f | Lib/sandbox/arpack/ARPACK/UTIL/second.f | SUBROUTINE SECOND( T )
*
REAL T
*
* -- LAPACK auxiliary routine (preliminary version) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* July 26, 1991
*
* Purpose
* =======
*
* SECOND returns the user time f... | SUBROUTINE SECOND( T )
*
REAL T
*
* -- LAPACK auxiliary routine (preliminary version) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* July 26, 1991
*
* Purpose
* =======
*
* SECOND returns the user time f... | bsd-3-clause | FORTRAN |
33ea2ec2c241f42755a83c434603ec5f13ba217e | Use a threashold value | M2-AAIS/BAD | mod_timestep.f90 | mod_timestep.f90 | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | mit | FORTRAN |
14e8705279f9a421fdcd96b36ea90a491e21ba41 | Add lsqsubs.f | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | lsqsubs.f | lsqsubs.f | SUBROUTINE polylsq(coeff,xobs,yobs,nobs,ord)
C----
C Compute the best-fitting polynomial through a set of points
C consisting of nobs ordered pairs (xobs(i),yobs(i)). The polynomial
C is of order "ord" (lin = 1, quad = 2, ...), and the (ord+1)
C coefficients are returned in the variable "coeff."
C
C y = coeff(o... | mit | FORTRAN | |
3c97a669f1696d71844bc2c3f7b6c1802d316e59 | format hassle | BasharMentat/HPC-Autumn-Academy-2014 | matrix_read.f90 | matrix_read.f90 | !program that reads a matrix using a function
PROGRAM read_mat
IMPLICIT NONE
INTEGER :: i,j
REAL, DIMENSION(2,3) :: A
DO i=1,2
DO j=1,3
READ (*,*) A(i,j)
ENDDO
ENDDO
DO i=1,2
DO j=1,3
WRITE(*,1F1.1, ADVANCE = "NO") A(i,j)
ENDDO
WRITE(*,*) ""
ENDDO
END PROGRAM read_mat
| !program that reads a matrix using a function
PROGRAM read_mat
IMPLICIT NONE
INTEGER :: m,n,i,j
PRINT *, "insert dimensions"
READ *, m,n
REAL, DIMENSION(m,n) :: A
DO i=1,m
DO j=1,n
READ (10,*) A(i,j)
ENDDO
ENDDO
DO i=1,m
DO j=1,n
PRINT *, A(i,j)
ENDDO
ENDDO
END PROGRAM read_mat
| mit | FORTRAN |
57207416c677af543169b3062eadc665986c348b | Trim the output of INFIL1 to prevent trailing garbage being printed | dww100/sct,dww100/sct | src/rfacXN2.f90 | src/rfacXN2.f90 | Program RfacXN
! RfacXn
! Takes two small angle scattering curves and compares them by calculating the R factor.
! First curve provided is assumed to be a computationally calculated curve,
! the second experimental in origin.
! Minimimum and maximum Q values to consider must be provided.
! Rfactor is used by analog... | Program RfacXN
! RfacXn
! Takes two small angle scattering curves and compares them by calculating the R factor.
! First curve provided is assumed to be a computationally calculated curve,
! the second experimental in origin.
! Minimimum and maximum Q values to consider must be provided.
! Rfactor is used by analog... | apache-2.0 | FORTRAN |
5d1bc740d7a0b7d75f3a8d71fec0d37b3724e869 | make small_dens a parameter | zingale/hydro1d | hse/probparams.f90 | hse/probparams.f90 | !=============================================================================
! probparams module
!
! The propparams module controls the runtime parameters for the
! problem-specific initial conditions only. It reads them in from
! the same inputs file as the params module, but looks for a different
! namelist.
!====... | !=============================================================================
! probparams module
!
! The propparams module controls the runtime parameters for the
! problem-specific initial conditions only. It reads them in from
! the same inputs file as the params module, but looks for a different
! namelist.
!====... | bsd-3-clause | FORTRAN |
29bac5e6249f0f3282265be4b9ae74f35f545333 | add e | zingale/hydro1d | output.f90 | output.f90 | module output_module
use grid_module
use datatypes_module
use params_module
use variables_module
use eos_module
implicit none
contains
subroutine output(U, t, n)
type(gridvar_t), intent(in) :: U
real (kind=dp_t), intent(in) :: t
integer, intent(in) :: n
character (len=4) ::... | module output_module
use grid_module
use datatypes_module
use params_module
use variables_module
use eos_module
implicit none
contains
subroutine output(U, t, n)
type(gridvar_t), intent(in) :: U
real (kind=dp_t), intent(in) :: t
integer, intent(in) :: n
character (len=4) ::... | bsd-3-clause | FORTRAN |
a00c0ac88ceab603fc4d75baba32cfbc8e2ff979 | test format | wawiesel/Loggerhead | src/test/tstDemo.f90 | src/test/tstDemo.f90 | module tstDemo_M
#include "t123/f/TestExe.inc.f90"
implicit none
contains
TEST( A,B ){
EXPECT_EQ(1,1)
}
end module
program main
use tstDemo_M
!
RUN_ALL_TESTS()
!
end program
| module tstDemo_M
#include "t123/f/TestExe.inc.f90"
implicit none
contains
TEST( A,B )
EXPECT_EQ(1,1)
END_TEST
end module
program main
use tstDemo_M
!
RUN_ALL_TESTS()
!
end program
| mit | FORTRAN |
77644b888e292303e700d9553bbf18aae1111b58 | Reorder data if needed | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | src/solvers/amr_manyclaw/fortran_source/manyclaw_reorder.f | src/solvers/amr_manyclaw/fortran_source/manyclaw_reorder.f | subroutine manyclaw_reorder2new(mx,my,mbc,meqn,qin,qout)
implicit none
integer mx, my, mbc,meqn
double precision qin(1-mbc:mx+mbc,1-mbc:my+mbc,meqn)
double precision qout(meqn,1-mbc:mx+mbc,1-mbc:my+mbc)
integer i,j,m
do j = 1-mbc,mx+mbc
do i = 1-mbc,my+mbc
... | bsd-2-clause | FORTRAN | |
5739c940681f81b373c048bebd84f088e407ad29 | Add initial conditions generator | cphyc/n-body,cphyc/n-body | main_gen.f90 | main_gen.f90 | program gen
use constants
integer(kind=4) :: ios ! I/O test variable
integer :: i ! Points iteration variable
character(len=50) :: line ! String reading variable
integer :: npoints
real(xp) :: x, y, z
real(xp) :: radius
real(xp) :: mass
! Open file
open(unit=11, file="./input_parameters.dat... | mit | FORTRAN | |
7ce577330e8653001e5a7687c225736e97c54bd2 | Reorder statements for clarity. Add flag for fciqmc calc. | hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande | src/calc.f90 | src/calc.f90 | module calc
use const
use parallel, only: blacs_info
implicit none
!--- Calculation info ---
! Flags for doing exact and/or Lanczos diagonalisation.
logical :: t_exact = .false., t_lanczos = .false., t_fciqmc = .false.
! Ms of determinants. If not set, then all possible values of Ms are considered
! in FCI. FCIQ... | module calc
use const
use parallel, only: blacs_info
implicit none
! Flags for doing exact and/or Lanczos diagonalisation.
logical :: t_exact = .false., t_lanczos = .false.
! Ms of determinants. If not set, then all possible values of Ms are considered
! in FCI.
integer :: ms_in = huge(1)
! Symmetry block of dete... | lgpl-2.1 | FORTRAN |
c39facb3e76134844c4de0fc6053675eca102d59 | Fix a warning | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | mit | FORTRAN |
9c75c916c0ce4883ee6bd089c0873b19824e1218 | test framework/boilerplate module added. | hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande | src/test.f90 | src/test.f90 | module tests
! Handy boilerplate module to use for testing and debugging code.
! Some rules:
! * Do commit test procedures which are generic or frequently useful.
! * Don't commit (at least not permanently) code that tests development work.
! If you do commit such code, please tidy up and remove it once it stops be... | lgpl-2.1 | FORTRAN | |
b822abcb74b91b0bb7f1dccfb92e8fc21d634b89 | Add basic file operation module | kramer314/fortran-lib | src/files.f90 | src/files.f90 | ! Copyright (c) 2015 Alex Kramer <kramer.alex.kramer@gmail.com>
! See the LICENSE.txt file at the top-level directory of this distribution.
!
! This module implements some useful operations for files / directories
module files
implicit none
private
public :: files_ensure_dir
contains
! Ensure that a directo... | mit | FORTRAN | |
1c1c9c95600146b9fb39a49c670e2f10d2055b3d | fix undecl bug and add 64/128 impl | jeffhammond/multiprecision,jeffhammond/multiprecision | blas-like/dot77.f | blas-like/dot77.f | subroutine mysdot(n,x,jx,y,jy,z)
implicit none
integer i,n,jx,jy
real*4 x(n),y(n),z,r
if ((jx.ne.1).or.(jy.ne.1)) then
print*,'bad input'
endif
do i=1,n
r = r + x(i) * y(i)
enddo
z = r
return
end subroutine
... | bsd-3-clause | FORTRAN | |
475e3df2db9f996878cac466a4be1bb0213b4780 | Use int() instead of nint() | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | mit | FORTRAN |
a233a7e239b60b90960215a3c0a73fd40d6e104b | Sort code | rekka/intro-fortran-2016,rekka/intro-fortran-2016 | lec8/sort.f90 | lec8/sort.f90 | program sort
implicit none
integer :: i, j
integer, parameter :: M = 5
real, dimension(M) :: x
real :: s
! initialize the array
do i=1, M
x(i) = sin(real(i))
end do
! sort the array
do i=1, M-1
do j=i+1, M
if (x(i) > x(j)) then
s = x(... | mit | FORTRAN | |
e38a089b6421027b366f6214861c39db160391da | Fix various syntax problems in dummy fortran wrapper for arpack. | vanpact/scipy,kleskjr/scipy,mdhaber/scipy,maniteja123/scipy,perimosocordiae/scipy,efiring/scipy,jonycgn/scipy,dch312/scipy,piyush0609/scipy,sauliusl/scipy,Newman101/scipy,behzadnouri/scipy,Stefan-Endres/scipy,zaxliu/scipy,zaxliu/scipy,sargas/scipy,vhaasteren/scipy,pizzathief/scipy,FRidh/scipy,WillieMaddox/scipy,ogrisel... | scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/dummy.f | scipy/sparse/linalg/eigen/arpack/ARPACK/FWRAPPERS/dummy.f | double complex function wzdotc(n, zx, incx, zy, incy)
double complex zx(*), zy(*), z
double complex zdotc
integer n, incx, incy
z = zdotc(n, zx, incx, zy, incy)
wzdotc = z
end
double complex function wzdotu(n, zx, incx, zy, incy)
double complex ... | double complex function wzdotc(n, zx, incx, zy, incy)
double complex zx(*), zy(*), z, zdotc
integer n, incx, incy
zdotc(n, zx, incx, zy, incy, z)
wzdotc = zdotc
end
double complex function wzdotu(n, zx, incx, zy, incy)
double complex zx(*), zy(*), z, ... | bsd-3-clause | FORTRAN |
fc2a0ff22c9830408c34f701c50bad8a62f13b17 | Add write test for Fortran | lscalfi/chemfiles,lscalfi/chemfiles,Luthaf/Chemharp,lscalfi/chemfiles,lscalfi/chemfiles,chemfiles/chemfiles,chemfiles/chemfiles,Luthaf/Chemharp,chemfiles/chemfiles,Luthaf/Chemharp,chemfiles/chemfiles | bindings/fortran/tests/write.f90 | bindings/fortran/tests/write.f90 | program read
use iso_fortran_env, only: real32, real64, int64
use chemharp
implicit none
type(chrp_trajectory) :: traj
type(chrp_topology) :: topology
type(chrp_atom) :: atom
type(chrp_frame) :: frame
character(len=512) :: FILENAME = "test-fortran.xyz"
character(len=20... | bsd-3-clause | FORTRAN | |
777e79a78950a5570e70086a286091324578811f | Modify mom2mag.f | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | mom2mag.f | mom2mag.f | PROGRAM main
IMPLICIT none
REAL*8 mag,mom
101 read (*,*,end=102) mom
mag = 2.0d0/3.0d0*dlog10(mom) - 10.7
write(*,1001) mag
goto 101
102 continue
1001 format('Magnitude: ',F5.2)
END
| PROGRAM main
IMPLICIT none
REAL*8 mag,mom
101 read (*,*,end=102) mom
mag = 2.0d0/3.0d0*dlog10(mom) - 10.7
write(*,1001) mag
goto 101
102 continue
1001 format('Magnitude: ',F5.2)
END
| mit | FORTRAN |
11b4363d337660132323a5ff5a51a33668936fcf | Add Fortran program to test test/nml/nl | maddenp/nml | test/nml/test.f90 | test/nml/test.f90 | program p
implicit none
character(len=3) :: c0 = '', c1 = '', c2 = '', c3 = ''
character(len=1) :: c4(2) = '', c5(2) = ''
character(len=1) :: x = 'x'
integer :: i0 = 0, i1 = 0, i2 = 0
logical :: t0 = .false., t1 = .false., t2 = .false., t3 = .false., t4 = .false., t5 = .false.
logical :: f0 = .true., f1 =... | apache-2.0 | FORTRAN | |
21d1fbbcd1d9824024b082994eda7bb1ee27aacb | Update reference for fusion3 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/fusion3/reference.f90 | test/loops/fusion3/reference.f90 | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
DO i = 1 , 5 , 1
DO j = 1 , 2 , 1
PRINT * ,"First loop body:" , i , j
PRINT * ,"Second loop body:" , i , j
END DO
END DO
END SUBROUTINE clawloop
| PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
DO i = 1 , 5 , 1
DO j = 1 , 2 , 1
PRINT * ,"First loop body:" , i , j
PRINT * ,"Second loop body:" , i , j
END DO
END DO
END SUBROUTINE clawloop
| bsd-2-clause | FORTRAN |
f40f3bd707eb66a5406af20968a9440c156f2a83 | improve get_parameters func to use type(parameters | M2-AAIS/BAD | mod_read_parameters.f90 | mod_read_parameters.f90 | ! Module that reads the parameter out of a file
module mod_read_parameters
private
public :: get_parameters
contains
subroutine get_parameters (initial_param)
use mod_constants
!read parameter in the input file : ./input_parameter.dat
implicit none
!function parameters
type(p... | ! Module that reads the parameter out of a file
module mod_read_parameters
private
public :: get_parameters
contains
subroutine get_parameters (M,r_max,M_0_dot,alpha,X,mu)
use mod_constants
!read parameter in the input file : ./input_parameter.dat
implicit none
!function parame... | mit | FORTRAN |
7a9c43cb884d41bf49f810469cb8f94a29c9fa66 | Create a class for Items | fsobral/pack-u,fsobral/pack-u,fsobral/pack-u | items.f90 | items.f90 | module items
implicit none
! This module implements the type 'Item' and its associate utility
! subroutines.
type Item
integer :: number, type
real(8) :: length, width
end type Item
contains
subroutine createSameItems(n, type, len, wid, nStart, v)
! This subroutine populates a... | mit | FORTRAN | |
dfa9b76a8787e2cbf46beae963cee25053935e6e | Add GS Reconstruction single step solver. | jungerstein/plasmaPhyLib,jungerstein/plasmaPhyLib | simu/solvers/gs.f90 | simu/solvers/gs.f90 | ! vim : tw=72 sw=2 ts=2
! gs.f90
! Solver (e.g. GS Reconstruction) with fixed-value boundary conditions.
! Coded by jungerstein.
module gsRecon
! Solve div grad A = f(A)
! Old must have four boundaries already written.
function gsStep(old, boundary, isBoundary, dx, dy, f, omega, tol) result (new)
implicit none
... | apache-2.0 | FORTRAN | |
be41036a7a72d495eb4f0c4a0f7fb2836dbbcec3 | Transform blank fortran strings to C strings as a single blank character rather than an empty string. Otherwise, the trimming of trailing blank characters proceeds as before. | FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot | bindings/f95/strutil.f90 | bindings/f95/strutil.f90 | ! $Id$
!
! Copyright (C) 2004 Alan W. Irwin
!
! This file is part of PLplot.
!
! PLplot is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Library Public License as published
! by the Free Software Foundation; either version 2 of the License, or
! (at your option) any later... | ! $Id$
!
! Copyright (C) 2004 Alan W. Irwin
!
! This file is part of PLplot.
!
! PLplot is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Library Public License as published
! by the Free Software Foundation; either version 2 of the License, or
! (at your option) any later... | lgpl-2.1 | FORTRAN |
36716f548c2481612a085be76d8fff7eb9e65872 | Create hash.f90 | AeroDME/octo-spork,AeroDME/octo-spork,AeroDME/octo-spork | hash.f90 | hash.f90 | ! ---------------------------------------------------------------------------------------------------------------------------------+
! D. Everhart
! ... | mit | FORTRAN | |
f328edd668acfdb5deb1b441f8059d1c0055d6ad | Add loop-interchange directive to the code sample | clementval/claw-compiler,clementval/claw-compiler | test/loops/interchange2/original_code.f90 | test/loops/interchange2/original_code.f90 | ! Simple program to test the loop-interchange directive
PROGRAM LOOP_INTERCHANGE
CALL clawloop
END
SUBROUTINE clawloop
INTEGER :: i, j, k
!$claw loop-interchange new-order(k,i,j)
DO i=1,4
DO j=1,3
DO k=1,2
PRINT *, 'Iteration i=',i,', j=',j,', k=',k
END DO
END DO
END DO
END
| ! Simple program to test the loop-interchange directive
PROGRAM LOOP_INTERCHANGE
CALL clawloop
END
SUBROUTINE clawloop
INTEGER :: i, j, k
DO i=1,4
DO j=1,3
DO k=1,2
PRINT *, 'Iteration i=',i,', j=',j,', k=',k
END DO
END DO
END DO
END
| bsd-2-clause | FORTRAN |
8b6dc842a78908c66b11acc8d1d20459efbe2a51 | Add timestep | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: dt, Ec, Ep, E
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!-----------... | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: dt, Ec, Ep, E
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!-----------... | mit | FORTRAN |
8392d31a9b3ebaaa30ca6c1707ecc19b8af8dfbc | Fix the program name of test_eig.f90 | certik/fortran-utils | tests/linalg/test_eig.f90 | tests/linalg/test_eig.f90 | program test_eig
use types, only: dp
use utils, only: assert
use linalg, only: eigh
implicit none
real(dp), parameter :: eps = 1e-9_dp
real(dp) :: A(2, 2), B(2, 2), lam(2), c(2, 2), r(2), n
integer :: i
A = reshape([1, 0, 0, -1], [2, 2])
B = reshape([1, 0, 0, 1], [2, 2])
call eigh(A, B, lam, c)
! Test eigenvalues:
cal... | program test_mesh
use types, only: dp
use utils, only: assert
use linalg, only: eigh
implicit none
real(dp), parameter :: eps = 1e-9_dp
real(dp) :: A(2, 2), B(2, 2), lam(2), c(2, 2), r(2), n
integer :: i
A = reshape([1, 0, 0, -1], [2, 2])
B = reshape([1, 0, 0, 1], [2, 2])
call eigh(A, B, lam, c)
! Test eigenvalues:
ca... | mit | FORTRAN |
244fdcacc56704e0182a61234f3603396eb35411 | Make usage a bit more comprehensive | mlopes/git-.f | src/git-.f | src/git-.f | #!/usr/bin/env bash
usage () {
echo "Usage: git .f <subcommand>"
echo
echo " git .f - Will show a help screen"
echo " git .f init - Sets up a folder as a new git .f repository"
echo " git .f add - Adds changes to the current host's branch"
echo " git .f apply - Applies an existing g... | #!/usr/bin/env bash
usage () {
echo "Usage: git .f <subcommand>"
echo " git .f - Will show a help screen"
}
usage
| mit | FORTRAN |
bc80de317d34ab76b92ea9c711f865bb8d57810c | Clean because there is no READDIR in FORTRAN | danielpecak/salesman | fortran/myio.f95 | fortran/myio.f95 | module myio
use genetics
implicit none
contains
subroutine fnameSnapshot(continent,popNo,xmen,t,output)
! Makes the name of the snapshot to save.
character(len=*),intent(in) :: continent
character(len=200),intent(out) :: output
integer, intent(in) :: popNo, t
real*8, intent(in) :: xmen
write(output,"(A... | module myio
use genetics
implicit none
contains
subroutine fnameSnapshot(continent,popNo,xmen,t,output)
! Makes the name of the snapshot to save.
character(len=*),intent(in) :: continent
character(len=200),intent(out) :: output
integer, intent(in) :: popNo, t
real*8, intent(in) :: xmen
write(output,"(A... | mit | FORTRAN |
766d8351162a9edd545a3d8587fba507c4ca0a30 | Allow for meqn > 1 | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | applications/advection/2d/swirl/qinit.f | applications/advection/2d/swirl/qinit.f | c =====================================================
subroutine qinit(maxmx,maxmy,meqn,mbc,mx,my,xlower,ylower,
& dx,dy,q,maux,aux)
c =====================================================
c # Set initial conditions for q.
c # Sample scalar equation with data that is pie... | c =====================================================
subroutine qinit(maxmx,maxmy,meqn,mbc,mx,my,xlower,ylower,
& dx,dy,q,maux,aux)
c =====================================================
c # Set initial conditions for q.
c # Sample scalar equation with data that is pie... | bsd-2-clause | FORTRAN |
bd61964bd2beec12697a71b66026161561083754 | Fix update_condmatr | ziotom78/stripeline,ziotom78/stripeline | stripeline/_maptools.f90 | stripeline/_maptools.f90 | ! Update the array of conditioning matrices "m" with new samples from
! a TOD. The "pixidx" array contains the zero-based indexes in the Healpix
! map of the polarization angles in the array "angle". Note that
! "pixidx" must be a *zero-based* array! The routine internally does the
! conversion to Fortran indexing (whi... | ! Update the array of conditioning matrices "m" with new samples from
! a TOD. The "pixidx" array contains the zero-based indexes in the Healpix
! map of the polarization angles in the array "angle". Note that
! "pixidx" must be a *zero-based* array! The routine internally does the
! conversion to Fortran indexing (whi... | mit | FORTRAN |
dca521cbfb3a2e6d60116869ff6499cacb55fcf4 | Update reference for dependencies2 test case | clementval/claw-compiler,clementval/claw-compiler | test/driver/dependencies2/reference.f90 | test/driver/dependencies2/reference.f90 | PROGRAM original_code
USE mo_column , ONLY: compute_column
END PROGRAM original_code
| PROGRAM original_code
USE mo_column , ONLY: compute_column
END PROGRAM original_code
| bsd-2-clause | FORTRAN |
9a86ebea821dada091274a1d7ba07d0de9a3d489 | Add comment describing the use of an ifdef | OpenFAST/OpenFAST,OpenFAST/OpenFAST,OpenFAST/OpenFAST | modules/version/src/VersionInfo.f90 | modules/version/src/VersionInfo.f90 | !**********************************************************************************************************************************
! LICENSING
! Copyright (C) 2015-2016 National Renewable Energy Laboratory
! Copyright (C) 2016-2017 Envision Energy USA, LTD
!
! This file is part of the NWTC Subroutine Library.
!
!... | !**********************************************************************************************************************************
! LICENSING
! Copyright (C) 2015-2016 National Renewable Energy Laboratory
! Copyright (C) 2016-2017 Envision Energy USA, LTD
!
! This file is part of the NWTC Subroutine Library.
!
!... | apache-2.0 | FORTRAN |
86a358b67cc5ca16709e28b848d3f3b85ef9364f | Add a test | certik/fortran-utils | tests/linalg/test_cholesky.f90 | tests/linalg/test_cholesky.f90 | program test_cholesky
use types, only: dp
use utils, only: assert
use linalg, only: cholesky, solve, solve_triangular
implicit none
real(dp), parameter :: eps = 1e-12_dp
real(dp) :: A(3,3), A2(3,3), L(3,3), b(3), x1(3), x2(3)
A = reshape([4, 12, -16, 12, 37, -43, -16, -43, 98], shape=[3,3], order=[2,1])
L = cholesky(... | program test_cholesky
use types, only: dp
use utils, only: assert
use linalg, only: cholesky
implicit none
real(dp), parameter :: eps = 1e-12_dp
real(dp) :: A(3,3), A2(3,3), L(3,3)
A = reshape([4, 12, -16, 12, 37, -43, -16, -43, 98], shape=[3,3], order=[2,1])
L = cholesky(A)
A2 = matmul(L, transpose(L))
print *, A
pr... | mit | FORTRAN |
52d4dcc7c3fba7dab5ad326a52a982bdcc351183 | Add some information | clementval/claw-compiler,clementval/claw-compiler | test/claw/sca/sca41/mo_column.f90 | test/claw/sca/sca41/mo_column.f90 | !
! This file is released under terms of BSD license
! See LICENSE file for more information
!
MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute single point with elemental function
ELEMENTAL FUNCTION compute_point(t) RESULT(q)
IMPLICIT NONE
!$claw model-data
REAL, INTENT(IN) :: t ! Field declare... | !
! This file is released under terms of BSD license
! See LICENSE file for more information
!
MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute single point with elemental function
ELEMENTAL FUNCTION compute_point(t) RESULT(q)
IMPLICIT NONE
!$claw model-data
REAL, INTENT(IN) :: t ! Field declared... | bsd-2-clause | FORTRAN |
e6e2a63650bf6f789693fd5ec788d3f35371196c | Update LAPACK version number to 3.11.0 | xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS | lapack-netlib/INSTALL/ilaver.f | lapack-netlib/INSTALL/ilaver.f | *> \brief \b ILAVER returns the LAPACK version.
**
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
*
* INTEGER VERS_MAJOR, VERS_... | *> \brief \b ILAVER returns the LAPACK version.
**
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
* Definition:
* ===========
*
* SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
*
* INTEGER VERS_MAJOR, VERS_... | bsd-3-clause | FORTRAN |
ab131930aac7fb633f380ffc5e76d9d0466c8675 | Move a comment that was going over the line length. | SixTrack/SixTrack,SixTrack/SixTrack,SixTrack/SixTrack,SixTrack/SixTrack,SixTrack/SixTrack,SixTrack/SixTrack | source/include/mul4v05.f90 | source/include/mul4v05.f90 | ! start include/mul4v05.f90
yv1j = (bbiv(1,i) + bbiv(2,i)*xlvj) + aaiv(2,i)*zlvj
yv2j = (aaiv(1,i) - bbiv(2,i)*zlvj) + aaiv(2,i)*xlvj
if(curveff .and. abs(dki(ix,3)) > pieni) then !check for length and that flag is set
if (abs(dki(ix,1)) > pieni) then ! Effect from the horizontal bend
!! This sign is correct and ... | ! start include/mul4v05.f90
yv1j = (bbiv(1,i) + bbiv(2,i)*xlvj) + aaiv(2,i)*zlvj
yv2j = (aaiv(1,i) - bbiv(2,i)*zlvj) + aaiv(2,i)*xlvj
if(curveff .and. abs(dki(ix,3)) > pieni) then !check for length and that flag is set
if (abs(dki(ix,1)) > pieni) then ! Effect from the horizontal bend
yv1j = yv1j - bbiv(2,i) * (s... | lgpl-2.1 | FORTRAN |
09d9c83889fceaba29ca465bf4b29d2b207bf660 | Update ref | clementval/claw-compiler,clementval/claw-compiler | test/driver/dependencies1/reference.f90 | test/driver/dependencies1/reference.f90 | MODULE mod1
USE mod2 , ONLY: i
USE mod3
END MODULE mod1
| MODULE mod1
USE mod2
USE mod3
END MODULE mod1
| bsd-2-clause | FORTRAN |
dc9a78359ae3a4e83f14714ccc40e39d7a3c8c42 | Revert back to double precision -- single precision has issues. | kramer314/1d-vd-test,kramer314/1d-vd-test | src/precision.f90 | src/precision.f90 | module precision
use globvars, only: dp, dp_format, dp_format_raw, sp, sp_format, &
sp_format_raw, ip, ip_format, ip_format_raw
implicit none
! Real precision kind parameter / formatting
integer(ip), parameter :: fp = dp
character(*), parameter :: fp_format = dp_format
character(*), parameter :: f... | module precision
use globvars, only: dp, dp_format, dp_format_raw, sp, sp_format, &
sp_format_raw, ip, ip_format, ip_format_raw
implicit none
! Real precision kind parameter / formatting
integer(ip), parameter :: fp = sp
character(*), parameter :: fp_format = sp_format
character(*), parameter :: f... | mit | FORTRAN |
b90f6835d422d8a41f6d71305940e1ffc8f8c1b0 | Fix indices | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction2/main.f90 | test/claw/abstraction2/main.f90 | ! Test the CLAW abstraction model with two additional dimensions.
PROGRAM test_abstraction2
USE mo_column, ONLY: compute_column
REAL, DIMENSION(10,10,60) :: q, t ! fields as declared in the whole model
INTEGER :: nx, ny, nz ! Size of array fields
INTEGER :: i,j ! Loop indices
... | ! Test the CLAW abstraction model with two additional dimensions.
PROGRAM test_abstraction2
USE mo_column, ONLY: compute_column
REAL, DIMENSION(10,10,60) :: q, t ! fields as declared in the whole model
INTEGER :: nx, ny, nz ! Size of array fields
INTEGER :: i,j ! Loop indices
... | bsd-2-clause | FORTRAN |
e48336a6f06f61e72cfbad18731f543cf8c13d79 | Create test_interchange_sort.f90 | arinrb/bsort,arinrb/bsort | templates/test/test_interchange_sort.f90 | templates/test/test_interchange_sort.f90 | !> @ingroup test
!>
!> @brief
!> Run tests on the interchange_sort interface.
!>
!> @brief
!> Run a series of tests on the interchange_sort interface.
!>
!> @author Arin R. Bratt
!> @date 07/07/2014
subroutine test_interchange_sort()
use bsort
! Parameters
integer, parameter :: max_ord = 4 ! Maximum o... | apache-2.0 | FORTRAN | |
041eca4710e57120cf7a1c00765187915ce97583 | add initial conditions reader (to test) | cphyc/n-body,cphyc/n-body | initial_conditions.f90 | initial_conditions.f90 | module initial_conditions
use constants
implicit none
private
public :: read_initial_conditions
contains
subroutine read_initial_conditions (filename, un)
character, intent(in) :: filename
integer, intent(in) :: un
integer :: stat
integer :: npoints
real... | mit | FORTRAN | |
1766adb6303318b8375932831e2fa9cce1ba71be | test framework/boilerplate module added. | hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande | src/test.f90 | src/test.f90 | module tests
! Handy boilerplate module to use for testing and debugging code.
! Some rules:
! * Do commit test procedures which are generic or frequently useful.
! * Don't commit (at least not permanently) code that tests development work.
! If you do commit such code, please tidy up and remove it once it stops be... | lgpl-2.1 | FORTRAN | |
5019c24a7cf603a36f5348fecfb23c880e62faaf | Update reference for acc-primitive1 test case | clementval/claw-compiler,clementval/claw-compiler | test/openacc/primitive1/reference.f90 | test/openacc/primitive1/reference.f90 | PROGRAM test_primitive
INTEGER :: i
!$acc parallel
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$acc end parallel
!$claw omp do
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$claw omp end do
END PROGRAM test_primitive
| PROGRAM test_primitive
INTEGER :: i
!$acc parallel
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$acc end parallel
!$claw omp do
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$claw omp end do
END PROGRAM test_primitive
| bsd-2-clause | FORTRAN |
62a647015236b493f5b6fe7b785d9c474ceeb715 | Fix #2. | rouson/UCY-parallel-fortran | src/homework1/test-my-message.f90 | src/homework1/test-my-message.f90 | program main
!! Unit test for my_message
implicit none
character(len=128) :: input
associate(me=>this_image())
!! Define a local alias for the image number
broadcast_preface: block
use iso_fortran_env, only : input_unit,output_unit
integer, parameter :: preconnected=1
if (preconnec... | program main
implicit none
integer, parameter :: max_length=64
character(len=max_length) :: input
associate(me=>this_image())
broadcast_preface: block
use iso_fortran_env, only : input_unit,output_unit
integer, parameter :: preconnected=1
write(output_unit,advance='no',fmt="(a)") "Ent... | bsd-3-clause | FORTRAN |
10f5f97d9e2eed1c11823a24570f78b5bf7f4878 | add L2 of Mach | zingale/hydro1d | hse-jump/run_diag.f90 | hse-jump/run_diag.f90 | ! runtime diagonstics
module runtime_diag_module
use grid_module
use datatypes_module
use params_module
use variables_module
use eos_module
implicit none
private
public :: run_diag
contains
subroutine run_diag(U, t, n)
type(gridvar_t), intent(in) :: U
real (kind=dp_t), intent(in) :: t... | ! runtime diagonstics
module runtime_diag_module
use grid_module
use datatypes_module
use params_module
use variables_module
use eos_module
implicit none
private
public :: run_diag
contains
subroutine run_diag(U, t, n)
type(gridvar_t), intent(in) :: U
real (kind=dp_t), intent(in) :: t... | bsd-3-clause | FORTRAN |
d45aa2c6510bf9c4d2a2386541fb7b52c297e09f | Add comment to syncimages_status test | zbeekman/opencoarrays,sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays,zbeekman/opencoarrays,zbeekman/opencoarrays,sourceryinstitute/opencoarrays | src/tests/unit/sync/syncimages_status.f90 | src/tests/unit/sync/syncimages_status.f90 | ! SYNC IMAGES(*) with the STAT=STAT_STOPPED_IMAGE specifier
! Based on a test taken from UH caf-testsuite
program sync_images_stat
use, intrinsic:: iso_fortran_env
implicit none
integer :: stat_var = 0, me
me = this_image()
if (me /= 1 ) then
sync images(*,STAT=stat_var)
if ( stat_var /= STAT_ST... | ! SYNC IMAGES(*) with the STAT=STAT_STOPPED_IMAGE specifier
! Based on a test taken from UH caf-testsuite
program sync_images_stat
use, intrinsic:: iso_fortran_env
implicit none
integer :: stat_var = 0, me
me = this_image()
if (me /= 1 ) then
sync images(*,STAT=stat_var)
if ( stat_var /= STAT_ST... | bsd-3-clause | FORTRAN |
7335e749c1c846347b7a25cfed2f061eea459dff | Remove reference to "external etime" since apparently etime is not considered an external function anymore. | jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,jasonmccampbell/scipy-refactor | Lib/sandbox/arpack/ARPACK/UTIL/second.f | Lib/sandbox/arpack/ARPACK/UTIL/second.f | SUBROUTINE SECOND( T )
*
REAL T
*
* -- LAPACK auxiliary routine (preliminary version) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* July 26, 1991
*
* Purpose
* =======
*
* SECOND returns the user time f... | SUBROUTINE SECOND( T )
*
REAL T
*
* -- LAPACK auxiliary routine (preliminary version) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* July 26, 1991
*
* Purpose
* =======
*
* SECOND returns the user time f... | bsd-3-clause | FORTRAN |
e7c889b94e68c9eb19ba3b1881376c779b1f7fe5 | Add IEEE_FEATURES_TYPE (mod from gfortran) | clementval/claw-compiler,clementval/claw-compiler | modules/ieee_features.f90 | modules/ieee_features.f90 | ! Implementation of the IEEE_FEATURES standard intrinsic module
! Copyright (C) 2013-2017 Free Software Foundation, Inc.
! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
!
! This file is part of the GNU Fortran runtime library (libgfortran).
!
! Libgfortran is free software; you can redistribut... | bsd-2-clause | FORTRAN | |
885a310e67b69d8390d291f565daacc6000ebab2 | add pi in constants | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
private
integer, parameter :: xp = selected_real_kind(8)
real(kind = xp) :: pi = 3.14159265359_xp
public :: xp, pi
contains
end module constants
| module constants
private
integer, parameter :: xp = selected_real_kind(8)
public :: xp
contains
end module constants
| mit | FORTRAN |
b1699eb3ef83110e3e5ce4a9de273a0ef11f260a | fix the Jacobian | zingale/ode-openacc,BoxLib-Codes/ode-openacc,dwillcox/ode-openacc | first-order/react.f90 | first-order/react.f90 | subroutine react(nspec, Xin, T, rho, tmax, Xout, enucdot)
implicit none
! do a simple first-order backward Euler method for integrating
! a stiff-system of ODEs.
! Note: this should not been seen as a science code, but rather
! just used to test ideas about putting reactions on GPUs
! this version works... | subroutine react(nspec, Xin, T, rho, tmax, Xout, enucdot)
implicit none
! do a simple first-order backward Euler method for integrating
! a stiff-system of ODEs.
! Note: this should not been seen as a science code, but rather
! just used to test ideas about putting reactions on GPUs
! this version works... | bsd-2-clause | FORTRAN |
c40ffee6319cbbcbd5109f6d981c65e5a8d72e40 | Update reference for target1 test case | clementval/claw-compiler,clementval/claw-compiler | test/driver/target1/reference.f90 | test/driver/target1/reference.f90 | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| bsd-2-clause | FORTRAN |
5b6c750576389614ef44891bedffb339778cc61b | Update comment | clementval/claw-compiler,clementval/claw-compiler | test/loops/ifextract1/original_code.f90 | test/loops/ifextract1/original_code.f90 | ! Simple program to test the if-extract directive
program ifextract1
integer :: i
logical :: test
test = .TRUE.
!$claw if-extract
DO i = 1, 10
IF (test) THEN
PRINT *, 'First loop body:', i
END IF
END DO
end program ifextract1
| ! Simple program to test the loop-fusion directive
program ifextract1
integer :: i
logical :: test
test = .TRUE.
!$claw if-extract
DO i = 1, 10
IF (test) THEN
PRINT *, 'First loop body:', i
END IF
END DO
end program ifextract1
| bsd-2-clause | FORTRAN |
aabd76df6d06b1db43b141ee051038b9d8406865 | Create PPP_electron.f | nworbde/dStar,nworbde/dStar,nworbde/dStar | conductivity/private/PPP_electron.f | conductivity/private/PPP_electron.f | module PPP_electron
use constants_def, only: dp
use conductivity_def
implicit none
integer, parameter :: NZ = 15, Nrho = 64, NT = 19
character(len=*), parameter :: conductivity_file_basename = 'condall06'
! error codes
integer, parameter :: PPP_table_not_loaded = -1
type electron_... | mit | FORTRAN | |
3be077d7fc3de6cd3ea3c08344911e7bab1fe1e7 | Add numint.f | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | numint.f | numint.f | PROGRAM numint
IMPLICIT none
INTEGER NMAX
PARAMETER (NMAX=50000)
REAL*8 x(NMAX),f(NMAX),fint(NMAX),dx
CHARACTER*30 ifile,ofile
LOGICAL ex
INTEGER i,ntot
C----
C Get file names from command line
C----
call gcmdln(ifile,ofile)
inquire(file=ifile,EXIST=ex)
... | mit | FORTRAN | |
1b3869f1da4f5ec099f333c2e22855cd952b4a2a | Fix reference code to pass the test | clementval/claw-compiler,clementval/claw-compiler | test/loops/vector1/reference.f90 | test/loops/vector1/reference.f90 | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: j
INTEGER :: i = 10
INTEGER :: vec1 ( 0 : 9 )
DO j = 0 , i , 1
vec1 ( j ) = j
END DO
!$claw loop-vector
vec1 ( 0 : i ) = vec1 ( 0 : i ) + 10
PRINT * , vec1
END SUBROUTINE claw
| PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: j
INTEGER :: i = 10
INTEGER :: vec1 ( 0 : 9 )
DO j = 0 , i , 1
vec1 ( j ) = j
END DO
!$claw loop-vector
vec1 ( 0 : i ) = vec1 ( 0 : i ) + 10
PRINT * , vec1
END SUBROUTINE claw
| bsd-2-clause | FORTRAN |
8c4efc19b6ff55079f71069718f83ffc9cc636be | replace loop over daxpy with straight loops | rangsimanketkaew/NWChem | src/ccsd/geaxpy.f | src/ccsd/geaxpy.f | !:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! NAME
! GEAXPY -- Matrix Y <-- a*X + Y
!
! REVISION
! $Id$
!
! SYNOPSIS
Subroutine GEAXPY(M, N, Alpha, X, LDX, Y, LDY)
Implicit NONE
Integer M, N, LDX, LDY
Double precision Alpha
Double precision X(LDX, N), Y... | !:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! NAME
! GEAXPY -- Matrix Y <-- a*X + Y
!
! REVISION
! $Id$
!
! SYNOPSIS
Subroutine GEAXPY(M, N, Alpha, X, LDX, Y, LDY)
Implicit NONE
Integer M, N, LDX, LDY
Double precision Alpha
Double precision X(LDX, N), Y... | mit | FORTRAN |
51f644a89eaa6b68313187c34fee8bbdc814d4b1 | Add interface block | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/blas/dasum/src/dasum_wrapper.f | lib/node_modules/@stdlib/math/base/blas/dasum/src/dasum_wrapper.f | !> Wraps dasum as a subroutine.
!
! @param {integer} N - number of values to sum
! @param {Array<double>} dx - input array
! @param {integer} stride - stride length
! @param {double} sum - output variable reference
!<
subroutine dasumsub( N, dx, stride, sum )
implicit none
! ..
! External functions:
interface
... | !> Wraps dasum as a subroutine.
!
! @param {integer} N - number of values to sum
! @param {Array<double>} dx - input array
! @param {integer} stride - stride length
! @param {double} sum - output variable reference
!<
subroutine dasumsub( N, dx, stride, sum )
implicit none
! ..
! External functions:
external da... | apache-2.0 | FORTRAN |
af18864130dd5e5817716b27ad4e981bc9cd7e1c | Create system.f | CNFIG/asm-cforth | system.f | system.f | :x dup dup + ;
| bsd-2-clause | FORTRAN | |
8182957a7d8f087be66d4e6099c0a6d43ea890fe | Update reference for remove1 test case | clementval/claw-compiler,clementval/claw-compiler | test/utilities/remove1/reference.f90 | test/utilities/remove1/reference.f90 | PROGRAM remove1
CALL dummy ( )
END PROGRAM remove1
SUBROUTINE dummy ( )
INTEGER :: k
INTEGER :: i
INTEGER :: kend = 5
INTEGER :: iend = 10
DO k = 1 , kend , 1
DO i = 1 , iend , 1
END DO
DO i = 1 , iend , 1
END DO
END DO
END SUBROUTINE dummy
| PROGRAM remove1
CALL dummy ( )
END PROGRAM remove1
SUBROUTINE dummy ( )
INTEGER :: k
INTEGER :: i
INTEGER :: kend = 5
INTEGER :: iend = 10
DO k = 1 , kend , 1
DO i = 1 , iend , 1
END DO
DO i = 1 , iend , 1
END DO
END DO
END SUBROUTINE dummy
| bsd-2-clause | FORTRAN |
89824a96352f6c56c8c56e35306efd210774c199 | use library | nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura | attic/fortran-mpi-test/lib.f90 | attic/fortran-mpi-test/lib.f90 | module lib
implicit none
integer :: i
integer :: mpi_err, req_recv, req_send
type Kozo
double precision, dimension(42) :: U
double precision, dimension(42) :: V
end type Kozo
type(Kozo) :: Iriguchi
type(Kozo) :: Deguchi
end module lib
| mit | FORTRAN | |
fd0d42ca16ca670bf57110417c771f048201f690 | Make g77 ABI wrapper work with gfortran ABI lapack | vigna/scipy,rgommers/scipy,mdhaber/scipy,person142/scipy,zerothi/scipy,tylerjereddy/scipy,perimosocordiae/scipy,rgommers/scipy,WarrenWeckesser/scipy,matthew-brett/scipy,pizzathief/scipy,Stefan-Endres/scipy,WarrenWeckesser/scipy,anntzer/scipy,ilayn/scipy,WarrenWeckesser/scipy,ilayn/scipy,perimosocordiae/scipy,endolith/s... | scipy/_build_utils/src/wrap_g77_abi_f.f | scipy/_build_utils/src/wrap_g77_abi_f.f | COMPLEX FUNCTION WCDOTC( N, CX, INCX, CY, INCY )
INTEGER INCX, INCY, N
COMPLEX CX(*), CY(*)
COMPLEX RESULT
EXTERNAL ACC_CDOTC_SUB
CALL ACC_CDOTC_SUB( N, CX, INCX, CY, INCY, RESULT )
WCDOTC = RESULT
END FUNCTION
COMPLEX FUNCTION WCDOTU( N, CX, INCX, CY, INCY )
... | COMPLEX FUNCTION WCDOTC( N, CX, INCX, CY, INCY )
INTEGER INCX, INCY, N
COMPLEX CX(*), CY(*)
COMPLEX RESULT
EXTERNAL ACC_CDOTC_SUB
CALL ACC_CDOTC_SUB( N, CX, INCX, CY, INCY, RESULT )
WCDOTC = RESULT
END FUNCTION
COMPLEX FUNCTION WCDOTU( N, CX, INCX, CY, INCY )
... | bsd-3-clause | FORTRAN |
b3ff803df5f60136238b2a4b3fc149c999cac41e | Add diff.f90. | memmett/minipfasst,memmett/minipfasst,memmett/minipfasst | examples/navier-stokes/diff.f90 | examples/navier-stokes/diff.f90 | program main
use pfasst
use feval
use transfer
use hooks
use probin
type(pf_level) :: fine, crse
real(pfdp), allocatable :: q_fine(:), q_itrp(:), q_crse(:)
character(len=128) :: fname
integer :: i
!
! build mock pfasst levels
!
npts(1:2) = [ 128, 256 ]
crse%level = 1
... | bsd-2-clause | FORTRAN | |
54344d758c818c91de62a68b83019333c109d6cc | Test some meaningful communication over MPI channel | nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura | attic/fortran-mpi-test/main.f90 | attic/fortran-mpi-test/main.f90 | program main
implicit none
include "mpif.h"
integer :: i
integer :: mpi_err, req_recv, req_send
double precision, dimension(42) :: U
double precision, dimension(42) :: V
call mpi_init(mpi_err)
do i = 1, 42
U(i) = i*(i+1)
end do
call mpi_irecv(V, 42*8, MPI_BYTE, 0, 0, mpi_comm_world, req_r... | program main
implicit none
include "mpif.h"
integer :: mpi_err, mpi_req
double precision, dimension(42) :: U
call mpi_init(mpi_err)
call mpi_irecv(U, 42*8, MPI_BYTE, 0, 0, mpi_comm_world, mpi_req ,mpi_err)
call mpi_finalize(mpi_err)
end program main
| mit | FORTRAN |
2a5fa9ee5b56ad5e6f7b24615aa48922680854fe | Update refrence #215 | clementval/claw-compiler,clementval/claw-compiler | test/loops/fusion11/reference.f90 | test/loops/fusion11/reference.f90 | PROGRAM ecmwf_case1
INTEGER :: jl
INTEGER :: jm
!$acc kernels
!$acc loop
DO jl = 1 , 10 , 1
PRINT * ,"1st jl loop body"
!$acc loop
DO jm = 1 , 10 , 1
IF ( .TRUE. ) THEN
PRINT * ,"2nd jm/jl loop body"
END IF
END DO
!$acc loop
DO jm = 1 , 10 , 1
IF ( .TRUE. ) THEN
PRINT * ,"4th jm/jl loop bo... | PROGRAM ecmwf_case1
INTEGER :: jl
INTEGER :: jm
!$acc kernels
!$acc loop
DO jl = 1 , 10 , 1
PRINT * ,"1st jl loop body"
!$acc loop
DO jm = 1 , 10 , 1
IF ( .TRUE. ) THEN
PRINT * ,"2nd jm/jl loop body"
END IF
END DO
!$acc loop
DO jm = 1 , 10 , 1
IF ( .TRUE. ) THEN
PRINT * ,"4th jm/jl loop bo... | bsd-2-clause | FORTRAN |
4f185cab3ac9712998754e2fedebf2420f17ccd1 | Print out some instructions to the user of the program | rangsimanketkaew/NWChem | src/config/da_rec_size.f | src/config/da_rec_size.f | C This is a simple program to determine the units of the Fortran
c direct access record length. It writes 2 records of 512 units
c each. Simply run this program and check the size resulting file
c 'da_rec_size.test' (in bytes) using 'ls' and divide by 1024 units.
C
Program da_rec_size
C$Id: da_r... | C This is a simple program to determine the units of the Fortran
c direct access record length. It writes 2 records of 512 units
c each. Simply run this program and check the size resulting file
c 'da_rec_size.test' (in bytes) using 'ls' and divide by 1024 units.
C
Program da_rec_size
C$Id: da_r... | mit | FORTRAN |
0ced6e8599ac30b9dc7d2aafb11df6d468c84230 | include a simple test case at the end of bootstrap file | ivanstojic/ironhand,ivanstojic/ironhand | forth/arm926ejs.fpp | forth/arm926ejs.fpp | #include "forth/ironhand.fpp"
65 EMIT
: DIDDLE 0 1 = IF 65 EMIT THEN 5 5 = IF 66 EMIT THEN ;
66 EMIT
.S
-MARK-
DIDDLE
| #include "forth/ironhand.fpp"
65 EMIT
: DIDDLE 0 1 = IF 65 EMIT THEN 5 5 = IF 66 EMIT THEN
66 EMIT
| mit | FORTRAN |
fc539b17949f6acf3aa48ad7fe06041b09bfebd2 | Use cellave2 to get initial conditions | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | applications/manyclaw/2d/simple/qinit.f | applications/manyclaw/2d/simple/qinit.f | c =====================================================
subroutine qinit(maxmx,maxmy,meqn,mbc,mx,my,xlower,ylower,
& dx,dy,q,maux,aux)
c =====================================================
c # Set initial conditions for q.
c # Sample scalar equation with data that is pie... | c =====================================================
subroutine qinit(maxmx,maxmy,meqn,mbc,mx,my,xlower,ylower,
& dx,dy,q,maux,aux)
c =====================================================
c # Set initial conditions for q.
c # Sample scalar equation with data that is pie... | bsd-2-clause | FORTRAN |
53f24b8f5f8f840cc82bd1a04e0e37327368bb77 | Update maxmem.f95 | chtheodoro/habfuzz | habfuzz/maxmem.f95 | habfuzz/maxmem.f95 | subroutine maxmem
use fdeclarations
implicit none
do i=1,z
hs(i)=max(high(i),good(i),moderate(i),poor(i),bad(i))
if (hs(i)>0) then
if (hs(i)==high(i)) then
aa(i,zz)=0.9
else if (hs(i)==good(i)) then
aa(i,zz)=0.7
else if (hs(i)==moderate(i)) then
aa(i,zz)=0.5
else if (hs(i)==poor(i)) then
aa(i,zz)=0.3... | subroutine maxmem
use fdeclarations
implicit none
do i=1,z
hs(i)=max(high(i),good(i),moderate(i),poor(i),bad(i))
if (hs(i)>0) then
if (hs(i)==high(i)) then
aa(i,zz)=0.9
else if (hs(i)==good(i)) then
aa(i,zz)=0.7
else if (hs(i)==moderate(i)) then
aa(i,zz)=0.5
else if (hs(i)==poor(i)) then
aa(i,zz)=0.3... | apache-2.0 | FORTRAN |
11c34f98fdba23e500cfd5aa174419def3409793 | Update reference for fusion8 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/fusion8/reference.f90 | test/loops/fusion8/reference.f90 | PROGRAM test
INTEGER :: i
INTEGER :: j
!$claw loop-fusion
DO i = 1 , 10 , 1
j = i
END DO
j = 20
!$claw loop-fusion
DO i = 1 , 10 , 1
IF ( j < 15 ) THEN
j = i
PRINT * ,"HERE"
END IF
END DO
END PROGRAM test
| PROGRAM test
INTEGER :: i
INTEGER :: j
!$claw loop-fusion
DO i = 1 , 10 , 1
j = i
END DO
j = 20
!$claw loop-fusion
DO i = 1 , 10 , 1
IF ( j < 15 ) THEN
j = i
PRINT * ,"HERE"
END IF
END DO
END PROGRAM test
| bsd-2-clause | FORTRAN |
e45f6df9338e40f7ed1bf3004b55296345197771 | Fix refinement so it doesn't sweep over ghost cells | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | applications/shallow/2d/ridge_fclaw/tag4refinement.f | applications/shallow/2d/ridge_fclaw/tag4refinement.f | subroutine tag_for_refinement(mx,my,mbc,meqn,xlower,ylower,dx,dy,
& q,init_flag, tag_patch)
implicit none
integer mx,my, mbc, meqn, tag_patch, init_flag
double precision xlower, ylower, dx, dy
double precision q(1-mbc:mx+mbc,1-mbc:my+mbc,meqn)
integer i,j, mq,m
doub... | subroutine tag_for_refinement(mx,my,mbc,meqn,xlower,ylower,dx,dy,
& q,init_flag, tag_patch)
implicit none
integer mx,my, mbc, meqn, tag_patch, init_flag
double precision xlower, ylower, dx, dy
double precision q(1-mbc:mx+mbc,1-mbc:my+mbc,meqn)
integer i,j, mq,m
doub... | bsd-2-clause | FORTRAN |
f2e6604fd0cae700fb00fbec9ed0af7021767057 | Tweak comment. | FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot | bindings/f95/strutil.f90 | bindings/f95/strutil.f90 | ! $Id$
!
! Copyright (C) 2004 Alan W. Irwin
!
! This file is part of PLplot.
!
! PLplot is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Library Public License as published
! by the Free Software Foundation; either version 2 of the License, or
! (at your option) any later... | ! $Id$
!
! Copyright (C) 2004 Alan W. Irwin
!
! This file is part of PLplot.
!
! PLplot is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Library Public License as published
! by the Free Software Foundation; either version 2 of the License, or
! (at your option) any later... | lgpl-2.1 | FORTRAN |
c3bdcd68c9f4c05b6b3572ee2c8eee0d46c478b6 | Update reference for interchange2 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/interchange2/reference.f90 | test/loops/interchange2/reference.f90 | PROGRAM loop_interchange
CALL clawloop ( )
END PROGRAM loop_interchange
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
INTEGER :: k
INTEGER :: a
INTEGER :: b
INTEGER :: c
INTEGER :: x
INTEGER :: y
INTEGER :: z
DO k = 1 , 2 , 1
DO i = 1 , 4 , 1
DO j = 1 , 3 , 1
PRINT * ,"Iteration i=" , i ,"... | PROGRAM loop_interchange
CALL clawloop ( )
END PROGRAM loop_interchange
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
INTEGER :: k
INTEGER :: a
INTEGER :: b
INTEGER :: c
INTEGER :: x
INTEGER :: y
INTEGER :: z
DO k = 1 , 2 , 1
DO i = 1 , 4 , 1
DO j = 1 , 3 , 1
PRINT * ,"Iteration i=" , i ,", j... | bsd-2-clause | FORTRAN |
3ae6a3090db0539abbef4fe0c0f338bdd83a4446 | fix typo | kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-p... | Fortran/ModernFortran/tsunami/mod_diff.f90 | Fortran/ModernFortran/tsunami/mod_diff.f90 | module mod_diff
! Module that provides finite difference functions.
use iso_fortran_env, only: real32
implicit none
private
public :: diffc, diffu
contains
pure function diffc(x) result(dx)
! Returns a centered difference of a 1-d array,
! with periodic boundary con... | module mod_diff
! Module that provides finite difference functions.
use iso_fortran_env, only: real32
implicit none
private
public :: diffc, diffu
contains
pure function diffc(x) result(dx)
! Returns a centered difference of a 1-d array,
! with periodic boundary con... | mit | FORTRAN |
9a06f1813b9265c56d504480d70fa0ce7a44f9e3 | Update reference code | clementval/claw-compiler,clementval/claw-compiler | test/claw/kcache2/reference.f90 | test/claw/kcache2/reference.f90 | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL kcache ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE kcache ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN) :: js... | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL kcache ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE kcache ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN) :: js... | bsd-2-clause | FORTRAN |
eee1895b6a62665162cd3e72c4aeb4fdb08cea59 | Update reference for hoist1 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/hoist1/reference.f90 | test/loops/hoist1/reference.f90 | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
INTEGER :: iend = 2
INTEGER :: jend = 4
INTEGER :: kend = 2
INTEGER :: k
DO i = 0 , iend , 1
DO j = 0 , jend , 1
DO k = 0 , kend , 1
IF ( i == 0 ) THEN
PRINT * ,"First iteration of... | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
INTEGER :: iend = 2
INTEGER :: jend = 4
INTEGER :: kend = 2
INTEGER :: k
DO i = 0 , iend , 1
DO j = 0 , jend , 1
DO k = 0 , kend , 1
IF ( i == 0 ) THEN
PRINT * ,"First iteration of i"... | bsd-2-clause | FORTRAN |
3da79bae6ca83d51e68cc1de2cf67694c7689389 | Fix NAG errors. | UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-RITS/pi_examples,UCL-R... | fortran_pi_dir/pi.f90 | fortran_pi_dir/pi.f90 | program pi
implicit none
double precision :: step, x, sum, mypi, start, stop
integer*8 :: num_steps, i
character(len=32) :: arg
num_steps = 1000000000
! Get command line args (Fortran 2003 standard)
if (command_argument_count() > 0) then
call get_command_argument(1, arg)
read(arg,*) n... | program pi
implicit none
double precision :: step, x, sum, mypi, start, stop
integer(kind=8) :: num_steps, i
character(len=32) :: arg
num_steps = 1000000000
! Get command line args (Fortran 2003 standard)
if (command_argument_count() > 0) then
call get_command_argument(1, arg)
read(arg,*) n... | cc0-1.0 | FORTRAN |
9d41427f778c04331505bab8f576c77d3f4ec7b1 | Update reference for call1 test case | clementval/claw-compiler,clementval/claw-compiler | test/claw/directive/call1/reference.f90 | test/claw/directive/call1/reference.f90 | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL call_test ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE call_test ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN... | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL call_test ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE call_test ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN)... | bsd-2-clause | FORTRAN |
237a6306428937aeeec21ac41895fc9bbb95a7b5 | Move check.f to selci_check.f to avoid name conflicts in ar. | rangsimanketkaew/NWChem | src/selci/selci_check.f | src/selci/selci_check.f | subroutine selci_check(node)
*
* $Id: selci_check.f,v 1.1 2003-04-07 20:55:54 windus Exp $
*
logical opn
character*80 filename
do i = 1, 99
if (i.ne.5 .and. i.ne.6) then
inquire(i,opened=opn,name=filename)
if (opn) then
write(6,*) ' node ', node, '... | mit | FORTRAN | |
e9f7d197b9d303e995d4fa8b73b5af38f42cf39f | Make co_heat test numerically stable & stricter | sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays | src/tests/integration/pde_solvers/coarrayHeatSimplified/main.f90 | src/tests/integration/pde_solvers/coarrayHeatSimplified/main.f90 | ! Coarray 1D Heat Equation Solver Test: main
!
! Copyright (c) 2012-2014, Sourcery, Inc.
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met:
! * Redistributions of source code must retain the abov... | ! Coarray 1D Heat Equation Solver Test: main
!
! Copyright (c) 2012-2014, Sourcery, Inc.
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met:
! * Redistributions of source code must retain the abov... | bsd-3-clause | FORTRAN |
487ac1235a59bb9a5cc65d4f5690e5c9638c20fc | Update reference for remove2 test case | clementval/claw-compiler,clementval/claw-compiler | test/utilities/remove2/reference.f90 | test/utilities/remove2/reference.f90 | PROGRAM remove2
CALL dummy ( )
END PROGRAM remove2
SUBROUTINE dummy ( )
INTEGER :: k
INTEGER :: i
INTEGER :: kend = 5
INTEGER :: iend = 10
DO k = 1 , kend , 1
DO i = 1 , iend , 1
END DO
DO i = 1 , iend , 1
END DO
END DO
END SUBROUTINE dummy
| PROGRAM remove2
CALL dummy ( )
END PROGRAM remove2
SUBROUTINE dummy ( )
INTEGER :: k
INTEGER :: i
INTEGER :: kend = 5
INTEGER :: iend = 10
DO k = 1 , kend , 1
DO i = 1 , iend , 1
END DO
DO i = 1 , iend , 1
END DO
END DO
END SUBROUTINE dummy
| bsd-2-clause | FORTRAN |
8255bd5ec40e329ba3ea1c1b4f7dde8f0fd998ac | Normalize directly | certik/climate,certik/climate | utils/averages.f90 | utils/averages.f90 | module averages
use types, only: dp
use constants, only: pi
implicit none
private
public arit, arit2
contains
real(dp) function arit(longitude, latitude, field, mask) result(r)
! field is (long, lat), mask is the same shape,
! only .true. elements will be considered
! longitude is [-180, 180], latitude is [-90, 90]
r... | module averages
use types, only: dp
use constants, only: pi
implicit none
private
public arit, arit2
contains
real(dp) function arit(longitude, latitude, field, mask) result(r)
! field is (long, lat), mask is the same shape,
! only .true. elements will be considered
! longitude is [-180, 180], latitude is [-90, 90]
r... | mit | FORTRAN |
8ccde67e004321eda0afb7bebc22fe91cca4757a | Revert the fail clause in regression/reported/issue-552-send_by_ref-singleton.f90 Relax the test failure until the bug is found ... FIXME: The data is not put correctly on remote by MPI_Put, only a single dtype value is set | sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays | src/tests/regression/reported/issue-552-send_by_ref-singleton.f90 | src/tests/regression/reported/issue-552-send_by_ref-singleton.f90 | program main
implicit none
type co_obj ! the test does not fail with pure coarrays, only when using coarrays in derived types
real, allocatable, dimension(:, :, :) :: a[:], b, c, d, e
end type
type(co_obj) :: co
integer :: me, remote, nimg, i, j, k, ni, nj, nk
logical :: fail
me = this_ima... | program main
implicit none
type co_obj ! the test does not fail with pure coarrays, only when using coarrays in derived types
real, allocatable :: a(:, :, :)[:], b(:, :, :)
end type
integer :: me, remote, nimg
type(co_obj) :: co
me = this_image()
nimg = num_images()
remote = merge(2, 1,... | bsd-3-clause | FORTRAN |
f3fc7f6590834cf3d473c8d857ffb97ffbcaca8f | Put gof default value back to how it was | drewleonard42/CoronaTemps | fitsmodule.f90 | fitsmodule.f90 | SUBROUTINE calc_fits(images, model, parvals, n_vals, n_wlens, x, y, n_pars, results)
IMPLICIT NONE
INTEGER, INTENT(IN) :: n_vals, n_wlens, x, y, n_pars
REAL, DIMENSION(n_vals, n_pars), INTENT(IN) :: parvals
REAL, DIMENSION(n_vals, n_wlens), INTENT(IN) :: model
REAL, DIMENSION(n_wlens, x, y), INTENT(IN) :: images
REAL,... | SUBROUTINE calc_fits(images, model, parvals, n_vals, n_wlens, x, y, n_pars, results)
IMPLICIT NONE
INTEGER, INTENT(IN) :: n_vals, n_wlens, x, y, n_pars
REAL, DIMENSION(n_vals, n_pars), INTENT(IN) :: parvals
REAL, DIMENSION(n_vals, n_wlens), INTENT(IN) :: model
REAL, DIMENSION(n_wlens, x, y), INTENT(IN) :: images
REAL,... | bsd-2-clause | FORTRAN |
1331ac4ef4a723d3d8353cd3ce90c9bf127fe547 | use allocatable instead of static | scienceopen/python-performance,scienceopen/python-performance,scienceopen/python-performance | matmul/intel_dgemm.f90 | matmul/intel_dgemm.f90 | program intel_dgemm
use,intrinsic :: iso_fortran_env, only: dp=>real64
IMPLICIT NONE (type, external)
external :: dgemm
real(dp) ALPHA, BETA
INTEGER M, K, N, I, J
PARAMETER (M=2000, K=200, N=1000)
real(dp), allocatable :: A(:,:), B(:,:), C(:,:)
allocate(A(M,K), B(K,N), C(M,N))
PRINT *, "Initializin... | program intel_dgemm
use,intrinsic :: iso_fortran_env, only: dp=>real64
IMPLICIT NONE (type, external)
external :: dgemm
real(dp) ALPHA, BETA
INTEGER M, K, N, I, J
PARAMETER (M=2000, K=200, N=1000)
real(dp) A(M,K), B(K,N), C(M,N)
PRINT *, "Initializing data for matrix multiplication C=A*B for "
PRINT... | mit | FORTRAN |
af7221595b523b39a4f3dd967f2170584035c392 | Write more on finalist | nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura | examples/finalist-main.f90 | examples/finalist-main.f90 | program main
use finalist
implicit none
type(Formura_Navigator) :: navi
Formura_Init(navi, MPI_COMM_WORLD)
call init()
contains
subroutine init()
end subroutine init
end program main
| program main where
use finalist
implicit none
call init()
contains
subroutine init()
print *, 42
end subroutine init
end program main
| mit | FORTRAN |
f0bdd5a94c05973da24d4b2cb0f19671e61cedea | Add stereo_project | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | src/stereo_project.f90 | src/stereo_project.f90 | program main
implicit none
character(len=128) :: line
integer :: ios, luin, luout
character(len=1024) :: input_file, output_file
character(len=64) :: mode
double precision :: lon0, lat0, lon, lat, radius
double precision :: k, x, y, rho, c, arg1
double precision, parameter :: d2r = datan(1.0d0)*4.0d0/1.8d2
logical :: e... | mit | FORTRAN | |
5bb444da6443b310b97cc71c1b661264d4bbcd29 | Work on 2015-01-26. | spencer4of6/cfd-pkg-fortran,spencer4of6/cfd-pkg-fortran,spencer4of6/cfd-pkg-fortran,spencer4of6/cfd-pkg-fortran | projects/finite_volume_method/main.f90 | projects/finite_volume_method/main.f90 | program main
implicit none
! DATA DICTIONARY
real::mesh_size, x_dim=1.0, y_dim=1.0
integer::n, m
real,allocatable::a_p(:,:), a_n(:,:), a_s(:,:), a_e(:,:), a_w(:,:), phi(:,:), gamma(:,:)
integer::i,j,k
real::delta,relaxation=0.8
! GET THE MESH SIZE
write(*,*)'Enter the mesh size:'
read(*,*)mesh_size
if (mesh_size > 1.... | program main
implicit none
! DATA DICTIONARY
real::mesh_size, x_dim=1.0, y_dim=1.0
integer::n, m
real,allocatable::a_n(:,:), a_s(:,:), a_e(:,:), a_w(:,:), phi(:,:), gamma(:,:)
integer::i,j,k
real::a_p,delta,relaxation=0.8
! GET THE MESH SIZE
write(*,*)'Enter the mesh size:'
read(*,*)mesh_size
if (mesh_size > 1.0) the... | mit | FORTRAN |
dfc0a53afd0b4e9de015e28725296c3a2b04ee5c | update writpop.for | rtagirov/nessy | src/writpop.for | src/writpop.for | module MOD_WRITPOP
contains
subroutine writpop(ifl,T,popnum,pop1,pop2,pop3,rne,n,nd,modhead,jobnum)
use MOD_WRITMS
use MOD_WRITMSI
IMPLICIT REAL*8(A-H,O-Z)
real*8 T(:),RNE(:),POP1(*),POP2(*),POP3(*)
real*8 POPNUM(*)
CHARACTER CNAME*10, MODHEAD*104
! CNAM... | module MOD_WRITPOP
contains
subroutine writpop (ifl,T,popnum,pop1,pop2,pop3,rne,n,nd,
$ modhead,jobnum)
use MOD_WRITMS
use MOD_WRITMSI
c subroutine writpop (ifl,T,popnum,pop1,pop2,pop3,rne,xneclc,n,nd,
c234567890 234567890 234567890 234567890 234567890 234567890 234567890 2
... | mit | FORTRAN |
ca31d2c86e25f4bffb774ac61d3ac4669f19fab2 | Add a data binner. | jungerstein/plasmaPhyLib,jungerstein/plasmaPhyLib | utils/binner/binner.f90 | utils/binner/binner.f90 | ! binner.f90
! Module of bin summary.
module bin
type countBin
double precision, dimension (:), allocatable :: binBoundaries
integer, dimension (:), allocatable :: binCounts
integer :: n
logical :: isLog
end type countBin
contains
! Allocate memory for a bin. Must be deallocated.
subroutine alloc... | apache-2.0 | FORTRAN |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.