Source-linked AI summary
C programs for solving the time-dependent Gross-Pitaevskii equation in a fully anisotropic trap
Dusan Vudragovic, Ivana Vidanovic, Antun Balaz, Paulsamy Muruganandam, Sadhan K. Adhikari
TL;DR
The paper addresses the need for C programs that compute stationary and non-stationary solutions of the time-dependent GP equation across diverse trap geometries. It translates earlier Fortran programs, adds OpenMP-threaded versions and compiler support, and reports almost linear speedup with execution-time reductions by an order of magnitude on modern multicore computers.
Problem
The paper provides programs for calculating stationary and non-stationary solutions of the time-dependent GP equation describing dilute Bose-Einstein condensates.
Method
The authors translate the Fortran programs to C, retain split-step Crank-Nicolson propagation in real and imaginary time, and add six OpenMP-parallelized programs with documented inputs and makefiles.
Results
The 18-program package covers multiple one-, two-, and three-dimensional trap geometries, while threaded codes show almost linear speedup and execution-time reductions by an order of magnitude.
Takeaways & Limitations
The package supports GP simulations in C across varied trap geometries and can use available CPU cores through OpenMP-parallelized programs.
Abstract
from arXiv · showhide
We present C programming language versions of earlier published Fortran programs (Muruganandam and Adhikari, Comput. Phys. Commun. 180 (2009) 1888) for calculating both stationary and non-stationary solutions of the time-dependent Gross-Pitaevskii (GP) equation. The GP equation describes the properties of dilute Bose-Einstein condensates at ultra-cold temperatures. C versions of programs use the same algorithms as the Fortran ones, involving real- and imaginary-time propagation based on a split-step Crank-Nicolson method. In a one-space-variable form of the GP equation, we consider the one-dimensional, two-dimensional, circularly-symmetric, and the three-dimensional spherically-symmetric harmonic-oscillator traps. In the two-space-variable form, we consider the GP equation in two-dimensional anisotropic and three-dimensional axially-symmetric traps. The fully-anisotropic three-dimensional GP equation is also considered. In addition to these twelve programs, for six algorithms that involve two and three space variables, we have also developed threaded (OpenMP parallelized) programs, which allow numerical simulations to use all available CPU cores on a computer. All 18 programs are optimized and accompanied by makefiles for several popular C compilers. We present typical results for scalability of threaded codes and demonstrate almost linear speedup obtained with the new programs, allowing a decrease in execution times by an order of magnitude on modern multi-core computers.
Abstract
The package provides C implementations for solving time-dependent GP equations across multiple trap geometries, with serial and OpenMP-parallelized programs. It includes documented inputs, compiler-specific makefiles, and threaded implementations intended to improve execution time on multicore computers.
- The threaded programs are designed to use all available CPU cores, and the paper reports scalability results showing almost linear speedup and execution-time reductions by an order of magnitude.Figure 1 evaluates realtime2d-th and realtime3d-th as functions of CPU-core count.
- The GP-SCL package contains 18 C programs for stationary and non-stationary time-dependent GP solutions in one, two, and three spatial dimensions.The programs cover harmonic, circularly symmetric, spherically symmetric, axially symmetric, and fully anisotropic traps.
- The programs use split-step Crank-Nicolson propagation in either imaginary or real time after discretizing space and time.Imaginary-time propagation addresses stationary problems, while real-time propagation is used for time evolution.
- The revision translates the earlier Fortran programs into C and adds comprehensive input files plus tested makefiles for several popular compilers.Supported compiler settings include gcc, icc, xlc, pgcc, and suncc.
- Six of the 18 programs are threaded with OpenMP, while the remaining 12 are serial.The threaded programs parallelize computationally demanding loops involved in time evolution, normalization, and physical-quantity calculations.
New version program summary (i)
imagtime1d solves the one-dimensional time-dependent GP equation in a harmonic trap using imaginary-time split-step Crank-Nicolson propagation to obtain stationary solutions.
- imagtime1d addresses the time-dependent GP nonlinear partial differential equation in one space dimension with a harmonic trap.The equation describes a dilute trapped Bose-Einstein condensate.
- The program discretizes the equation in space and time before propagating it over small imaginary-time steps.Its implementation language is C.
- The method yields solutions of stationary problems.The listed typical running time is 2 minutes on CPU1 and 1 minute on CPU2.
New version program summary (ii)
imagtime2d solves the two-dimensional time-dependent GP equation in an anisotropic trap using imaginary-time split-step Crank-Nicolson propagation for stationary solutions.
- imagtime2d addresses the time-dependent GP nonlinear partial differential equation in two space dimensions with an anisotropic trap.The equation describes a dilute trapped Bose-Einstein condensate.
- The program discretizes space and time and propagates the discretized equation over small imaginary-time steps.The implementation is written in C.
- The method yields stationary solutions, with a typical running time of 30 minutes on CPU1 and 20 minutes on CPU2.
New version program summary (iii)
imagtime2d-th is the OpenMP-parallelized two-dimensional anisotropic-trap counterpart of imagtime2d, using imaginary-time split-step Crank-Nicolson propagation for stationary solutions.
- imagtime2d-th is written in C/OpenMP for the two-dimensional GP equation with an anisotropic trap.The equation describes a dilute trapped Bose-Einstein condensate.
- It discretizes the equation in space and time and propagates the discretized system over small imaginary-time steps.This is the same split-step Crank-Nicolson approach listed for the program.
- The program is intended to produce stationary solutions and has a typical running time of 15 minutes on CPU1 and 5 minutes on CPU2.
New version program summary (iv)
These programs provide C implementations for imaginary-time GP calculations in circularly symmetric and three-dimensional anisotropic or threaded anisotropic traps. The threaded three-dimensional anisotropic version uses OpenMP and has shorter typical runtimes than its non-threaded counterpart.
- New version program summary (iv): imagtimecir solves the time-dependent GP nonlinear partial differential equation in two dimensions with a circularly symmetric trap.It is implemented in C, requires 2 MByte of maximum RAM, and typically runs for 2 minutes on CPU1 or 1 minute on CPU2.
- New version program summary (iv): imagtime3d solves the time-dependent GP nonlinear partial differential equation in three dimensions with an anisotropic trap.The C program requires 1.2 GByte of maximum RAM and typically runs for 1.5 hours on CPU1 or 1 hour on CPU2.
- New version program summary (iv): 25 minutes (CPU1), 10 minutes (CPU2): imagtime3d-th is the OpenMP version for the three-dimensional anisotropic-trap problem.It uses C/OpenMP and the same 1.2 GByte maximum RAM specification as imagtime3d.
New version program summary (vii)
These programs address the three-dimensional GP equation in an axially symmetric trap, with C and C/OpenMP implementations. The threaded version has shorter listed typical runtimes than the non-threaded version.
- New version program summary (vii): imagtimeaxial is a C program for the time-dependent GP nonlinear partial differential equation in three dimensions with an axially symmetric trap.Its electronic files are imagtimeaxial.c and imagtimeaxial.h.
- New version program summary (vii): 30 minutes (CPU1), 20 minutes (CPU2): imagtimeaxial lists these typical runtimes for the non-threaded implementation.The program uses C, requires 32 MByte of maximum RAM, and models a dilute trapped Bose-Einstein condensate.
- New version program summary (vii): 10 minutes (CPU2): imagtimeaxial-th lists this typical runtime for the threaded axially symmetric-trap implementation.It uses C/OpenMP and requires 32 MByte of maximum RAM.
New version program summary (ix)
These C programs cover imaginary-time GP calculations in a three-dimensional spherically symmetric trap and real-time calculations in a one-dimensional harmonic trap. Their listed resource requirements and runtimes differ substantially.
- New version program summary (ix): imagtimesph solves the time-dependent GP nonlinear partial differential equation in three dimensions with a spherically symmetric trap.The C program requires 2.5 MByte of maximum RAM and typically runs for 2 minutes on CPU1 or 1 minute on CPU2.
- New version program summary (ix): 2.5 MByte versus 4 MByte: the listed maximum RAM requirements are lower for imagtimesph than for realtime1d.The corresponding typical CPU1 runtimes are 2 minutes and 15 minutes, respectively.
- New version program summary (ix): realtime1d solves the time-dependent GP nonlinear partial differential equation in one space dimension with a harmonic trap.The C program requires 4 MByte of maximum RAM and typically runs for 15 minutes on CPU1 or 10 minutes on CPU2.
New version program summary (xi)
These C programs address two-dimensional anisotropic-trap GP calculations in non-threaded and OpenMP-threaded forms. The threaded program has shorter listed typical runtimes.
- New version program summary (xi): realtime2d solves the time-dependent GP nonlinear partial differential equation in two space dimensions with an anisotropic trap.The C program requires 8 MByte of maximum RAM and typically runs for 15 minutes on CPU1 or 10 minutes on CPU2.
- New version program summary (xi): realtime2d-th is the C/OpenMP version of the two-dimensional anisotropic-trap GP program.It requires 8 MByte of maximum RAM and typically runs for 5 minutes on CPU1 or 2 minutes on CPU2.
- New version program summary (xi): 5 minutes (CPU1), 2 minutes (CPU2): the threaded realtime2d-th has shorter listed runtimes than realtime2d.The non-threaded program lists 15 minutes on CPU1 and 10 minutes on CPU2.
New version program summary (xiii)
These programs solve time-dependent GP equations in circularly symmetric and anisotropic three-dimensional traps using split-step Crank-Nicolson propagation. The implementations target stationary and non-stationary solutions.
- Program scope: realtimecir solves the time-dependent GP nonlinear partial differential equation in two dimensions with a circularly symmetric trap.The program uses C and requires a maximum of 3 MByte of RAM.
- Program scope: realtime3d solves the time-dependent GP nonlinear partial differential equation in three dimensions with an anisotropic trap.The C program requires a maximum of 700 MByte of RAM and typically runs for 15 hours on CPU1 or 12 hours on CPU2.
- Method of solution: The split-step Crank-Nicolson method discretizes the equation in space and time, then propagates the solution in real time over small time steps.This method yields solutions for stationary and non-stationary problems.
New version program summary (xv)
These C programs address time-dependent GP equations in anisotropic and axially symmetric three-dimensional traps, including OpenMP-threaded implementations. They use split-step Crank-Nicolson propagation for numerical solutions.
- Program scope: realtime3d-th solves the three-dimensional time-dependent GP equation in an anisotropic trap using C/OpenMP.Its typical running time is 4 hours on CPU1 and 1.8 hours on CPU2, with a maximum of 700 MByte of RAM.
- Program scope: realtimeaxial solves the three-dimensional time-dependent GP equation in an axially symmetric trap using C.Its typical running time is 10 minutes on CPU1 and 5 minutes on CPU2.
- Program scope: realtimeaxial-th solves the three-dimensional time-dependent GP equation in an axially symmetric trap using C/OpenMP.Its typical running time is 5 minutes on CPU1 and 1 minute on CPU2.
New version program summary (xviii)
These programs solve time-dependent GP equations for spherically symmetric three-dimensional traps using C and split-step Crank-Nicolson propagation. The method supports stationary and non-stationary solutions.
- Program scope: realtimesph is a C program for the time-dependent GP nonlinear partial differential equation in three dimensions with a spherically symmetric trap.Its typical running time is 5 minutes on both CPU1 and CPU2.
- Method of solution: The program solves the time-dependent GP equation by discretizing space and time with the split-step Crank-Nicolson method.The discretized equation is propagated in real time over small time steps.
- Method of solution: The split-step Crank-Nicolson method yields solutions for stationary and non-stationary problems.