/* Copyright (c) 2011-2017 Graph500 Steering Committee All rights reserved. Developed by: Anton Korzh anton@korzh.us Graph500 Steering Committee http://www.graph500.org New code under University of Illinois/NCSA Open Source License see license.txt or https://opensource.org/licenses/NCSA*/#ifdef __cplusplusextern"C"{#endif//MPI-like init,finalize callsexternintaml_init(int*,char***);externvoidaml_finalize(void);//barrier which ensures that all AM sent before the barrier are completed everywhere after the barrierexternvoidaml_barrier(void);//register active message function(collective call)externvoidaml_register_handler(void(*f)(int,void*,int),intn);//send AM to another(myself is ok) node//execution of AM might be delayed till next aml_barrier() callexternvoidaml_send(void*srcaddr,inttype,intlength,intnode);// rank and sizeexternintaml_my_pe(void);externintaml_n_pes(void);#ifdef __cplusplus}#endif#define my_pe aml_my_pe#define num_pes aml_n_pes#define aml_time() MPI_Wtime()#define aml_long_allsum(p) MPI_Allreduce(MPI_IN_PLACE,p,1,MPI_LONG_LONG,MPI_SUM,MPI_COMM_WORLD)#define aml_long_allmin(p) MPI_Allreduce(MPI_IN_PLACE,p,1,MPI_LONG_LONG,MPI_MIN,MPI_COMM_WORLD)#define aml_long_allmax(p) MPI_Allreduce(MPI_IN_PLACE,p,1,MPI_LONG_LONG,MPI_MAX,MPI_COMM_WORLD)