USCqserver / OpenQuantumTools.jl

Julia toolkit for open quantum system simulation.
https://uscqserver.github.io/OpenQuantumTools.jl/stable/
MIT License
72 stars 12 forks source link

Add a tutorial for the HPC implementation of the AME-trajectory simulation #81

Open neversakura opened 3 years ago

neversakura commented 3 years ago

The notebook may not be the best approach for this tutorial. It may be better to write it directly in the documentation.

arshpreetmaan commented 2 years ago

can you please point me to a tutorial on how to use it on a hpc system?

neversakura commented 2 years ago

Sorry, the current documentation/tutorials on this topic are kind of lacking. The best you can follow right now is the last section of this AME Tutorial.

Here is an outline of what you need to do: (1) First lunch the Julia process on a cluster using a ClusterManager (See the Distributed Computing and ClusterManager.jl for how to do this). (2) Then define the problem following the aforementioned tutorial. Make sure to define the problem on each remote worker using the @everywhere macro. (3) Run the solve function as demonstrated in the tutorial

# the following code block is slow if running with a single thread
# to use multi-threads, you need to start the Julia kernel with multiple threads
# julia --threads 8
sol = solve(prob, Tsit5(), EnsembleThreads(), trajectories=num_trajectories, reltol=1e-6, saveat=range(0,tf,length=100))

but replace the third argument with EnsembleDistributed().

Following the above steps, you can run every supported type of trajectory simulation on multiple nodes of an HPC system.