From f73b8c28b0c4329343984b93f6a16c008c788906 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 14:39:41 +0100 Subject: [PATCH 01/15] update cp2k documentation --- docs/software/sciapps/cp2k.md | 53 ++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 30f32aee..4a58e94c 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -63,11 +63,11 @@ MPS] daemon so that multiple MPI ranks can use the same GPU. #!/bin/bash -l #SBATCH --job-name=cp2k-job -#SBATCH --time=00:30:00 # (1) +#SBATCH --time=00:30:00 # (1)! #SBATCH --nodes=4 #SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=32 # (2) -#SBATCH --cpus-per-task=8 # (3) +#SBATCH --ntasks-per-node=32 # (2)! +#SBATCH --cpus-per-task=8 # (3)! #SBATCH --account= #SBATCH --hint=nomultithread #SBATCH --hint=exclusive @@ -75,10 +75,10 @@ MPS] daemon so that multiple MPI ranks can use the same GPU. #SBATCH --uenv= #SBATCH --view=cp2k -export CUDA_CACHE_PATH="/dev/shm/$USER/cuda_cache" # (5) +export CUDA_CACHE_PATH="/dev/shm/$USER/cuda_cache" # (5)! export MPICH_GPU_SUPPORT_ENABLED=1 # (6) export MPICH_MALLOC_FALLBACK=1 -export OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1)) # (4) +export OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1)) # (4)! ulimit -s unlimited srun --cpu-bind=socket ./mps-wrapper.sh cp2k.psmp -i -o @@ -308,11 +308,11 @@ On Eiger, a similar sbatch script can be used: ```bash title="run_cp2k.sh" #!/bin/bash -l #SBATCH --job-name=cp2k-job -#SBATCH --time=00:30:00 # (1) +#SBATCH --time=00:30:00 # (1)! #SBATCH --nodes=1 #SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=32 # (2) -#SBATCH --cpus-per-task=4 # (3) +#SBATCH --ntasks-per-node=32 # (2)! +#SBATCH --cpus-per-task=4 # (3)! #SBATCH --account= #SBATCH --hint=nomultithread #SBATCH --hint=exclusive @@ -320,7 +320,7 @@ On Eiger, a similar sbatch script can be used: #SBATCH --uenv= #SBATCH --view=cp2k -export OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1)) # (4) +export OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1)) # (4)! ulimit -s unlimited srun --cpu-bind=socket cp2k.psmp -i -o @@ -355,19 +355,26 @@ srun --cpu-bind=socket cp2k.psmp -i -o ## Building CP2K from Source +!!! warning + The following installation instructions are up-to-date with the latest version of CP2K provided by the uenv. + That is, they work when manually compiling the CP2K source code corresponding to the CP2K version provided by the uenv. + **They are not necessarily up-to-date with the latest version of CP2K available on the `master` branch.** + + If you are trying to build CP2K from source, make sure you understand what is different in `master` + compared to the latest version of CP2K provided by the uenv. The [CP2K] uenv provides all the dependencies required to build [CP2K] from source, with several optional features enabled. You can follow these steps to build [CP2K] from source: ```bash -uenv start --view=develop # (1) +uenv start --view=develop # (1)! -cd # (2) +cd # (2)! mkdir build && cd build CC=mpicc CXX=mpic++ FC=mpifort cmake \ -GNinja \ - -DCMAKE_CUDA_HOST_COMPILER=mpicc \ # (3) + -DCMAKE_CUDA_HOST_COMPILER=mpicc \ # (3)! -DCP2K_USE_LIBXC=ON \ -DCP2K_USE_LIBINT2=ON \ -DCP2K_USE_SPGLIB=ON \ @@ -378,7 +385,7 @@ CC=mpicc CXX=mpic++ FC=mpifort cmake \ -DCP2K_USE_PLUMED=ON \ -DCP2K_USE_DFTD4=ON \ -DCP2K_USE_DLAF=ON \ - -DCP2K_USE_ACCEL=CUDA -DCP2K_WITH_GPU=H100 \ # (4) + -DCP2K_USE_ACCEL=CUDA -DCP2K_WITH_GPU=H100 \ # (4)! .. ninja -j 32 @@ -408,6 +415,26 @@ See [manual.cp2k.org/CMake] for more details. ### Known issues +#### DLA-Future + +The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. The DLA-Future library is initialized +even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). + +If you are heavily over-subscribing the GPU by running multiple ranks per GPU, you may encounter the following error: + +``` +created exception: cuSOLVER function returned error code 7 (CUSOLVER_STATUS_INTERNAL_ERROR): pika(bad_function_call) +terminate called after throwing an instance of 'pika::cuda::experimental::cusolver_exception' +what(): cuSOLVER function returned error code 7 (CUSOLVER_STATUS_INTERNAL_ERROR): pika(bad_function_call) +``` + +The reason is that too many cuSOLVER handles are created. If you don't need DLA-Future, you can manually set +the number of BLAS and LAPACK handlers to 1 by setting the following environment variables: + +```bash +DLAF_NUM_GPU_BLAS_HANDLES=1 +DLAF_NUM_GPU_LAPACK_HANDLES=1 +``` #### DBCSR GPU scaling From e6aafc2ceb372961ef7bdf0c71ad77aef7ca5ade Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 14:45:31 +0100 Subject: [PATCH 02/15] update codeowners --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 10d13999..17a15778 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ * @bcumming @msimberg @RMeli -docs/software/sciapps/cp2k @abussy @RMeli -docs/software/communication @msimberg +docs/software/sciapps/cp2k.md @abussy @RMeli +docs/software/communication.md @msimberg From c2ca4c6daa74fe35c594545f29d126a7fe92d399 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 19:35:17 +0100 Subject: [PATCH 03/15] Update .github/CODEOWNERS Co-authored-by: Mikael Simberg --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 17a15778..2e73858a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ * @bcumming @msimberg @RMeli docs/software/sciapps/cp2k.md @abussy @RMeli -docs/software/communication.md @msimberg +docs/software/communication @msimberg From ed25c0b0344eeb165179c676433c492ef1ebfea1 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 21:41:20 +0100 Subject: [PATCH 04/15] Update docs/software/sciapps/cp2k.md Co-authored-by: Mikael Simberg --- docs/software/sciapps/cp2k.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 4a58e94c..7a42266b 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -419,7 +419,9 @@ See [manual.cp2k.org/CMake] for more details. The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. The DLA-Future library is initialized even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). +This can lead to some surprising warnings and failures described below. +##### `CUSOLVER_STATUS_INTERNAL_ERROR` during initialization If you are heavily over-subscribing the GPU by running multiple ranks per GPU, you may encounter the following error: ``` From 15efaa9d4968d67984df8efddc6abe132afc26ab Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 21:41:29 +0100 Subject: [PATCH 05/15] Update docs/software/sciapps/cp2k.md Co-authored-by: Mikael Simberg --- docs/software/sciapps/cp2k.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 7a42266b..5928acb3 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -437,7 +437,18 @@ the number of BLAS and LAPACK handlers to 1 by setting the following environment DLAF_NUM_GPU_BLAS_HANDLES=1 DLAF_NUM_GPU_LAPACK_HANDLES=1 ``` - +##### Warning about pika only using one worker thread + +When running CP2K with multiple tasks per node and only one core per task, the initialization of DLA-Future may trigger the following warning: +\``` (I don't know how to correctly escape a code block within a suggestion) +The pika runtime will be started with only one worker thread because the +process mask has restricted the available resources to only one thread. If +this is unintentional make sure the process mask contains the resources +you need or use --pika:ignore-process-mask to use all resources. Use +--pika:print-bind to print the thread bindings used by pika. +\``` + +This warning is triggered because the runtime used by DLA-Future, [pika](https://pikacpp.org), should typically be used with more than one thread and indicates a configuration mistake. However, if you are not using DLA-Future, the warning is harmless and can be ignored. The warning cannot be silenced. #### DBCSR GPU scaling On the GH200 architecture, it has been observed that the GPU accelerated version of [DBCSR] does not perform optimally in some cases. From 39eb6deef72c5091da43ed62de784bd674910bf3 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 21:41:50 +0100 Subject: [PATCH 06/15] save --- docs/software/sciapps/cp2k.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 4a58e94c..9d79b8af 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -63,11 +63,11 @@ MPS] daemon so that multiple MPI ranks can use the same GPU. #!/bin/bash -l #SBATCH --job-name=cp2k-job -#SBATCH --time=00:30:00 # (1)! +#SBATCH --time=00:30:00 (1) #SBATCH --nodes=4 #SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=32 # (2)! -#SBATCH --cpus-per-task=8 # (3)! +#SBATCH --ntasks-per-node=32 (2) +#SBATCH --cpus-per-task=8 (3) #SBATCH --account= #SBATCH --hint=nomultithread #SBATCH --hint=exclusive @@ -76,7 +76,7 @@ MPS] daemon so that multiple MPI ranks can use the same GPU. #SBATCH --view=cp2k export CUDA_CACHE_PATH="/dev/shm/$USER/cuda_cache" # (5)! -export MPICH_GPU_SUPPORT_ENABLED=1 # (6) +export MPICH_GPU_SUPPORT_ENABLED=1 # (6)! export MPICH_MALLOC_FALLBACK=1 export OMP_NUM_THREADS=$((SLURM_CPUS_PER_TASK - 1)) # (4)! @@ -308,11 +308,11 @@ On Eiger, a similar sbatch script can be used: ```bash title="run_cp2k.sh" #!/bin/bash -l #SBATCH --job-name=cp2k-job -#SBATCH --time=00:30:00 # (1)! +#SBATCH --time=00:30:00 (1) #SBATCH --nodes=1 #SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=32 # (2)! -#SBATCH --cpus-per-task=4 # (3)! +#SBATCH --ntasks-per-node=32 (2) +#SBATCH --cpus-per-task=4 (3) #SBATCH --account= #SBATCH --hint=nomultithread #SBATCH --hint=exclusive @@ -336,8 +336,6 @@ srun --cpu-bind=socket cp2k.psmp -i -o for good performance. With [Intel MKL], this is not necessary and one can set `OMP_NUM_THREADS` to `SLURM_CPUS_PER_TASK`. -5. [DBCSR] relies on extensive JIT compilation and we store the cache in memory to avoid I/O overhead - * Change to your project account name * Change `` to the name (or path) of the actual CP2K uenv you want to use * Change `` to the actual path to the CP2K data directory From b86f06285b6b6070262d9699ff5cb25fdcfeaf88 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Thu, 20 Mar 2025 21:43:41 +0100 Subject: [PATCH 07/15] update --- docs/software/sciapps/cp2k.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 2f9a84ea..f8485bef 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -435,18 +435,25 @@ the number of BLAS and LAPACK handlers to 1 by setting the following environment DLAF_NUM_GPU_BLAS_HANDLES=1 DLAF_NUM_GPU_LAPACK_HANDLES=1 ``` + ##### Warning about pika only using one worker thread -When running CP2K with multiple tasks per node and only one core per task, the initialization of DLA-Future may trigger the following warning: -\``` (I don't know how to correctly escape a code block within a suggestion) +When running CP2K with multiple tasks per node and only one core per task, +the initialization of DLA-Future may trigger the following warning: + +``` The pika runtime will be started with only one worker thread because the process mask has restricted the available resources to only one thread. If this is unintentional make sure the process mask contains the resources you need or use --pika:ignore-process-mask to use all resources. Use --pika:print-bind to print the thread bindings used by pika. -\``` +``` + +This warning is triggered because the runtime used by DLA-Future, [pika](https://pikacpp.org), +should typically be used with more than one thread and indicates a configuration mistake. +However, if you are not using DLA-Future, the warning is harmless and can be ignored. +The warning cannot be silenced. -This warning is triggered because the runtime used by DLA-Future, [pika](https://pikacpp.org), should typically be used with more than one thread and indicates a configuration mistake. However, if you are not using DLA-Future, the warning is harmless and can be ignored. The warning cannot be silenced. #### DBCSR GPU scaling On the GH200 architecture, it has been observed that the GPU accelerated version of [DBCSR] does not perform optimally in some cases. From 4de09e0b7ea442707b4dc1da893aa73795e98494 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:03:34 +0100 Subject: [PATCH 08/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index f8485bef..6c76e1f1 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -420,6 +420,7 @@ even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/techn This can lead to some surprising warnings and failures described below. ##### `CUSOLVER_STATUS_INTERNAL_ERROR` during initialization + If you are heavily over-subscribing the GPU by running multiple ranks per GPU, you may encounter the following error: ``` From 0aac15c5c483a4309ccedebb75bd3ee1975e7526 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:04:24 +0100 Subject: [PATCH 09/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 6c76e1f1..cb6c64ee 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -415,8 +415,7 @@ See [manual.cp2k.org/CMake] for more details. #### DLA-Future -The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. The DLA-Future library is initialized -even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). +The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. The DLA-Future library is initialized even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). This can lead to some surprising warnings and failures described below. ##### `CUSOLVER_STATUS_INTERNAL_ERROR` during initialization From a8ca147a793a34537243270dee6a7cd225cbaa24 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:04:42 +0100 Subject: [PATCH 10/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index cb6c64ee..712c970f 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -428,8 +428,7 @@ terminate called after throwing an instance of 'pika::cuda::experimental::cusolv what(): cuSOLVER function returned error code 7 (CUSOLVER_STATUS_INTERNAL_ERROR): pika(bad_function_call) ``` -The reason is that too many cuSOLVER handles are created. If you don't need DLA-Future, you can manually set -the number of BLAS and LAPACK handlers to 1 by setting the following environment variables: +The reason is that too many cuSOLVER handles are created. If you don't need DLA-Future, you can manually set the number of BLAS and LAPACK handlers to 1 by setting the following environment variables: ```bash DLAF_NUM_GPU_BLAS_HANDLES=1 From 5ce62bc7967295910dda58a4f9064d2f71bab01a Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:05:25 +0100 Subject: [PATCH 11/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 712c970f..e33db05f 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -415,7 +415,8 @@ See [manual.cp2k.org/CMake] for more details. #### DLA-Future -The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. The DLA-Future library is initialized even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). +The `cp2k/2025.1` uenv provides CP2K with [DLA-Future] support enabled. +The DLA-Future library is initialized even if you don't [explicitly ask to use it](https://manual.cp2k.org/trunk/technologies/eigensolvers/dlaf.html). This can lead to some surprising warnings and failures described below. ##### `CUSOLVER_STATUS_INTERNAL_ERROR` during initialization From ef9992ac05ba8493c5dca0c2d92edcb65dfb793a Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:05:52 +0100 Subject: [PATCH 12/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index e33db05f..c4e6beb2 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -429,7 +429,8 @@ terminate called after throwing an instance of 'pika::cuda::experimental::cusolv what(): cuSOLVER function returned error code 7 (CUSOLVER_STATUS_INTERNAL_ERROR): pika(bad_function_call) ``` -The reason is that too many cuSOLVER handles are created. If you don't need DLA-Future, you can manually set the number of BLAS and LAPACK handlers to 1 by setting the following environment variables: +The reason is that too many cuSOLVER handles are created. +If you don't need DLA-Future, you can manually set the number of BLAS and LAPACK handlers to 1 by setting the following environment variables: ```bash DLAF_NUM_GPU_BLAS_HANDLES=1 From c64e88b37a716aa3bcc1fc5b17be6d16ef3dd573 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:06:02 +0100 Subject: [PATCH 13/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index c4e6beb2..68da4582 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -439,8 +439,7 @@ DLAF_NUM_GPU_LAPACK_HANDLES=1 ##### Warning about pika only using one worker thread -When running CP2K with multiple tasks per node and only one core per task, -the initialization of DLA-Future may trigger the following warning: +When running CP2K with multiple tasks per node and only one core per task, the initialization of DLA-Future may trigger the following warning: ``` The pika runtime will be started with only one worker thread because the From 9cc3620e6e49eca00c3171ea25ef536100bd7736 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 21 Mar 2025 09:06:40 +0100 Subject: [PATCH 14/15] Update docs/software/sciapps/cp2k.md --- docs/software/sciapps/cp2k.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 68da4582..33d28e61 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -449,8 +449,7 @@ you need or use --pika:ignore-process-mask to use all resources. Use --pika:print-bind to print the thread bindings used by pika. ``` -This warning is triggered because the runtime used by DLA-Future, [pika](https://pikacpp.org), -should typically be used with more than one thread and indicates a configuration mistake. +This warning is triggered because the runtime used by DLA-Future, [pika](https://pikacpp.org), should typically be used with more than one thread and indicates a configuration mistake. However, if you are not using DLA-Future, the warning is harmless and can be ignored. The warning cannot be silenced. From b5669182ba683116aa1af7e15db4e700d93a3d51 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Fri, 21 Mar 2025 09:46:04 +0100 Subject: [PATCH 15/15] update --- docs/software/sciapps/cp2k.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/software/sciapps/cp2k.md b/docs/software/sciapps/cp2k.md index 33d28e61..eae595de 100644 --- a/docs/software/sciapps/cp2k.md +++ b/docs/software/sciapps/cp2k.md @@ -94,7 +94,7 @@ srun --cpu-bind=socket ./mps-wrapper.sh cp2k.psmp -i -o