...
 
Commits (2)
f_src = files('kepler.f90', 'kepler_c.f90')
c_src = files('main.c')
executable('kepler', c_src + f_src, dependencies: libm)
executable('kepler', c_src + f_src)
project('fortran', ['fortran', 'c'])
cc = meson.get_compiler('fortran')
libm = cc.find_library('m')
project('fortran', 'fortran')
mpi_dep = dependency('mpi', language: 'fortran', required: false)
openmp_dep = dependency('openmp', required: false)
executable('euclid', 'euclid.f90')
......@@ -12,10 +10,17 @@ executable('kepler', 'kepler.f90')
executable('output', 'output.f90')
executable('random', 'random.f90')
subdir('cbind')
subdir('f77')
subdir('get_pi')
if add_languages('c', required: false)
subdir('cbind')
endif
if mpi_dep.found()
subdir('openmpi')
endif
if openmp_dep.found()
subdir('openmp')
endif
program mpitest
implicit none
include 'mpif.h'
logical :: flag
integer :: ier
call MPI_Init(ier)
if (ier /= 0) then
print *, 'Unable to initialize MPI: ', ier
stop 1
endif
call MPI_Initialized(flag, ier)
if (ier /= 0) then
print *, 'Unable to check MPI initialization state: ', ier
stop 1
endif
call MPI_Finalize(ier)
if (ier /= 0) then
print *, 'Unable to finalize MPI: ', ier
stop 1
endif
end program mpitest
executable('hello', 'hello.f90', dependencies: mpi_dep, override_options: ['b_asneeded=false'])