Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Set up a PostgreSQL database

    1. Load PostgreSQL module

      Code Block
      module load data/PostgreSQL/16.1-GCCcore-12.3.0
    2. Copy sample configuration

      Code Block
      cp EBROOTPOSTGRESQL$EBROOTPOSTGRESQL/share/postgresql/postgresql.conf.sample postgresql.conf
    3. 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

    4. Create and initialize the data directory. The data directory should be on the parallel file system:

      Code Block
      initdb [path to data directory]
    5. Try to start PostgreSQL:

      Code Block
      postgres -c config_file=postgresql.conf -D [path to data directory]
    6. (while PostgreSQL is running) Create database:

      Code Block
      createdb  -p [port number]
    7. (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;
    8. (while PostgreSQL is running) Test database connection:

      Code Block
      psql -h localhost -d aiida -U aiida -W -p [port number]
  2. 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]/...

...