sudo /home/galtay/Downloads/linux-programs/hdf5/hdf5-1.8.6/configure FC=gfortran-4.5 --enable-fortran --prefix=/opt/hdf5-1.8.6-gfortran-4.5
sudo make
sudo make install
I'm a computational cosmologist trying to remember all the little code tricks I've stumbled upon. I work mostly in Fortran 90/03 and IDL but I'm learning some Python, C, and C++.
sudo /home/galtay/Downloads/linux-programs/hdf5/hdf5-1.8.6/configure FC=gfortran-4.5 --enable-fortran --prefix=/opt/hdf5-1.8.6-gfortran-4.5
sudo make
sudo make install
sudo ~/Downloads/linux-programs/openmpi-1.4.4/configure --prefix=/opt/openmpi-1.4.4-gfortran-4.5 F77=gfortran-4.5 FC=gfortran-4.5
sudo make all install
module main
contains
subroutine print_int(a)
integer :: a
write(*,*) 'Hello from Fortran'
write(*,*) 'a = ', a
end subroutine print_int
subroutine print_mat_val( a )
integer :: a(0:2,0:2)
write(*,*) 'a(1,2) = ', a(1,2)
end subroutine print_mat_val
end module main
f2py --fcompiler=gnu95 -c -m main main.f90
import main
import numpy as np
a = np.array([[1,2,3],[4,5,6],[7,8,9]])
main.main.print_int(5)
main.main.print_mat_val(a)
python example.py