Number of available processors using Eiffel - eiffel

I'm toying with Eiffels SCOOP.
In my program a bunch of worker run in parallel. I want to create as many worker as processor are available for me.
Is there and "easy" way in Eiffel to find the number of available processors?

There is no such a feature in the current standard library. However you can use the following:
frozen available_cpus: NATURAL_8
-- Number of logical CPUs reported by OS.
external
"C inline use %"eif_scoop.h%""
alias
"[
#ifdef EIF_WINDOWS
SYSTEM_INFO sysinfo;
GetSystemInfo (&sysinfo);
return sysinfo.dwNumberOfProcessors;
#elif EIF_MACOSX
int nm [2];
size_t len = 4;
uint32_t count;
nm [0] = CTL_HW; nm [1] = HW_AVAILCPU;
sysctl (nm, 2, &count, &len, NULL, 0);
if(count < 1) {
nm[1] = HW_NCPU;
sysctl(nm, 2, &count, &len, NULL, 0);
if (count < 1) {count = 1;}
}
return count;
#else
return sysconf (_SC_NPROCESSORS_ONLN);
#endif
]"
end

Related

performance counters values return zero using papi attach

I am trying to read the hardware performance counter using PAPI and I have written the following code:
#include <stdio.h>
#include <stdlib.h>
#include "papi.h" /* This needs to be included every time you use PAPI */
#include <unistd.h>
#define NUM_EVENTS 2
#define ERROR_RETURN(retval) { fprintf(stderr, "Error %d %s:line %d: \n", retval,__FILE__,__LINE__); exit(retval); }
int main(int argc, char *argv[])
{
if(argc<=1) {
printf("Pid is not provided, I will die now :( ...");
exit(1);
} //otherwise continue on our merry way....
int EventSet = PAPI_NULL;
int tmp, i;
/*must be initialized to PAPI_NULL before calling PAPI_create_event*/
long long values[NUM_EVENTS];
/*This is where we store the values we read from the eventset */
/* We use number to keep track of the number of events in the EventSet */
int retval, number;
char errstring[PAPI_MAX_STR_LEN];
pid_t pid = atoi(argv[1]);
unsigned int l2miss = 0x0;
unsigned int data_all_from_l2 = 0x0;
/***************************************************************************
* This part initializes the library and compares the version number of the*
* header file, to the version of the library, if these don't match then it *
* is likely that PAPI won't work correctly.If there is an error, retval *
* keeps track of the version number. *
***************************************************************************/
if((retval = PAPI_library_init(PAPI_VER_CURRENT)) != PAPI_VER_CURRENT )
ERROR_RETURN(retval);
/* Creating the eventset */
if ( (retval = PAPI_create_eventset(&EventSet)) != PAPI_OK)
ERROR_RETURN(retval);
/* Add Native event to the EventSet */
// if ( (retval = PAPI_event_name_to_code("PM_DATA_FROM_L2MISS",&l2miss)) != PAPI_OK)
if ( (retval = PAPI_event_name_to_code("PM_L3_CO_MEM",&l2miss)) != PAPI_OK)
ERROR_RETURN(retval);
if ( (retval = PAPI_add_event(EventSet, l2miss)) != PAPI_OK)
ERROR_RETURN(retval);
/* Add Native event to the EventSet */
if ( (retval = PAPI_event_name_to_code("PM_DATA_ALL_FROM_L2",&data_all_from_l2)) != PAPI_OK)
ERROR_RETURN(retval);
if ( (retval = PAPI_add_event(EventSet, data_all_from_l2)) != PAPI_OK)
ERROR_RETURN(retval);
/* get the number of events in the event set */
number = 0;
if ( (retval = PAPI_list_events(EventSet, NULL, &number)) != PAPI_OK)
ERROR_RETURN(retval);
printf("There are %d events in the event set\n", number);
retval = PAPI_attach( EventSet, ( unsigned long ) pid );
if ( retval != PAPI_OK )
ERROR_RETURN(retval);
/* Start counting */
if ( (retval = PAPI_start(EventSet)) != PAPI_OK)
ERROR_RETURN(retval);
while(kill(pid,0)==0)
{
if ( (retval=PAPI_read(EventSet, values)) != PAPI_OK)
ERROR_RETURN(retval);
printf("The L2 Miss are %lld \n",values[0]);
printf("The data_all_from_l2 are %lld \n",values[1]);
sleep(1);
}//while
/* Stop counting and store the values into the array */
if ( (retval = PAPI_stop(EventSet, values)) != PAPI_OK)
ERROR_RETURN(retval);
printf("Total L2 Miss are %lld \n",values[0]);
printf("Total data_all_from_l2 are %lld \n",values[1]);
/* free the resources used by PAPI */
PAPI_shutdown();
exit(0);
}
I compile it using the following command:
gcc -I/apps/PAPI/5.5.0/GCC/5.4.0/CUDA/8.0/include -O0 pid_ex.c -L/apps/PAPI/5.5.0/GCC/5.4.0/CUDA/8.0/lib -lpapi -o pid_ex
and I run it like this:
./pid_ex 7865
where 7865 is the process id of the running process.
The problem is it is showing zero values instead of showing the counter values.
Could anybody let me know why it is behaving like this? Why is it not getting values?
Couple of things, I compiled and tried to run your code.
I compiled with -Wall and you should probably change:
unsigned int l2miss = 0x0;
unsigned int data_all_from_l2 = 0x0;
into
int l2miss = PAPI_NULL;
int data_all_from_l2 = PAPI_NULL;
so you get rid of a couple of warnings.
Then I tried to just run your code and I was getting this error:
Error -7 papi-test.c:line ...
which is PAPI error code from when a given event is not available for your machine, issued by the following function calls:
if ( (retval = PAPI_event_name_to_code("PM_DATA_FROM_L2MISS",&l2miss)) != PAPI_OK)
and
if ( (retval = PAPI_event_name_to_code("PM_DATA_ALL_FROM_L2",&data_all_from_l2)) != PAPI_OK)
Given this, I checked which events were available for my machine and got the following:
$ papi_avail
and your events were not available for me. So to test your code I changed the events to be recorded and set them to:
PAPI_L1_DCM
PAPI_L2_DCM
which represent respectively the L1 and L2 data cache misses.
And then I run your program against four programs: firefox, java, a program that just sleeps and cinnamon (Linux Mint).
It seems that the events are recorded as you can see:
Firefox:
./papi-test 3922
There are 2 events in the event set
The L2 Miss are 0
The data_all_from_l2 are 0
The L2 Miss are 130534
The data_all_from_l2 are 104151
The L2 Miss are 266181
The data_all_from_l2 are 212618
...
For the programs that just sleeps I get:
./papi-test 7870
There are 2 events in the event set
The L2 Miss are 0
The data_all_from_l2 are 0
The L2 Miss are 0
The data_all_from_l2 are 0
The L2 Miss are 0
The data_all_from_l2 are 0
...
Please disregard the string printed before the number as I kept your string when you print the events although the events registered are different and I just mentioned above which ones I used to be able to run it on my computer.
So it seems that I'm not just getting zeros all the time but depend on the program that's being under observation.
The version of PAPI used is 5.4.3.
Also, although I don't have suggestions at the moment, have care of the condition in the while loop you check, since might happen that while you sleep inside the loop the program associated with PID could finish and its PID reused and assigned to another process and you will still satisfy the condition but in this case you might be looking at the wrong program you originally thought.
There's also been some discussion
https://lists.eecs.utk.edu/pipermail/ptools-perfapi/2016-October/004060.html?cm_mc_uid=57211302537614804702521&cm_mc_sid_50200000=1482029904
using some events like yours.
Plus, the events you use are defined for power8 machines (https://lkml.org/lkml/2015/5/27/858), so you're probably using a power8 machine.

Periodic thread fails real-time in Xenomai

I'm creating a periodic thread which outputs a square signal on an analogic output. I'm using Posix Skin and Analogy from the Xenomai API.
I tested the real-time performance of my code using an oscilloscope and looking at the latency on the square signal (whose frequency is 1kHz). I am supposed to achieve <100us latency. However, the signal is strongly (>250us latency) perturbated by common interruption signals, like moving the mouse, starting a new program, etc.
The flags in my makefile are set up as such:
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -I/usr/xenomai/include/posix
main_posix.c -Xlinker -rpath -Xlinker /usr/xenomai/lib -Wl,#/usr/xenomai/lib/posix.wrappers
-L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt -lanalogy -lrtdm -o main_posix
and this is the code:
#define PERIOD 1e6
#define FILENAME "analogy0"
#define ANALOG_SUBD 1
#define CHANNEL 0
#define SCAN_SIZE 2
#define DELAI 5
static char *filename = FILENAME;
static int idx_subd = ANALOG_SUBD;
static int idx_chan = CHANNEL;
static int valueUp = 450000;
static int valueDown = 98500;
void *TaskCode(void *arg)
{
unsigned char sgnl = 0;
unsigned long overruns_r = 0;
a4l_desc_t dsc = { .sbdata = NULL };
a4l_chinfo_t *chinfo;
int err = 0;
unsigned int scan_size = SCAN_SIZE;
err = a4l_open(&dsc, filename);
if (err < 0) {
fprintf(stderr,
"insn_write: a4l_open %s failed (err=%d)\n",
filename, err);
return NULL;
}
while(1) {
pthread_wait_np( &overruns_r );
if(sgnl)
err = a4l_sync_write(&dsc,
idx_subd, CHAN(idx_chan), 0, &valueUp, scan_size);
else
err = a4l_sync_write(&dsc,
idx_subd, CHAN(idx_chan), 0, &valueDown, scan_size);
if (err < 0) {
fprintf(stderr,
"insn_write: a4l_sync_write failed (err=%d)\n", err);
goto out_insn_write;
}
sgnl = (sgnl + 1) % 2;
}
out_insn_write:
if (dsc.sbdata != NULL)
free(dsc.sbdata);
a4l_close(&dsc);
return NULL;
}
int main(void)
{
mlockall( MCL_CURRENT | MCL_FUTURE );
pthread_t thread;
int rc, i;
int prio = 99;
struct timespec rqtp, rmtp;
rqtp.tv_sec = 0;
rqtp.tv_nsec = PERIOD;
struct sched_param sparam;
sparam.sched_priority = 99;
rc = pthread_create(&thread, NULL, TaskCode, NULL);
assert(0 == rc);
rc = pthread_setschedparam(&thread, SCHED_FIFO, &sparam);
assert(0 == rc);
rc = clock_gettime( CLOCK_REALTIME, &rmtp );
assert(0 == rc);
rmtp.tv_sec = rmtp.tv_sec + DELAI;
rc = pthread_make_periodic_np(thread, &rmtp, &rqtp);
if(rc == ETIMEDOUT) printf("Début dépassé \n");
else if(rc == ESRCH) printf("Thread invalide \n");
assert(0 == rc);
rc = pthread_join(thread, NULL);
exit(EXIT_SUCCESS);
}
I am strongly suspecting (by looking at the Xenomai scheduler) that my program somehow enters secondary mode. I tried to remove the "assert" statements as well as the relevant printf's, but this was not successful. Any idea how to fix it?
As always, the devil is in the details.
I enabled the -Wall option in gcc, which shows all the warnings. It turned out the headers for pthread_* were not properly loaded, which prevented me from seeing that the first argument of pthread_setschedparam was wrong, and was supposed to be thread and not &thread.

ALSA tutorial required

I am New to audio programming.I want to create small application which is capable of playing and gives volume control . I am using alsa-lib.
I want to know what is the purpose of switch (ex.Master Playback switch), enum in mixer elements and what value should i set to those switchs .
Please suggest me some tutorial for mixer settings as well as alsa programming .
Just collecting some here, that have example code:
ALSA Programming HOWTO v.1.0.0 [alsamodular.sourceforge.net]
A tutorial on using the ALSA Audio API [equalarea.com] 2002
A close look at ALSA [volkerschatz.com]
ALSA API - Sample Programs With Source Code By Aquiles Yanez 2005
Introduction to Sound Programming with ALSA | Linux Journal (pg3 with example code) 2004
Note that some of these are old, and API may have changed in the meantime... you can also look up aplay.c (the source for the command line arecord and aplay), but that one is not the easiest to read for starters...
You'll have a tough time finding anything concrete on ALSA, as I have have found from just starting learning it too. The best place to begin is the ALSA project homepage where they link to a number of tutorials, the best one being Dr Nagorni's one IMO.
From what it sounds like you're trying to do, JACK would most likely be a quicker and easier solution, though.
Check out the docs. There are some good examples.
http://www.alsa-project.org/alsa-doc/alsa-lib/examples.html
Be aware of the safe alsa subset.
https://www.winehq.org/pipermail/wine-bugs/2009-June/179698.html
Here's something small I put together using the various sources I could find. It miiiiiiiiiight be a good starting point.
/* Compile with gcc -lasound -pthread threadaudio.c */
#include <alsa/asoundlib.h>
#include <pthread.h>
#include <stdio.h>
unsigned char audiobuffer[0x400];
pthread_mutex_t audiomutex = PTHREAD_MUTEX_INITIALIZER;
void changeaudio (int volume) {
int i;
pthread_mutex_lock(&audiomutex);
for (i = 0; i < sizeof(audiobuffer); i++)
audiobuffer[i] = (random() & 0xff) * volume / 10;
pthread_mutex_unlock(&audiomutex);
}
void *startaudio (void *param)
{
static char *device = "default";
snd_output_t *output = NULL;
int *audiostop = (int*)param;
int err;
snd_pcm_t *handle;
snd_pcm_sframes_t frames;
changeaudio(5);
if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
printf("Playback open error: %s\n", snd_strerror(err));
exit(EXIT_FAILURE);
}
if ((err = snd_pcm_set_params(handle,
SND_PCM_FORMAT_U8,
SND_PCM_ACCESS_RW_INTERLEAVED,
1,
48000,
1,
100000)) < 0) { /* 0.1sec */
printf("Playback open error: %s\n", snd_strerror(err));
exit(EXIT_FAILURE);
}
while (!*audiostop) {
err = snd_pcm_wait(handle, 1000);
if (err < 0) {
fprintf (stderr, "poll failed (%d)\n", err);
break;
}
pthread_mutex_lock(&audiomutex);
frames = snd_pcm_writei(handle, audiobuffer, sizeof(audiobuffer));
pthread_mutex_unlock(&audiomutex);
if (frames < 0)
err = snd_pcm_recover(handle, frames, 0);
if (err < 0) {
printf("snd_pcm_writei failed: %s\n", snd_strerror(err));
break;
}
if (frames > 0 && frames < (long)sizeof(audiobuffer))
printf("Short write (expected %li, wrote %li)\n", (long)sizeof(audiobuffer), frames);
}
snd_pcm_close(handle);
}
int main(void)
{
pthread_t audiothread;
int audiostop = 0;
int volume;
pthread_create(&audiothread, NULL, startaudio, &audiostop);
while (1) {
printf("Enter volume 1 through 10. [0 to quit.]: ");
scanf("%d", &volume);
if (volume == 0) break;
changeaudio(volume);
}
audiostop = 1;
pthread_join(audiothread, NULL);
return 0;
}
And after reading the code above you'll probably want to read this article regarding (among other things) not using locks.
http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing

Bus error in C Program on Unix machine

I'm fairly unexperienced with C and am running into a "Bus error" that I cannot understand the cause of. I had never heard of gdb but came across it on this forum and tried using it on my problem program and got the following output:
% gdb Proc1 GNU gdb 5.0
...
This GDB was
configured as
"sparc-sun-solaris2.8"...
(no
debugging symbols found)...
(gdb) run
Starting program:
/home/0/vlcek/CSE660/Lab3/Proc1
(no
debugging symbols found)...
(no
debugging symbols found)...
(no
debugging symbols found)...
Program
received signal SIGSEGV, Segmentation
fault. 0x10a64 in main ()
I have no idea what this means, is that saying there's an error in line 10 in my code? If so, line 10 in my code is merely "int main()" so I'm not sure the issue there... When I try running the program all it says is "Bus error" so I'm not sure where to go from here. I even tried putting a printf right after main and it doesn't print the string, only gives me a Bus error.
Below is my code:
// Compilation Command: gcc -o Proc1 Proc1.c ssem.o sshm.o
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "ssem.h"
#include "sshm.h"
// Code of Proc1
int main()
{int i, internal_reg;
int key1 = 111111, key2 = 222222, key3 = 333333, key4 = 444444;
/* here create and initialize all semaphores */
int sem1 = sem_create(key1, 1);
if (sem1 < 0) {
perror("sem failed");
}
int sem2 = sem_create(key2, 1);
if (sem2 < 0) {
perror("sem failed");
}
int sem3 = sem_create(key3, 1);
if (sem3 < 0) {
perror("sem failed");
}
int sem4 = sem_create(key4, 1);
if (sem4 < 0) {
perror("sem failed");
}
/* here created: shared memory array Account of size 3 */
int *Account;
int shmid = shm_get(123456, (void**) &Account, 3*sizeof(int));
if (shmid < 0) {
perror("shm failed");
}
Account[0]=10000;
Account[1]=10000;
Account[2]=10000;
/* synchronize with Proc2, Proc3 and Proc4 (4 process 4 way synchronization)*/
for (i = 0; i < 1000; i++)
{
sem_signal(sem1);
sem_signal(sem1);
sem_signal(sem1);
internal_reg = Account[0];
internal_reg = internal_reg - 200;
Account[0] = internal_reg;
/* same thing, except we're adding $100 to Account1 now... */
internal_reg = Account[1];
internal_reg = internal_reg + 200;
Account[1] = internal_reg;
if (i % 100 == 0 && i != 0) {
printf("Account 0: $%i\n", Account[0]);
printf("Account 1: $%i\n", Account[1]);
}
if (i == 300 || i == 600) {
sleep(1);
}
sem_wait(sem2);
sem_wait(sem3);
sem_wait(sem4);
}
/* Here add a code that prints contents of each account
and their sum after 100th, 200th, 300th, ...., and 1000th iterations*/
}
/*in the code above include some wait and signal operations on semaphores. Do no
t over-synchronize. */
Here is the documentation for ssem and sshm:
/*
* ssem.c
*
* Version 1.0.0
* Date : 10 Jan 2002
*
*/
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/types.h>
#include "ssem.h"
#define PERMS 0600
static struct sembuf op_lock[1] = {
0, -1, 0
};
static struct sembuf op_unlock[1] = {
0, 1, IPC_NOWAIT
};
int sem_create(int key,int initval)
{
int semid,i;
semid = semget((key_t)key, 1, IPC_CREAT | PERMS);
for(i=0;i<initval;i++)
semop(semid,&op_unlock[0],1);
return semid;
}
int sem_open(int key)
{
int semid;
semid = semget(key,0,0);
return semid;
}
int sem_wait(int semid)
{
return semop(semid,&op_lock[0],1);
}
int sem_signal(int semid)
{
return semop(semid,&op_unlock[0],1);
}
int sem_rm(int semid)
{
return semctl(semid, 0, IPC_RMID, 0);
}
/*
* sshm.c
*
* Routines for Simpler shared memory operations
* Version : 1.0.0.
* Date : 10 Jan 2002
*
*/
#include <sys/shm.h>
#include <sys/ipc.h>
#include <sys/types.h>
#include "sshm.h"
#define PERMS 0600
int shm_get(int key, void **start_ptr, int size)
{
int shmid;
shmid = shmget((key_t) key, size, PERMS | IPC_CREAT);
(*start_ptr) = (void *) shmat(shmid, (char *) 0, 0);
return shmid;
}
int shm_rm(int shmid)
{
return shmctl(shmid, IPC_RMID, (struct shmid_ds *) 0);
}
After compiling Proc1.c with the -ggdb flag and running gdb I got the following:
Program received signal SIGSEGV,
Segmentation fault. 0x10a64 in main ()
at Proc1.c:36
36 Account[0]=10000
Why would this cause a segmentation fault?
After changing the declaration of Account to
int *Account = 0;
and adding
printf("Account == %p\n", Account);
before Account[0] = 10000;
I get the following upon running Proc1:
Account == ffffffff
Bus error
In order to get more sensible results from gdb you should compile your program with the -ggdb option. This will then include debugging information (like line numbers) into your program.
What you are currently seeing is the memory address (0x10a64) of the program counter. This will not help you very much unless you can correlate the assembly instructions you find there with a part of your C program yourself.
It looks like you are using shm_get properly. I think the library designer has made a terrible mistake in naming the function so similarly to shmget.
It's just as I thought. The Account pointer is ending up with an invalid value (aka 0xffffffff (aka (void *)(-1))) in it. The value (void *)(-1) generally indicates some sort of error, and it is explicitly mentioned in the manpage for shmat. This indicates that the shmat call inside the library failed. Here is how you can tell if it failed:
if (Account == (void *)(-1)) {
perror("shmat failed");
}
Account[0] = 10000;
// ...
Now, why it failed is an interesting mystery. Apparently the shmget call succeeded.
Personally, I think System V IPC is basically deprecated at this point and you should avoid using it if you can.
Depending on your compiler and your compiler options you might encounter an aliasing problem because your are casting the address of your Account pointer. These oldish interfaces are not in phase with modern antialiasing rules, meaning that the optimizer supposes that the value of Account wouldn't change.
Also you should get the argument for shm_get as close as possible to the expected type. Try perhaps something like the following.
void volatile* shmRet;
int shmid = shm_get(123456, (void**) &shmRet, 3*sizeof(int));
int *Account = shmRet;
I don't have the same architecture, so I don't know the exact prototype of your shm_get but usually it is also a bad idea to use fixed keys for this type of functions. There should be some function that returns you some key to use in your application.

How to get network adapter stats in linux/Mac OSX?

I'm looking for a way to get hold of network stats in C on Linux and MacOSX. Specifically, I need to monitor the number of bytes uploaded and downloaded from each network adapter on the system - I don't need to do packet inspection, or differentiate between protocols, just a 'total bytes' counter which I can poll at intervals would be fine. In Windows I can do this using the iphlpapi.dll library via GetIfTable (to list the network adapters) and GetIfEntry (to read the stats), but I can't find the Linux/OSX equivalents. My knowledge of C is fairly basic so I would appreciate a solution that isn't too involved. Any help would be much appreciated!
The Darwin netstat source code uses sysctl.
Here's some code that prints the number of bytes in and out on OSX:
#import <Foundation/Foundation.h>
#include <sys/sysctl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <net/route.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int mib[] = {
CTL_NET,
PF_ROUTE,
0,
0,
NET_RT_IFLIST2,
0
};
size_t len;
if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) {
fprintf(stderr, "sysctl: %s\n", strerror(errno));
exit(1);
}
char *buf = (char *)malloc(len);
if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) {
fprintf(stderr, "sysctl: %s\n", strerror(errno));
exit(1);
}
char *lim = buf + len;
char *next = NULL;
u_int64_t totalibytes = 0;
u_int64_t totalobytes = 0;
for (next = buf; next < lim; ) {
struct if_msghdr *ifm = (struct if_msghdr *)next;
next += ifm->ifm_msglen;
if (ifm->ifm_type == RTM_IFINFO2) {
struct if_msghdr2 *if2m = (struct if_msghdr2 *)ifm;
totalibytes += if2m->ifm_data.ifi_ibytes;
totalobytes += if2m->ifm_data.ifi_obytes;
}
}
printf("total ibytes %qu\tobytes %qu\n", totalibytes, totalobytes);
[pool drain];
return 0;
}
I can't speak to OSX but on linux take a look at /proc/net/dev.
If you do 'cat /proc/net/dev' you should see statistics including 'bytes' - the total number of bytes of data transmitted or received by the interface. You can read the file within your own program.
EDIT:
I didn't read your whole question. This article should help you get started with /proc and has a section on /proc/net/dev.
Also, to list the interfaces you can call ioctl with the SIOCGIFCONF option. You can Google for a decent code example on how to loop through the returned data. Or you can simply pull it out of the /proc.net/dev data mentioned above, which should be easier.
on Linux:
low level: check /sys/class/net/eth0/statistics/
slightly higher level: ip -s link show eth0
graphical: iftop
interactive: iptraf

Resources