Skip to content

Instantly share code, notes, and snippets.

View aerosayan's full-sized avatar
:octocat:
ASM/C/C++ to rule them all !

Sayan Bhattacharjee aerosayan

:octocat:
ASM/C/C++ to rule them all !
  • Previously working in - Sukra Helitek Inc.
  • Chennai, India
View GitHub Profile
@aerosayan
aerosayan / myalltoall.f90
Created September 16, 2022 15:45 — forked from plampite/myalltoall.f90
A Fortran example of a deadlock avoiding MPI loop among all processes, using a single-line round robin algorithm to schedule the order of communications for each process
program myalltoall
!Program to show a simple implementation of a deadlock avoiding mpi loop among all processes which,
!in principle, is similar to an alltoall loop. However, the main purpose of the technique shown here is to
!properly reorder shortest (i.e., each process with just few others) non-blocking communication loops,
!in order to alleviate the burden on the communication side (as each exchange is matched, everything
!is exchanged very quickly). Here, it is tested against the the mpi_allreduce intrinsic with MPI_SUM
!on a single real variable, but IT IS NOT a replacement for allreduce (nor alltoall or any other intrinsic).
use, intrinsic :: iso_fortran_env, only : int32, real64
use mpi
implicit none
@aerosayan
aerosayan / main.rs
Created March 20, 2024 21:34 — forked from rexim/main.rs
The Most Memory Safe Buffer Overflow in Rust!
// The Most Memory Safe Buffer Overflow in Rust!
//
// Consider all the code below under Public Domain
//
// How to build:
// $ rustc main.rs
//
// Wrong password:
// $ printf "hello\n" | ./main
//