Skip to content

Resolved issue 105: testsuite failure of evolve/dehnen on mac/intel xeon/Sonoma. #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ AC_ARG_WITH(dso,
[ --with-dso use DSO linking], with_dso=$withval, with_dso=no)
AC_ARG_WITH(opt,
[ --with-opt use opt for essentials], with_opt=$withval, with_opt=no)
AC_ARG_WITH(openmp,
[ --with-openmp use OMP directives], with_openmp=$withval, with_openmp=no)

AC_ARG_WITH(std,
[ --with-std use this -std=], with_std=$withval, with_std=c99)
Expand Down
28 changes: 1 addition & 27 deletions src/kernel/misc/mdbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
*/


//#define USE_OMP

#include <nemo.h>
#include <mdarray.h>
#ifdef USE_OMP
#include <omp.h>
#endif

string defv[] = {
"dim=10,20,30,40\n Dimensions of array A[dim1][dim2][dim3][dim4]....",
Expand All @@ -22,12 +17,8 @@ string defv[] = {

"flip=f\n Reverse traversal through array, for benchmarking",
"iter=1\n Number of times to do the work, for benchmarking",
"free=f\n Free things we don't need anymore",
#ifdef USE_OMP
"nprocs=1\n Number of processors",
#else
"free=f\n Free things we don't need anymore"
"nprocs=-1\n No OMP enabled",
#endif
"VERSION=1.2\n 11-feb-2024 PJT",
NULL,
};
Expand Down Expand Up @@ -294,13 +285,8 @@ void nemo_main()
mdarray6 x6;
mdarray7 x7;

#ifdef USE_OMP
if (nprocs < 0) nprocs = omp_get_max_threads();
dprintf(0,"Using OMP with nprocs=%d (or use OMP_NUM_THREADS)\n",nprocs);
#else
dprintf(0,"Using single CPU, no OMP enables\n");
if (nprocs>1) warning("No OMP was enabled");
#endif

/* C99 now does it the way I wanted it to work */
dprintf(1,"pointer test3: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",test3,test3[0],&test3[0][0],&test3[0][1],test3[1],&test3[1][0]);
Expand Down Expand Up @@ -339,10 +325,6 @@ void nemo_main()
// 80^4 * 10 -> 3.832"
// 90^4 * 1 -> 0.63
// 100^4 * 1 -> 1.00
#ifdef USE_OMP
#pragma omp parallel shared(x4,ntest,dim) private(i,i4,i3,i2,i1)
#pragma omp for
#endif
for (i=0; i<ntest; i++) {
for (i4=0; i4<dim[3]; i4++)
for (i3=0; i3<dim[2]; i3++)
Expand All @@ -360,10 +342,6 @@ void nemo_main()
// 90^4: 0.62 1.60
// 95^4: 0.74 2.00
y4 = allocate_mdarray4(dim[3],dim[1],dim[0],dim[2]);
#ifdef USE_OMP
#pragma omp parallel shared(x4,y4,ntest,dim) private(i,i4,i3,i2,i1)
#pragma omp for
#endif
for (i=0; i<ntest; i++) {
for (i4=0; i4<dim[3]; i4++)
for (i3=0; i3<dim[2]; i3++)
Expand All @@ -375,10 +353,6 @@ void nemo_main()
if (free) free_mdarray4(x4,dim[3],dim[2],dim[1],dim[0]);
if (iwork>1) {
y3 = allocate_mdarray3(dim[3],dim[1],dim[0]);
#ifdef USE_OMP
#pragma omp parallel shared(x4,y3,ntest,dim) private(i,i4,i3,i2,i1,sum)
#pragma omp for
#endif
for (i=0; i<ntest; i++) {
for (i4=0; i4<dim[3]; i4++)
for (i2=0; i2<dim[1]; i2++)
Expand Down
2 changes: 1 addition & 1 deletion src/nbody/io_nemo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ${IONO}/check_file.o : ${IONS}/check_file.h ${IONS}/check_file.c

# main program used with g77 compiler
${IONO}/nemo_g77.o : ${IONS}/nemo_g77.c
$(CC) $(CFLAGS) -D$(DFC) $(OPT) $(INC) -c ${IONS}/nemo_g77.c -o ${IONO}/nemo_g77.o
$(CC) $(CFLAGS) -D$(DFC) $(OPT) $(INC) -c ${IONS}/nemo_g77.c -o ${IONO}/nemo_g77.o

#
# io_nemo test programs
Expand Down
5 changes: 0 additions & 5 deletions src/tutor/bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,3 @@ offt: offt.c

offt8: offt.c
$(CC) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o offt8 offt.c


array_add_omp: array_add.c
$(CC) $(CFLAGS) -fopenmp array_add.c -o array_add_omp $(NEMO_LIBS)
# $(CC) $(CFLAGS) -std=c99 -fopenmp array_add.c -o array_add_omp $(NEMO_LIBS)
2 changes: 1 addition & 1 deletion src/tutor/bench/array_add.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* benchmark openmp vs. pthreads
* issue 105 - no longer relevant
*
* example taken from
* http://www.futurechips.org/tips-for-power-coders/open-mp-pthreads.html
Expand All @@ -24,7 +25,6 @@ string usage = "bench openmp";
void sum_st(int *A, int *B, int *C)
{
int i;
#pragma omp parallel for
for(i = 0; i < M; i++)
A[i] = B[i] + C[i];
}
Expand Down
84 changes: 0 additions & 84 deletions src/tutor/mp/Makefile

This file was deleted.

34 changes: 0 additions & 34 deletions src/tutor/mp/README

This file was deleted.

Loading