APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
132 stars 161 forks source link

Running APSIM-NG on the UQ HPC #3534

Closed BrianCollinss closed 5 years ago

BrianCollinss commented 5 years ago

This is a question, not an issue. There are some information on APSIM website about running APSIM-NG on Azure. Obviously It is not a free service and I have no idea who I should talk to for purchasing it and what requirements we need to make sure we can meet. Has someone here ever successfully run APSIM-NG on the UQ HPC?

hol430 commented 5 years ago

See this page on the website - you'll need an Azure account, an Azure batch account, and an Azure storage account. The advantage of using Azure is that you can submit an apsim job directly from the UI with a minimum of hassle.

@peter-devoil might know more about using the UQ HPC.

BrianCollinss commented 5 years ago

Thanks Drew. I was just wondering whether someone has tried the UQ HPC as Azure is not free (no idea if the initial free period offers everything that is needed). Cheers.

peter-devoil commented 5 years ago

Here's some files to a) build a singularity container b) submit jobs c) run container on executing node

UQ HPC.zip

byzheng commented 5 years ago

It is not necessary to compile APSIM NG under linux.

See my setting to run APSIM NG in travis-ci: https://github.com/byzheng/APSIM-Wheat-Sens

peter-devoil commented 5 years ago

Yes, this downloads a .deb file from the website, and runs it on non-ubuntu systems that use singularity. Singularity is (often) used when you don't have admin access to install software on the executing machine.

byzheng commented 5 years ago

It might be useful to provide a docker for APSIM NG to run in any places.

BrianCollinss commented 5 years ago

UQ_HPC.zip

Peter (@peter-devoil) has put some nice scripts together to run APSIM-NG on the UQ HPC clusters and I added Drew's (@hol430) script to automatically retrieve the URL of the latest build (i.e. .deb file) of APSIM-NG from the web-server. I put it here in case someone else needs it. Courtesy of Mr deVoil! Use it at your own risk :)

This is the order in which the files should be executed (on Linux!):

1- Install.sh, which installs the latest version (here 2.5.2) of singularity. You can skip this stage if it is already installed on your machine.

2- buildAutoURL.sh, which reads SingularityAutoURL.ubuntu and creates an image file named apsimx.simg which contains APSIM-NG. The image file has to be uploaded on the UQ cluster. You can rename it to something like ApsimX-3537.simg to show the APSIM-NG version you are using.

3- submit.sh, which constructs a PBS job on UQ HPC for each APSIM job. It calls run.sh to run APSIM-NG on multiple machines. You need to update the path to the image file in run.sh, which could be a folder on your home directory on the cluster. This file is similar to the PBS file previously created by BundleApsim.exe, which put .apsim files and other required files (e.g. weather) together, and was used to run the classic APSIM on the cluster. If you create your own, for example, R scripts to run APSIM-NG, you may not need this file. You can use a script similar to that in run.sh within an R script to run the model.

Most probably, you need to make changes to adapt this to your needs. But it provides a solid starting point.

hol353 commented 5 years ago

Well done on getting this together and uploading to this issue. I suspect it will be useful to many people.