@Article{Awile:2014:PWF, author = "Omar Awile and Ivo F. Sbalzarini", title = "A pthreads wrapper for {Fortran} 2003", journal = "{ACM} Transactions on Mathematical Software", volume = 40, number = 3, year = 2014, month = apr, pages = "19:1--19:15", url = "http://doi.acm.org/10.1145/2558889", accepted = "31 October 2013", abstract = " With the advent of multicore processors, numerical and mathematical software relies on parallelism in order to benefit from hardware performance increases. We present the design and use of a Fortran 2003 wrapper for POSIX threads, called forthreads. Forthreads is complete in the sense that is provides native Fortran 2003 interfaces to all pthreads routines where this is possible. We demonstrate the use and efficiency of forthreads for SIMD parallelism and task parallelism. We present forthreads/MPI implementations that enable hybrid shared-/distributed-memory parallelism in Fortran 2003. Our benchmarks show that forthreads offers performance comparable to that of OpenMP, but better thread control and more freedom. We demonstrate the latter by presenting a multi-threaded Fortran 2003 library for POSIX internet sockets, enabling interactive numerical simulations with run-time control.", }