...
Set up a PostgreSQL database
Load PostgreSQL module
Code Block module load data/PostgreSQL/16.1-GCCcore-12.3.0
Copy sample configuration
Code Block cp EBROOTPOSTGRESQL$EBROOTPOSTGRESQL/share/postgresql/postgresql.conf.sample postgresql.conf
Change the settings in the config
postgresql.conf:
port = : choose some random port (>1024, <65536)
listen_addresses = 'localhost'
unix_socket_directories = '/tmp'
unix_socket_permissions = 0700
Create and initialize the data directory. The data directory should be on the parallel file system:
Code Block initdb [path to data directory]
Try to start PostgreSQL:
Code Block postgres -c config_file=postgresql.conf -D [path to data directory]
(while PostgreSQL is running) Create database:
Code Block createdb -p [port number]
(while PostgreSQL is running) Configure PostgreSQL for AiiDA by running
psql -p [port number]
Code Block ALTER ROLE [your user name] WITH PASSWORD '[some random password]'; CREATE USER aiida WITH PASSWORD '[some random password for user aiida]'; CREATE DATABASE aiida OWNER aiida ENCODING 'UTF8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8'; GRANT ALL PRIVILEGES ON DATABASE aiida to aiida;
(while PostgreSQL is running) Test database connection:
Code Block psql -h localhost -d aiida -U aiida -W -p [port number]
Create an AiiDA profile
Code Block verdi profile setup core.psql_dos --profile-name [AiiDA profile name] --set-as-default --email [your mail] --first-name [your first name] --last-name [your last name] --institution "[your Institution]" --no-use-rabbitmq
PostgreSQL engine [postgresql_psycopg2]:
PostgreSQL hostname [localhost]:
PostgreSQL port [5432]: [port number]
PostgreSQL username: aiida
PostgreSQL password: [passwort for user aiida chosen above]
PostgreSQL database name: aiida
File repository URI: A directory on the parallel file system. it needs to start with file:// , i.e.,
file:///scratch/hpc-prf-[project abbreviation]/...
...