The behavior of lubricants at operational conditions, such as at high pressures, is a topic of great industrial interest. In particular, viscosity and the viscosity-pressure relation are especially important for applications and their determination by computational simulations is very desirable. In this study we evaluate methods to compute these quantities based on fully atomistic molecular dynamics simulations which are computationally demanding but also have the potential to be most accurate. We used the 9,10dimethyloctadecane molecule, main component of PAO-2 base oil as the lubricant for our tests. The methods used for the viscosity simulations are the Green-Kubo equilibrium molecular dynamics (EMD-GK) and non-equilibrium molecular dynamics (NEMD), at pressures of up to 1.0 GPa and various temperatures (40-150 degrees Celsius). We present the theory behind these methods and investigate how the simulation parameters affect the results obtained, to ensure viscosity convergence with respect to the A c c e p t e d M a n u s c r i p t simulation intervals and all other parameters. We show that by using each method in its regime of applicability, we can achieve good agreement between simulated and measured values. NEMD simulations at high pressures captured zero shear viscosity successfully, while at 40 degrees Celsius EMD-GK is only applicable to pressures up to 0.3 GPa, where the viscosity is lower. In NEMD, longer and multiply repeated simulations improve the confidence interval of viscosity, which is essential at lower pressures. Another aspect of these methods is the choice of the utilized force field for the atomic interactions. This was investigated by selecting two different commonly used force fields.