Commit 8a1fa247 authored by Sergey Litvinov's avatar Sergey Litvinov
Browse files

add hww/hst

parent 698e3643
include ../../../conf.mk
LD = $(CXX)
UDX_CXXFLAGS = `u.pkg-config udx_cpu --cflags`
UDX_LDFLAGS = `u.pkg-config udx_cpu --libs`
main: main.o; $(LD) $< $(UDX_LDFLAGS) -o $@
main.o: main.cpp; $(CXX) $(CXXFLAGS) $(UDX_CXXFLAGS) $^ -c -o $@
install: main; u.install main $(BIN)
clean:; rm -f main main.o
.PHONY: install clean
#include <mpi.h>
#include <stdio.h>
#include "utils/mc.h"
#include "utils/msg.h"
#include "mpi/glb.h"
#include "mpi/wrapper.h"
#include "utils/mc.h"
int main(int argc, char **argv) {
int rank, size, dims[3];
MPI_Comm cart;
m::ini(&argc, &argv);
m::get_dims(&argc, &argv, dims);
m::get_cart(MPI_COMM_WORLD, dims, &cart);
MC(m::Comm_rank(cart, &rank));
MC(m::Comm_size(cart, &size));
msg_ini(rank);
msg_print("mpi size: %d", size);
msg_print("Hello world!");
MC(m::Barrier(cart));
m::fin();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment