summaryrefslogtreecommitdiff
path: root/science/openmx/files/patch-Cluster__DFT.c
blob: cbf76c632080af39def95962c3753140cb4dd6fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- Cluster_DFT.c.orig	2018-08-29 06:05:22 UTC
+++ Cluster_DFT.c
@@ -194,9 +194,9 @@ static double Cluster_collinear(
 
   Num_Comm_World1 = SpinP_switch + 1; 
 
-  stat_send = malloc(sizeof(MPI_Status)*numprocs0);
-  request_send = malloc(sizeof(MPI_Request)*numprocs0);
-  request_recv = malloc(sizeof(MPI_Request)*numprocs0);
+  stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs0);
+  request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs0);
+  request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs0);
 
   /***********************************************
       allocation of arrays for the first world 
@@ -1541,9 +1541,9 @@ static double Cluster_non_collinear(
 
   /* allocation of arrays */
 
-  stat_send = malloc(sizeof(MPI_Status)*numprocs);
-  request_send = malloc(sizeof(MPI_Request)*numprocs);
-  request_recv = malloc(sizeof(MPI_Request)*numprocs);
+  stat_send = (MPI_Status *)malloc(sizeof(MPI_Status)*numprocs);
+  request_send = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs);
+  request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs);
 
   /****************************************************
              calculation of the array size
@@ -2649,7 +2649,7 @@ void Save_DOS_Col(int n, int MaxN, int *
   MPI_Comm_size(mpi_comm_level1,&numprocs);
   MPI_Comm_rank(mpi_comm_level1,&myid);
 
-  request_recv = malloc(sizeof(MPI_Request)*numprocs);
+  request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs);
 
   /* open file pointers */
 
@@ -2901,7 +2901,7 @@ void Save_DOS_NonCol(int n, int MaxN, in
   MPI_Comm_size(mpi_comm_level1,&numprocs);
   MPI_Comm_rank(mpi_comm_level1,&myid);
 
-  request_recv = malloc(sizeof(MPI_Request)*numprocs);
+  request_recv = (MPI_Request *)malloc(sizeof(MPI_Request)*numprocs);
 
   /* open file pointers */