The paper presents a parallel language, mpC, aimed at programming heterogeneous networks. The main idea underlying mpC is that an mpC application explicitly defines an abstract heterogeneous network and distributes data, computations and communications over the network. The mpC programming system uses this information to map the abstract network to any real executing network in such a way that ensures efficient running of the application on this real network. The mapping is performed at run time and based on information about performances of processors and links of the real network, dynamically adapting the program to the executing network. The quality of the mapping depends on accuracy of estimation of processor performances. Special attention in the paper is paid to mpC means ensuring high quality of the estimation.